summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-09 21:37:21 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-09 21:37:21 -0700
commited6a54f5066f3220ce357f9cf7686fc4d72079dd (patch)
tree2bac89ffa947d0a96efd611800e14ef83f74c839 /qt-ui
parentaea8493165a98d1653c7adf475ca2267d505bfe8 (diff)
downloadsubsurface-ed6a54f5066f3220ce357f9cf7686fc4d72079dd.tar.gz
Enable defautl_filename in settings
We don't have a UI to set it, yet, so you have to manually set it in the config file, but once you do that it works... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 56ae64b0c..160a657da 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -402,12 +402,6 @@ void MainWindow::readSettings()
prefs.divelist_font = strdup(v.toString);
#endif
-#if DONT_KNOW_HOW_TO_DO_THAT
- v = settings.value(QString("default_filename"));
- if (v.isValid())
- prefs.default_filename = strdup(v.toString);
-#endif
-
#if ONCE_WE_HAVE_MAPS
v = settings.value(QString_int("map_provider"));
if(v.isValid())
@@ -467,6 +461,9 @@ void MainWindow::writeSettings()
SAVE_VALUE("gflow", gflow);
SAVE_VALUE("gfhigh", gfhigh);
settings.endGroup();
+ settings.beginGroup("GeneralSettings");
+ SAVE_VALUE("default_filename", default_filename);
+ settings.endGroup();
}
void MainWindow::closeEvent(QCloseEvent *event)