-rw-r--r-- | noncore/apps/tinykate/libkate/view/kateview.cpp | 12 |
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,24 +1,24 @@ /*************************************************************************** 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 @@ -1760,33 +1760,33 @@ bool KateView::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() { @@ -2184,33 +2184,33 @@ bool KateView::askReplaceEnd() { 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); } @@ -2314,33 +2314,33 @@ void KateView::configDialog() 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(); @@ -2824,33 +2824,33 @@ void KateIconBorder::paintLine(int i) } 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); |