summaryrefslogtreecommitdiff
path: root/capplet/gsp-keyfile.h
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2018-12-14 18:01:46 +0800
committerlukefromdc <[email protected]>2018-12-21 22:47:02 +0000
commit0e2eb8a311586599bbd3937d413da2f78eedb4d6 (patch)
treec29979d0f3ff1749769bf9668133683fc270725e /capplet/gsp-keyfile.h
parent34ef232530e30a2ebc32d41bae8a112323adbcc2 (diff)
downloadmate-session-manager-0e2eb8a311586599bbd3937d413da2f78eedb4d6.tar.bz2
mate-session-manager-0e2eb8a311586599bbd3937d413da2f78eedb4d6.tar.xz
Add a delay setting to Startup Manager
Fixed issue #127 - capplet/gsm-app-dialog.c - capplet/gsm-app-dialog.h - capplet/gsm-properties-dialog.c - capplet/gsp-app.c - capplet/gsp-app.h - capplet/gsp-keyfile.h - data/session-properties.ui
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);