Diffstat (limited to 'noncore/apps/tinykate/libkate/view/kateview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/view/kateview.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/apps/tinykate/libkate/view/kateview.cpp b/noncore/apps/tinykate/libkate/view/kateview.cpp index 63e941f..af3b30d 100644 --- a/noncore/apps/tinykate/libkate/view/kateview.cpp +++ b/noncore/apps/tinykate/libkate/view/kateview.cpp @@ -37,35 +37,35 @@ Boston, MA 02111-1307, USA. */ #include "kateview.h" #include "../document/katedocument.h" #include "../document/katecmd.h" #include "../document/katehighlight.h" #include "kateviewdialog.h" #include "../document/katedialogs.h" +#include <kateconfig.h> #include <qfocusdata.h> #include <kdebug.h> #include <kapplication.h> #include <qscrollbar.h> #include <qiodevice.h> #include <qpopupmenu.h> #include <kpopupmenu.h> #include <qkeycode.h> #include <qintdict.h> -#include <kconfig.h> #include <qfont.h> #include <qpainter.h> #include <qpixmap.h> #include <qfileinfo.h> #include <qfile.h> #include <qevent.h> #include <qdir.h> #include <qvbox.h> #include <qprintdialog.h> #include <qpaintdevicemetrics.h> #include <qiodevice.h> #include <qbuffer.h> @@ -1232,30 +1232,30 @@ KateView::KateView(KateDocument *doc, QWidget *parent, const char * name) : Kate connect( this, SIGNAL( newStatus() ), this, SLOT( slotUpdate() ) ); connect( this, SIGNAL( newUndo() ), this, SLOT( slotNewUndo() ) ); connect( doc, SIGNAL( fileNameChanged() ), this, SLOT( slotFileStatusChanged() ) ); connect( doc, SIGNAL( highlightChanged() ), this, SLOT( slotHighlightChanged() ) ); readConfig(); // setHighlight->setCurrentItem(getHl()); slotUpdate(); } KateView::~KateView() { + writeConfig(); if (myDoc && !myDoc->m_bSingleViewMode) myDoc->removeView( this ); delete myViewInternal; - } #if 0 void KateView::setupActions() { #if 0 KStdAction::close( this, SLOT(flush()), actionCollection(), "file_close" ); KStdAction::save(this, SLOT(save()), actionCollection()); // setup edit menu editUndo = KStdAction::undo(this, SLOT(undo()), actionCollection()); @@ -2213,58 +2213,58 @@ bool KateView::askReplaceEnd() { void KateView::replaceSlot() { doReplaceAction(replacePrompt->result(),true); } void KateView::installPopup(QPopupMenu *rmb_Menu) { rmbMenu = rmb_Menu; } void KateView::readConfig() { - KConfig *config = KGlobal::config(); + KateConfig *config = KGlobal::config(); config->setGroup("Kate View"); searchFlags = config->readNumEntry("SearchFlags", KateView::sfPrompt); configFlags = config->readNumEntry("ConfigFlags", configFlags) & ~KateView::cfMark; - config->sync(); +// config->sync(); } void KateView::writeConfig() { - KConfig *config = KGlobal::config(); + KateConfig *config = KGlobal::config(); config->setGroup("Kate View"); config->writeEntry("SearchFlags",searchFlags); config->writeEntry("ConfigFlags",configFlags); - config->sync(); +// config->sync(); } -void KateView::readSessionConfig(KConfig *config) +void KateView::readSessionConfig(KateConfig *config) { PointStruc cursor; myViewInternal->xPos = config->readNumEntry("XPos"); myViewInternal->yPos = config->readNumEntry("YPos"); cursor.x = config->readNumEntry("CursorX"); cursor.y = config->readNumEntry("CursorY"); myViewInternal->updateCursor(cursor); myIconBorder = config->readBoolEntry("IconBorder on"); setIconBorder(myIconBorder); } -void KateView::writeSessionConfig(KConfig *config) +void KateView::writeSessionConfig(KateConfig *config) { config->writeEntry("XPos",myViewInternal->xPos); config->writeEntry("YPos",myViewInternal->yPos); config->writeEntry("CursorX",myViewInternal->cursor.x); config->writeEntry("CursorY",myViewInternal->cursor.y); config->writeEntry("IconBorder on", myIconBorder); } void KateView::configDialog() { #warning fixme @@ -2311,25 +2311,25 @@ void KateView::configDialog() 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 + //this gets the data from the KateConfig 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()); |