Bug 92604 - the path is not listed in the export to graphics file dialog
Summary: the path is not listed in the export to graphics file dialog
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Andrew Walker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-02 21:05 UTC by Netterfield
Modified: 2004-11-03 20:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Netterfield 2004-11-02 21:05:55 UTC
Version:           1.0.0_pre1 (using KDE 3.3.0, Gentoo)
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.8-gentoo-r3

In the "Export to Graphics File Dialog" the default is to save to the cwd from which kst was run, which is fine.  However, there is no visual clue as to what directory that might be.

The correct behavior is to have the cwd pre-listed in the selector.
Comment 1 Andrew Walker 2004-11-03 02:11:42 UTC
CVS commit by arwalker: 

CCMAIL: 92604-done@bugs.kde.org


  M +71 -105   graphfiledialog.ui   1.9
  M +11 -9     kstdoc.cpp   1.135
  M +105 -13   kstgraphfiledialog_i.cpp   1.15
  M +6 -3      kstgraphfiledialog_i.h   1.11



Comment 2 Andrew Walker 2004-11-03 20:02:24 UTC
CVS commit by arwalker: 

Further modifications for 92604.

CCMAIL: 92604@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"));
 }