summaryrefslogtreecommitdiff
path: root/noncore/apps
authorllornkcor <llornkcor>2002-12-22 17:43:32 (UTC)
committer llornkcor <llornkcor>2002-12-22 17:43:32 (UTC)
commitc82ed38520b4038678ab0ab0c9f0ba147d8791ea (patch) (side-by-side diff)
tree8c89a248f9471e004c48029edf29b63ece14f7e4 /noncore/apps
parenta907eb4d3c6ca142dcab7889d8932ccb452bf07c (diff)
downloadopie-c82ed38520b4038678ab0ab0c9f0ba147d8791ea.zip
opie-c82ed38520b4038678ab0ab0c9f0ba147d8791ea.tar.gz
opie-c82ed38520b4038678ab0ab0c9f0ba147d8791ea.tar.bz2
show config dialog maximized
Diffstat (limited to 'noncore/apps') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/view/kateview.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/apps/tinykate/libkate/view/kateview.cpp b/noncore/apps/tinykate/libkate/view/kateview.cpp
index 8f3a25e..6453458 100644
--- a/noncore/apps/tinykate/libkate/view/kateview.cpp
+++ b/noncore/apps/tinykate/libkate/view/kateview.cpp
@@ -1,32 +1,32 @@
/***************************************************************************
kateview.cpp - description
-------------------
begin : Mon Jan 15 2001
copyright : (C) 2001 by Christoph "Crossfire" Cullmann
- (C) 2002 by Joseph Wenninger
+ (C) 2002 by Joseph Wenninger
email : crossfire@babylon2k.de
- jowenn@kde.org
+ jowenn@kde.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/*
Copyright (C) 1998, 1999 Jochen Wilhelmy
digisnap@cs.tu-berlin.de
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
@@ -1752,49 +1752,49 @@ void KateView::insertText(const QString &s, bool /*mark*/) {
myDoc->insert(c, s);
myDoc->updateViews();
}
bool KateView::hasMarkedText() {
return myDoc->hasMarkedText();
}
QString KateView::markedText() {
return myDoc->markedText(configFlags);
}
bool KateView::canDiscard() {
int query;
if (isModified()) {
query = KMessageBox::warningYesNoCancel(this,
i18n("The current Document has been modified.\nWould you like to save it?"));
switch (query) {
case KMessageBox::Yes: //yes
if (save() == CANCEL) return false;
if (isModified()) {
query = KMessageBox::warningContinueCancel(this,
i18n("Could not save the document.\nDiscard it and continue?"),
- QString::null, i18n("&Discard"));
+ QString::null, i18n("&Discard"));
if (query == KMessageBox::Cancel) return false;
}
break;
case KMessageBox::Cancel: //cancel
return false;
}
}
return true;
}
void KateView::flush()
{
if (canDiscard()) myDoc->flush();
}
KateView::fileResult KateView::save() {
int query = KMessageBox::Yes;
if (isModified()) {
return saveAs();
}
return OK;
}
KateView::fileResult KateView::saveAs() {
@@ -2176,49 +2176,49 @@ void KateView::exposeFound(PointStruc &cursor, int slen, int flags, bool replace
void KateView::deleteReplacePrompt() {
myDoc->setPseudoModal(0L);
}
bool KateView::askReplaceEnd() {
QString str;
int query;
myDoc->updateViews();
if (s.flags & KateView::sfFinished) {
// replace finished
str = i18n("%1 replacement(s) made").arg(replaces);
KMessageBox::information(this, str, i18n("Replace"));
return true;
}
// ask for continue
if (!(s.flags & KateView::sfBackward)) {
// forward search
str = i18n("%1 replacement(s) made.\n"
"End of document reached.\n"
"Continue from the beginning?").arg(replaces);
query = KMessageBox::questionYesNo(this, str, i18n("Replace"),
- i18n("Continue"), i18n("Stop"));
+ i18n("Continue"), i18n("Stop"));
} else {
// backward search
str = i18n("%1 replacement(s) made.\n"
"Beginning of document reached.\n"
"Continue from the end?").arg(replaces);
query = KMessageBox::questionYesNo(this, str, i18n("Replace"),
i18n("Continue"), i18n("Stop"));
}
replaces = 0;
continueSearch(s);
return (query == KMessageBox::No);
}
void KateView::replaceSlot() {
doReplaceAction(replacePrompt->result(),true);
}
void KateView::installPopup(QPopupMenu *rmb_Menu)
{
rmbMenu = rmb_Menu;
}
void KateView::readConfig()
{
@@ -2306,49 +2306,49 @@ void KateView::configDialog()
(new QVBoxLayout(page))->setAutoAdd(true);
EditConfigTab *editConfig = new EditConfigTab(page, this);
HighlightDialogPage *hlPage;
HlManager *hlManager;
HlDataList hlDataList;
ItemStyleList defaultStyleList;
hlManager = HlManager::self();
defaultStyleList.setAutoDelete(true);
hlManager->getDefaults(defaultStyleList);
hlDataList.setAutoDelete(true);
//this gets the data from the KConfig object
hlManager->getHlDataList(hlDataList);
page=kd->addPage(i18n("Highlighting"));
(new QVBoxLayout(page))->setAutoAdd(true);
hlPage = new HighlightDialogPage(hlManager, &defaultStyleList, &hlDataList, 0, page);
-
+ kd->showMaximized();
if (kd->exec()) {
// color options
colorConfig->getColors(colors);
myDoc->setFont (fontConfig->getFont());
applyColors();
// indent options
indentConfig->getData(this);
// select options
selectConfig->getData(this);
// edit options
editConfig->getData(this);
// spell checker
hlManager->setHlDataList(hlDataList);
hlManager->setDefaults(defaultStyleList);
hlPage->saveData();
}
delete kd;
#endif
}
int KateView::getHl() {
@@ -2816,49 +2816,49 @@ void KateIconBorder::paintLine(int i)
p.drawPixmap(2, y, QPixmap(breakpoint_gr_xpm));
else if (line->breakpointPending())
p.drawPixmap(2, y, QPixmap(breakpoint_bl_xpm));
else
p.drawPixmap(2, y, QPixmap(breakpoint_xpm));
}
if (line->isExecutionPoint())
p.drawPixmap(2, y, QPixmap(ddd_xpm)); */
}
void KateIconBorder::paintEvent(QPaintEvent* e)
{
if (!myView->myIconBorder) return;
int lineStart = 0;
int lineEnd = 0;
QRect updateR = e->rect();
KateDocument *doc = myView->doc();
int h = doc->fontHeight;
int yPos = myInternalView->yPos;
if (h) {
- lineStart = (yPos + updateR.y()) / h;
+ lineStart = (yPos + updateR.y()) / h;
lineEnd = QMAX((yPos + updateR.y() + updateR.height()) / h, (int)doc->numLines());
}
for(int i = lineStart; i <= lineEnd; ++i)
paintLine(i);
}
void KateIconBorder::mousePressEvent(QMouseEvent* e)
{
myInternalView->placeCursor( 0, e->y(), 0 );
KateDocument *doc = myView->doc();
int cursorOnLine = (e->y() + myInternalView->yPos) / doc->fontHeight;
TextLine *line = doc->getTextLine(cursorOnLine);
switch (e->button()) {
case LeftButton:
if (!line)
break;
else
{
if (line->mark()&KateDocument::Bookmark)
line->delMark (KateDocument::Bookmark);