summaryrefslogtreecommitdiffstats
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2017-08-11 15:00:33 +0200
committerSimon Rettberg2017-08-11 15:00:33 +0200
commit1a0bb4e833f4a6dbef65f4f4641f9920c13a04fc (patch)
treeb20cba2e068c96973ce6259b73c00e0c2b68c086 /src/settings.cpp
parentinitial commit (diff)
downloadslxgreeter-1a0bb4e833f4a6dbef65f4f4641f9920c13a04fc.tar.gz
slxgreeter-1a0bb4e833f4a6dbef65f4f4641f9920c13a04fc.tar.xz
slxgreeter-1a0bb4e833f4a6dbef65f4f4641f9920c13a04fc.zip
Move code to src/, tweak CMakeLists.txt
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
new file mode 100644
index 0000000..0c37166
--- /dev/null
+++ b/src/settings.cpp
@@ -0,0 +1,21 @@
+#include <QDebug>
+#include <QDir>
+#include "settings.h"
+
+#define BACKGROUND_IMAGE_KEY "greeter-background-image"
+#define LOGINFORM_OFFSETX_KEY "loginform-offset-x"
+#define LOGINFORM_OFFSETY_KEY "loginform-offset-y"
+#define LOGFILE_PATH_KEY "logfile-path"
+
+const QString Cache::GREETER_DATA_DIR_PATH = "/var/lib/lightdm/qt-lightdm-greeter";
+
+void Cache::prepare()
+{
+ QDir dir(GREETER_DATA_DIR_PATH);
+ if (!dir.exists()) {
+ if (!dir.mkpath(GREETER_DATA_DIR_PATH)) {
+ qWarning() << "Unable to create dir" << GREETER_DATA_DIR_PATH;
+ }
+ }
+}
+