summaryrefslogtreecommitdiffstats
path: root/src/gui/main.cpp
diff options
context:
space:
mode:
authorLubos Dolezel <lubos@dolezel.info>2015-06-11 15:16:39 +0200
committerLubos Dolezel <lubos@dolezel.info>2015-06-11 15:16:39 +0200
commitbaedd87c10dabb9178ec870ea43185f4c34795ea (patch)
treefd0e5d9b795796f4c6dcdd72b17960f7f13a45af /src/gui/main.cpp
parentc0fb261ea49f638b49ed68c5eb5385c11ab8d407 (diff)
downloadtwinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.tar
twinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.tar.gz
twinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.tar.lz
twinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.tar.xz
twinkle-baedd87c10dabb9178ec870ea43185f4c34795ea.zip
Remember OSD/popup location (resolves #16)
Diffstat (limited to 'src/gui/main.cpp')
-rw-r--r--src/gui/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index 6401fea..529052e 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -27,6 +27,8 @@
#include <qapplication.h>
#include <qtranslator.h>
#include <qtextcodec.h>
+#include <QSettings>
+#include <QDir>
#include "mphoneform.h"
@@ -165,6 +167,7 @@ pthread_t thread_id_main;
// Indicates if LinuxThreads or NPTL is active.
bool threading_is_LinuxThreads;
+QSettings* g_gui_state;
/**
* Parse arguments passed to application
@@ -511,6 +514,9 @@ QApplication *create_user_interface(bool cli_mode, int argc, char **argv, QTrans
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8"));
QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
#endif
+
+ g_gui_state = new QSettings(QDir::home().absoluteFilePath(QString("%1/%2").arg(DIR_USER).arg("gui_state.ini")),
+ QSettings::IniFormat, qa);
// Install Qt translator
// Do not report to memman as the translator will be deleted