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

List:       kde-commits
Subject:    kdegames/ktron
From:       Benjamin Meyer <benjamin () csh ! rit ! edu>
Date:       2003-02-28 15:17:13
[Download RAW message or body]

CVS commit by bmeyer: 

No longer saves its own size or statusbar settings.  KMainWindow does
it now.


  M +3 -19     ktron.cpp   1.39
  M +0 -1      ktron.h   1.11
  M +2 -2      main.cpp   1.14


--- kdegames/ktron/ktron.cpp  #1.38:1.39
@@ -91,4 +91,7 @@ KTron::KTron() : settings(0) {
 
   createGUI();
+  resize(400,300);
+  setAutoSaveSettings();
+  showStatusbar->setChecked(!statusBar()->isHidden());
   readSettings();
 }
@@ -96,13 +99,4 @@ KTron::KTron() : settings(0) {
 void KTron::readSettings() {
    KConfig *config=kapp->config();
-   config->setGroup("Window");
-   
-   bool visible=config->readBoolEntry("Statusbar",true);
-   showStatusbar->setChecked(visible);
-   
-   int width=config->readNumEntry("Width",400);
-   int height=config->readNumEntry("Height",300);
-   resize(width,height);
-
    config->setGroup("Game");
    playerName[0]=config->readEntry("Name_Pl1");
@@ -118,15 +112,5 @@ void KTron::readSettings() {
 // Destructor
 KTron::~KTron(){
-  saveSettings();
   delete tron;
-}
-
-void KTron::saveSettings() {
-  KConfig *config=kapp->config();
-  KConfigGroupSaver saver(config,"Window");
-
-  config->writeEntry("Statusbar", showStatusbar->isChecked());
-  config->writeEntry("Width",width());
-  config->writeEntry("Height",height());
 }
 

--- kdegames/ktron/ktron.h  #1.10:1.11
@@ -56,5 +56,4 @@ private:
 
   void updateStatusbar();
-  void saveSettings();
 
 protected:

--- kdegames/ktron/main.cpp  #1.13:1.14
@@ -40,5 +40,5 @@ int main(int argc, char* argv[])
     KTRON_VERSION, description, KAboutData::License_GPL, notice);
   aboutData.addAuthor("Matthias Kiefer",I18N_NOOP("Original author"), "matthias.kiefer@gmx.de");
-  aboutData.addAuthor("Benjamin Meyer",0, "ben@meyerhome.net");
+  aboutData.addAuthor("Benjamin Meyer",I18N_NOOP("Various improvements"), "ben@meyerhome.net");
   KCmdLineArgs::init( argc, argv, &aboutData );
 
@@ -53,5 +53,5 @@ int main(int argc, char* argv[])
   }
   else {
-     KTron* ktron = new KTron;
+     KTron *ktron = new KTron();
      a.setMainWidget(ktron);
      ktron->show();


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

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