[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kant
Subject:    Re: [Kde-kant] Config files
From:       John Firebaugh <jfire () uclink ! berkeley ! edu>
Date:       2001-03-20 8:22:46
[Download RAW message or body]

On Monday 19 March 2001 05:37 pm, John Firebaugh wrote:
> > Am Montag, 19. März 2001 03:12 schrieb John Firebaugh:
> > > At the moment it appears that kant and kwrite both read config
> > > options from the kantrc file. Is this right? I think kwrite should
> > > have its own config file, kwriterc (same as it used before the
> > > kantpart existed).
> >
> > No, kwrite uses kantpart and kantpart uses kantrc !
> > All kwrite specific stuff is allready in kwriterc.
>
> That's what I mean, kwrite uses kantpart and kantpart uses kantrc, thus
> kwrite uses kantrc. It should store its specific stuff (right now, only
> the show path option, but I intend to add to this) in kwriterc. At the
> moment it does not, it stores it in kantrc.

Here is a patch for this. With it, KWrite will write its stuff to kwriterc, 
and kantpart will write its stuff to kantrc, and everyone is happy.

Someone let me know if they apply this. I'm going to ask for write access 
so I can do these things myself, but I don't have it yet.

later,
John
["kwritemain.cpp.diff" (text/x-diff)]

Index: main/kwritemain.cpp
===================================================================
RCS file: /home/kde/kdebase/kant/main/kwritemain.cpp,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 kwritemain.cpp
--- main/kwritemain.cpp	2001/03/18 14:44:52	1.1
+++ main/kwritemain.cpp	2001/03/20 08:16:07
@@ -118,6 +118,7 @@ bool TopLevel::queryClose()
 bool TopLevel::queryExit()
 {
   writeConfig();
+  kapp->config()->sync();
   KantFactory::instance()->config()->sync();
 
   return true;
@@ -423,7 +424,7 @@ void TopLevel::readConfig() {
   KConfig *config;
   int w, h;
 
-  config = KantFactory::instance()->config();
+  config = kapp->config();
 
   config->setGroup("General Options");
   w = config->readNumEntry("Width", 550);
@@ -432,6 +433,9 @@ void TopLevel::readConfig() {
 
   readConfig(config);
 
+  config = KantFactory::instance()->config();
+
+  config->setGroup("General Options");
   kWrite->readConfig(config);
   kWrite->doc()->readConfig(config);
 }
@@ -441,7 +445,7 @@ void TopLevel::writeConfig()
 {
   KConfig *config;
 
-  config = KantFactory::instance()->config();
+  config = kapp->config();
 
   config->setGroup("General Options");
   config->writeEntry("Width", width());
@@ -449,6 +453,9 @@ void TopLevel::writeConfig()
 
   writeConfig(config);
 
+  config = KantFactory::instance()->config();
+
+  config->setGroup("General Options");
   kWrite->writeConfig(config);
   kWrite->doc()->writeConfig(config);
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic