summaryrefslogtreecommitdiff
path: root/src/logdiag.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-06-10 18:18:58 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2011-06-12 10:05:16 +0200
commitb2223d65951c3ad706d76d35e15df8cf2e17535f (patch)
tree50f8b823c9a115483975f41b7cd2a75401430b22 /src/logdiag.c
parente1e9a6d3198516e9924068b4fab0d4df070a76a5 (diff)
downloadlogdiag-b2223d65951c3ad706d76d35e15df8cf2e17535f.tar.gz
logdiag-b2223d65951c3ad706d76d35e15df8cf2e17535f.tar.xz
logdiag-b2223d65951c3ad706d76d35e15df8cf2e17535f.zip
Integrate GSettings, remember View settings.
The org.logdiag ID has been chosen as I haven't found any specific rules and com.github.logdiag seems not to be future-proof. This domain remains available so far, anyway. The schemas are compiled only when installed directly to CMAKE_INSTALL_PREFIX to the root filesystem. When invoking `make install` with DESTDIR, only the XML files are copied over as the schemas would have to be recompiled later anyway.
Diffstat (limited to 'src/logdiag.c')
-rw-r--r--src/logdiag.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/logdiag.c b/src/logdiag.c
index 1175ec6..904514e 100644
--- a/src/logdiag.c
+++ b/src/logdiag.c
@@ -131,6 +131,15 @@ main (int argc, char *argv[])
}
#endif
+#ifdef PROJECT_GSETTINGS_DIR
+ /* This is enabled when the build is set up for developing, so the
+ * application can find it's schema. It might also find use when
+ * installing the application into a location that's missing from
+ * g_get_system_data_dirs(), for example /usr/local or ~/.local.
+ */
+ g_setenv ("GSETTINGS_SCHEMA_DIR", PROJECT_GSETTINGS_DIR, 0);
+#endif /* PROJECT_GSETTINGS_DIR */
+
gtk_window_set_default_icon_name (PROJECT_NAME);
/* TODO: Be able to open multiple files. */