Summary: | the path is not listed in the export to graphics file dialog | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Netterfield <netterfield> |
Component: | general | Assignee: | Andrew Walker <arwalker> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Netterfield
2004-11-02 21:05:55 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 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")); } |