summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gs-prefs.c65
1 files changed, 9 insertions, 56 deletions
diff --git a/src/gs-prefs.c b/src/gs-prefs.c
index e9d42e2..0d2bea0 100644
--- a/src/gs-prefs.c
+++ b/src/gs-prefs.c
@@ -56,6 +56,15 @@ static void gs_prefs_finalize (GObject *object);
#define KEY_KEYBOARD_COMMAND "embedded-keyboard-command"
#define KEY_STATUS_MESSAGE_ENABLED "status-message-enabled"
+#define _gs_prefs_set_idle_activation_enabled(x,y) ((x)->idle_activation_enabled = ((y) != FALSE))
+#define _gs_prefs_set_lock_enabled(x,y) ((x)->lock_enabled = ((y) != FALSE))
+#define _gs_prefs_set_lock_disabled(x,y) ((x)->lock_disabled = ((y) != FALSE))
+#define _gs_prefs_set_user_switch_disabled(x,y) ((x)->user_switch_disabled = ((y) != FALSE))
+#define _gs_prefs_set_keyboard_enabled(x,y) ((x)->keyboard_enabled = ((y) != FALSE))
+#define _gs_prefs_set_status_message_enabled(x,y) ((x)->status_message_enabled = ((y) != FALSE))
+#define _gs_prefs_set_logout_enabled(x,y) ((x)->logout_enabled = ((y) != FALSE))
+#define _gs_prefs_set_user_switch_enabled(x,y) ((x)->user_switch_enabled = ((y) != FALSE))
+
struct GSPrefsPrivate
{
GSettings *settings;
@@ -212,41 +221,6 @@ _gs_prefs_set_themes (GSPrefs *prefs,
}
static void
-_gs_prefs_set_idle_activation_enabled (GSPrefs *prefs,
- gboolean value)
-{
- prefs->idle_activation_enabled = (value != FALSE);
-}
-
-static void
-_gs_prefs_set_lock_enabled (GSPrefs *prefs,
- gboolean value)
-{
- prefs->lock_enabled = (value != FALSE);
-}
-
-static void
-_gs_prefs_set_lock_disabled (GSPrefs *prefs,
- gboolean value)
-{
- prefs->lock_disabled = (value != FALSE);
-}
-
-static void
-_gs_prefs_set_user_switch_disabled (GSPrefs *prefs,
- gboolean value)
-{
- prefs->user_switch_disabled = (value != FALSE);
-}
-
-static void
-_gs_prefs_set_keyboard_enabled (GSPrefs *prefs,
- gboolean value)
-{
- prefs->keyboard_enabled = (value != FALSE);
-}
-
-static void
_gs_prefs_set_keyboard_command (GSPrefs *prefs,
const char *value)
{
@@ -262,20 +236,6 @@ _gs_prefs_set_keyboard_command (GSPrefs *prefs,
}
static void
-_gs_prefs_set_status_message_enabled (GSPrefs *prefs,
- gboolean enabled)
-{
- prefs->status_message_enabled = (enabled != FALSE);
-}
-
-static void
-_gs_prefs_set_logout_enabled (GSPrefs *prefs,
- gboolean value)
-{
- prefs->logout_enabled = (value != FALSE);
-}
-
-static void
_gs_prefs_set_logout_command (GSPrefs *prefs,
const char *value)
{
@@ -306,13 +266,6 @@ _gs_prefs_set_logout_timeout (GSPrefs *prefs,
}
static void
-_gs_prefs_set_user_switch_enabled (GSPrefs *prefs,
- gboolean value)
-{
- prefs->user_switch_enabled = (value != FALSE);
-}
-
-static void
gs_prefs_load_from_settings (GSPrefs *prefs)
{
glong value;