summaryrefslogtreecommitdiff
path: root/capplet/gsp-keyfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'capplet/gsp-keyfile.h')
-rw-r--r--capplet/gsp-keyfile.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/capplet/gsp-keyfile.h b/capplet/gsp-keyfile.h
index 5ae6b11..6e0b4ca 100644
--- a/capplet/gsp-keyfile.h
+++ b/capplet/gsp-keyfile.h
@@ -34,6 +34,8 @@ extern "C" {
#endif
#define GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED "X-MATE-Autostart-enabled"
+#define GSP_KEY_FILE_DESKTOP_KEY_GNOME_DELAY "X-GNOME-Autostart-Delay"
+#define GSP_KEY_FILE_DESKTOP_KEY_DELAY "X-MATE-Autostart-Delay"
void gsp_key_file_populate (GKeyFile *keyfile);
@@ -46,6 +48,9 @@ gboolean gsp_key_file_get_boolean (GKeyFile *keyfile,
gboolean default_value);
#define gsp_key_file_get_string(key_file, key) \
g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, key, NULL)
+#define gsp_key_file_get_delay(key_file) \
+ (g_key_file_get_integer (key_file, G_KEY_FILE_DESKTOP_GROUP, GSP_KEY_FILE_DESKTOP_KEY_GNOME_DELAY, NULL) + \
+ g_key_file_get_integer (key_file, G_KEY_FILE_DESKTOP_GROUP, GSP_KEY_FILE_DESKTOP_KEY_DELAY, NULL))
#define gsp_key_file_get_locale_string(key_file, key) \
g_key_file_get_locale_string(key_file, G_KEY_FILE_DESKTOP_GROUP, key, NULL, NULL)
@@ -53,6 +58,12 @@ gboolean gsp_key_file_get_boolean (GKeyFile *keyfile,
g_key_file_set_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, key, value)
#define gsp_key_file_set_string(key_file, key, value) \
g_key_file_set_string (key_file, G_KEY_FILE_DESKTOP_GROUP, key, value)
+#define gsp_key_file_set_delay(key_file, value) \
+ do { \
+ if (g_key_file_has_key (key_file, G_KEY_FILE_DESKTOP_GROUP, GSP_KEY_FILE_DESKTOP_KEY_GNOME_DELAY, NULL)) \
+ g_key_file_remove_key (key_file, G_KEY_FILE_DESKTOP_GROUP, GSP_KEY_FILE_DESKTOP_KEY_GNOME_DELAY, NULL); \
+ g_key_file_set_integer(key_file, G_KEY_FILE_DESKTOP_GROUP, GSP_KEY_FILE_DESKTOP_KEY_DELAY, value); \
+ } while (0);
void gsp_key_file_set_locale_string (GKeyFile *keyfile,
const gchar *key,
const gchar *value);