[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Wed Nov 3 20:02:17 CET 2004


CVS commit by arwalker: 

Further modifications for 92604.

CCMAIL: 92604 at bugs.kde.org


  M +22 -29    kstgraphfiledialog_i.cpp   1.16


--- kdeextragear-2/kst/kst/kstgraphfiledialog_i.cpp  #1.15:1.16
@@ -142,9 +142,10 @@ KURL KstGraphFileDialogI::url() const {
 
 void KstGraphFileDialogI::setURL(const QString& url) {
-  QString path = url;
-  QDir dir(url);
+  QString path;
 
-  if (!dir.exists()) {
+  if (url.isEmpty()) {
     path = QDir::currentDirPath();
+  } else {
+    path = url;
   }
   _url->setURL(path);
@@ -207,16 +208,16 @@ void KstGraphFileDialogI::saveProperties
   KConfig cfg("kstautosaverc", false, false);
 
-  cfg.setGroup("AutoSave");
+  cfg.setGroup("AutoSaveImages");
 
   cfg.writeEntry("AutoSave", _autosave->isChecked());
-  cfg.writeEntry("AutoSaveSeconds", _period->value());
-  cfg.writeEntry("AutoSaveLocation", _url->url());
+  cfg.writeEntry("Seconds", _period->value());
+  cfg.writeEntry("Location", _url->url());
 
-  cfg.writeEntry("AutoSaveXSize", _xSize->value());
-  cfg.writeEntry("AutoSaveYSize", _ySize->value());
-  cfg.writeEntry("AutoSaveSquare", _square->isChecked());
+  cfg.writeEntry("XSize", _xSize->value());
+  cfg.writeEntry("YSize", _ySize->value());
+  cfg.writeEntry("Square", _square->isChecked());
 
-  cfg.writeEntry("AutoSaveAll", _radioButtonAll->isChecked());
-  cfg.writeEntry("AutoSaveFormat", _comboBoxFormats->currentText());
+  cfg.writeEntry("All", _radioButtonAll->isChecked());
+  cfg.writeEntry("Format", _comboBoxFormats->currentText());
 
   cfg.sync();
@@ -230,22 +231,14 @@ void KstGraphFileDialogI::loadProperties
   bool all;
 
-  cfg.setGroup("AutoSave");
+  cfg.setGroup("AutoSaveImages");
 
   _autosave->setChecked(false);
-  _period->setValue(cfg.readNumEntry("AutoSaveSeconds", 15));
-  path = cfg.readEntry("AutoSaveLocation", QDir::currentDirPath());
-  if (!path.isEmpty()) {
-    QDir dir(path);
-
-    if (!dir.exists()) {
-      path = QDir::currentDirPath();
-    }
-    _url->setURL(path);
-    _url->completionObject()->setDir(path);
-  }
+  _period->setValue(cfg.readNumEntry("Seconds", 15));
+  path = cfg.readEntry("Location", "");
+  setURL(path);
 
-  _xSize->setValue(cfg.readNumEntry("AutoSaveXSize", 640));
-  _ySize->setValue(cfg.readNumEntry("AutoSaveYSize", 480));
-  bSquare = cfg.readBoolEntry("AutoSaveSquare", false);
+  _xSize->setValue(cfg.readNumEntry("XSize", 640));
+  _ySize->setValue(cfg.readNumEntry("YSize", 480));
+  bSquare = cfg.readBoolEntry("Square", false);
   if (bSquare) {
     _square->setChecked(true);
@@ -254,5 +247,5 @@ void KstGraphFileDialogI::loadProperties
   }
 
-  all = cfg.readBoolEntry("AutoSaveAll", false);
+  all = cfg.readBoolEntry("All", false);
   if (all) {
     _radioButtonAll->setChecked(true);
@@ -262,5 +255,5 @@ void KstGraphFileDialogI::loadProperties
     _radioButtonActive->setChecked(true);
   }
-  setFormat(cfg.readEntry("AutoSaveFormat", "PNG"));
+  setFormat(cfg.readEntry("Format", "PNG"));
 }
 





More information about the Kst mailing list