summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate/document/katedocument.cpp
Unidiff
Diffstat (limited to 'noncore/apps/tinykate/libkate/document/katedocument.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katedocument.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katedocument.cpp b/noncore/apps/tinykate/libkate/document/katedocument.cpp
index df1de8d..6807544 100644
--- a/noncore/apps/tinykate/libkate/document/katedocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katedocument.cpp
@@ -281,4 +281,5 @@ KateDocument::~KateDocument()
281{ 281{
282 m_highlight->release(); 282 m_highlight->release();
283 writeConfig();
283 284
284 if ( !m_bSingleViewMode ) 285 if ( !m_bSingleViewMode )
@@ -597,5 +598,5 @@ bool KateDocument::isModified() const {
597void KateDocument::readConfig() 598void KateDocument::readConfig()
598{ 599{
599 KConfig *config = KGlobal::config(); 600 KateConfig *config = KGlobal::config();
600 config->setGroup("Kate Document"); 601 config->setGroup("Kate Document");
601 602
@@ -609,18 +610,17 @@ void KateDocument::readConfig()
609 m_singleSelection = config->readBoolEntry("SingleSelection", false); 610 m_singleSelection = config->readBoolEntry("SingleSelection", false);
610 myEncoding = config->readEntry("Encoding", QString::fromLatin1(QTextCodec::codecForLocale()->name())); 611 myEncoding = config->readEntry("Encoding", QString::fromLatin1(QTextCodec::codecForLocale()->name()));
611 setFont (config->readFontEntry("Font", &myFont)); 612 setFont (config->readFontEntry("Font", myFont));
612 613
613 colors[0] = config->readColorEntry("Color Background", &colors[0]); 614 colors[0] = config->readColorEntry("Color Background", colors[0]);
614 colors[1] = config->readColorEntry("Color Selected", &colors[1]); 615 colors[1] = config->readColorEntry("Color Selected", colors[1]);
615 616
616 config->sync(); 617// config->sync();
617} 618}
618 619
619void KateDocument::writeConfig() 620void KateDocument::writeConfig()
620{ 621{
621 KConfig *config = KGlobal::config(); 622 KateConfig *config = KGlobal::config();
622 config->setGroup("Kate Document"); 623 config->setGroup("Kate Document");
623#if 0 624 config->writeEntry("Word Wrap On", myWordWrap);
624 cofig->writeEntry("Word Wrap On", myWordWrap);
625 config->writeEntry("Word Wrap At", myWordWrapAt); 625 config->writeEntry("Word Wrap At", myWordWrapAt);
626 config->writeEntry("TabWidth", tabChars); 626 config->writeEntry("TabWidth", tabChars);
@@ -631,9 +631,8 @@ void KateDocument::writeConfig()
631 config->writeEntry("Color Background", colors[0]); 631 config->writeEntry("Color Background", colors[0]);
632 config->writeEntry("Color Selected", colors[1]); 632 config->writeEntry("Color Selected", colors[1]);
633#endif 633// config->sync();
634 config->sync();
635} 634}
636 635
637void KateDocument::readSessionConfig(KConfig *config) 636void KateDocument::readSessionConfig(KateConfig *config)
638{ 637{
639 m_url = config->readEntry("URL"); // ### doesn't this break the encoding? (Simon) 638 m_url = config->readEntry("URL"); // ### doesn't this break the encoding? (Simon)
@@ -649,5 +648,5 @@ void KateDocument::readSessionConfig(KConfig *config)
649} 648}
650 649
651void KateDocument::writeSessionConfig(KConfig *config) 650void KateDocument::writeSessionConfig(KateConfig *config)
652{ 651{
653#if 0 652#if 0