[Xfce4-commits] [apps/xfce4-screensaver] 380/425: Drop org.xfce.session.gschema.xml
noreply at xfce.org
noreply at xfce.org
Mon Oct 15 01:53:47 CEST 2018
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screensaver.
commit 8685846ed053552368850afc00d54e4f04084194
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Oct 8 07:29:08 2018 -0400
Drop org.xfce.session.gschema.xml
---
data/Makefile.am | 2 +-
data/org.xfce.screensaver.gschema.xml.in | 5 +++
data/org.xfce.session.gschema.xml.in | 68 --------------------------------
po/POTFILES.in | 1 -
src/gs-prefs.c | 17 +-------
src/xfce4-screensaver-preferences.c | 18 ++-------
6 files changed, 12 insertions(+), 99 deletions(-)
diff --git a/data/Makefile.am b/data/Makefile.am
index 13d0f3f..4f9de3b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -43,7 +43,7 @@ dbussessionservice_DATA = org.xfce.ScreenSaver.service
@GSETTINGS_RULES@
@INTLTOOL_XML_NOMERGE_RULE@
-gsettingsschema_in_files = org.xfce.screensaver.gschema.xml.in org.xfce.session.gschema.xml.in
+gsettingsschema_in_files = org.xfce.screensaver.gschema.xml.in
gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
EXTRA_DIST = \
diff --git a/data/org.xfce.screensaver.gschema.xml.in b/data/org.xfce.screensaver.gschema.xml.in
index e806236..7f48840 100644
--- a/data/org.xfce.screensaver.gschema.xml.in
+++ b/data/org.xfce.screensaver.gschema.xml.in
@@ -80,5 +80,10 @@
<summary>Allow the session status message to be displayed</summary>
<description>Allow the session status message to be displayed when the screen is locked.</description>
</key>
+ <key name="idle-delay" type="i">
+ <default>5</default>
+ <summary>Time before session is considered idle</summary>
+ <description>The number of minutes of inactivity before the session is considered idle.</description>
+ </key>
</schema>
</schemalist>
diff --git a/data/org.xfce.session.gschema.xml.in b/data/org.xfce.session.gschema.xml.in
deleted file mode 100644
index 2d2916e..0000000
--- a/data/org.xfce.session.gschema.xml.in
+++ /dev/null
@@ -1,68 +0,0 @@
-<schemalist gettext-domain="@GETTEXT_PACKAGE@">
- <schema id="org.xfce.session" path="/org/xfce/desktop/session/">
- <key name="session-start" type="i">
- <default>0</default>
- <summary>Current session start time</summary>
- <description>Unix time of the start of the current session.</description>
- </key>
- <key name="auto-save-session" type="b">
- <default>false</default>
- <summary>Save sessions</summary>
- <description>If enabled, xfce-session will save the session automatically.</description>
- </key>
- <key name="logout-prompt" type="b">
- <default>true</default>
- <summary>Logout prompt</summary>
- <description>If enabled, xfce-session will prompt the user before ending a session.</description>
- </key>
- <key name="logout-timeout" type="i">
- <default>60</default>
- <range min="0" max="300"/>
- <summary>Logout timeout</summary>
- <description>If logout prompt is enabled, this set the timeout in seconds before logout automatically. If 0, automatic logout is disabled.</description>
- </key>
- <key name="idle-delay" type="i">
- <default>5</default>
- <summary>Time before session is considered idle</summary>
- <description>The number of minutes of inactivity before the session is considered idle.</description>
- </key>
- <key name="default-session" type="as">
- <default>[ 'xfce-settings-daemon' ]</default>
- <summary>Default session</summary>
- <description>List of applications that are part of the default session.</description>
- </key>
- <key name="required-components-list" type="as">
- <default>[ 'windowmanager', 'panel', 'filemanager', 'dock' ]</default>
- <summary>Required session components</summary>
- <description>List of components that are required as part of the session. (Each element names a key under "/org/xfce/desktop/session/required_components"). The Startup Applications preferences tool will not normally allow users to remove a required component from the session, and the session manager will automatically add the required components back to the session at login time if they do get removed.</description>
- </key>
- <key name="gnome-compat-startup" type="as">
- <default>[ 'keyring', 'smproxy' ]</default>
- <summary>Control gnome compatibility component startup</summary>
- <description>Control which compatibility components to start.</description>
- </key>
- <child name="required-components" schema="org.xfce.session.required-components"/>
- </schema>
- <schema id="org.xfce.session.required-components" path="/org/xfce/desktop/session/required-components/">
- <key name="windowmanager" type="s">
- <default>'marco'</default>
- <summary>Window Manager</summary>
- <description>The window manager is the program that draws the title bar and borders around windows, and allows you to move and resize windows.</description>
- </key>
- <key name="panel" type="s">
- <default>'xfce-panel'</default>
- <summary>Panel</summary>
- <description>The panel provides the bar at the top or bottom of the screen containing menus, the window list, status icons, the clock, etc.</description>
- </key>
- <key name="filemanager" type="s">
- <default>'caja'</default>
- <summary>File Manager</summary>
- <description>The file manager provides the desktop icons and allows you to interact with your saved files.</description>
- </key>
- <key name="dock" type="s">
- <default>''</default>
- <summary>Dock</summary>
- <description>A dock provides a dockable area, similar to a panel, for launching and switching applications.</description>
- </key>
- </schema>
-</schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d02c8df..dc7e058 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,7 +3,6 @@
data/images/cosmos/cosmos.xml.in.in
[type: gettext/glade]data/lock-dialog-default.ui
[type: gettext/gsettings]data/org.xfce.screensaver.gschema.xml.in
-[type: gettext/gsettings]data/org.xfce.session.gschema.xml.in
data/xfce4-screensaver-preferences.desktop.in
[type: gettext/glade]data/xfce4-screensaver-preferences.ui
data/xfce4-screensaver.directory.in
diff --git a/src/gs-prefs.c b/src/gs-prefs.c
index c071a36..967604c 100644
--- a/src/gs-prefs.c
+++ b/src/gs-prefs.c
@@ -34,9 +34,6 @@ static void gs_prefs_class_init (GSPrefsClass *klass);
static void gs_prefs_init (GSPrefs *prefs);
static void gs_prefs_finalize (GObject *object);
-#define SESSION_SETTINGS_SCHEMA "org.xfce.session"
-#define KEY_IDLE_DELAY "idle-delay"
-
#define GSETTINGS_SCHEMA "org.xfce.screensaver"
#define KEY_IDLE_ACTIVATION_ENABLED "idle-activation-enabled"
#define KEY_LOCK_ENABLED "lock-enabled"
@@ -52,13 +49,13 @@ static void gs_prefs_finalize (GObject *object);
#define KEY_KEYBOARD_ENABLED "embedded-keyboard-enabled"
#define KEY_KEYBOARD_COMMAND "embedded-keyboard-command"
#define KEY_STATUS_MESSAGE_ENABLED "status-message-enabled"
+#define KEY_IDLE_DELAY "idle-delay"
#define GS_PREFS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_PREFS, GSPrefsPrivate))
struct GSPrefsPrivate
{
GSettings *settings;
- GSettings *session_settings;
};
enum
@@ -316,7 +313,7 @@ gs_prefs_load_from_settings (GSPrefs *prefs)
bvalue = g_settings_get_boolean (prefs->priv->settings, KEY_LOCK_ENABLED);
_gs_prefs_set_lock_enabled (prefs, bvalue);
- value = g_settings_get_int (prefs->priv->session_settings, KEY_IDLE_DELAY);
+ value = g_settings_get_int (prefs->priv->settings, KEY_IDLE_DELAY);
_gs_prefs_set_timeout (prefs, value);
value = g_settings_get_int (prefs->priv->settings, KEY_POWER_DELAY);
@@ -508,11 +505,6 @@ gs_prefs_init (GSPrefs *prefs)
"changed",
G_CALLBACK (key_changed_cb),
prefs);
- prefs->priv->session_settings = g_settings_new (SESSION_SETTINGS_SCHEMA);
- g_signal_connect (prefs->priv->session_settings,
- "changed::" KEY_IDLE_DELAY,
- G_CALLBACK (key_changed_cb),
- prefs);
prefs->idle_activation_enabled = TRUE;
prefs->lock_enabled = TRUE;
@@ -548,11 +540,6 @@ gs_prefs_finalize (GObject *object)
prefs->priv->settings = NULL;
}
- if (prefs->priv->session_settings) {
- g_object_unref (prefs->priv->session_settings);
- prefs->priv->session_settings = NULL;
- }
-
if (prefs->themes)
{
g_slist_foreach (prefs->themes, (GFunc)g_free, NULL);
diff --git a/src/xfce4-screensaver-preferences.c b/src/xfce4-screensaver-preferences.c
index 8ae7fa1..ef845b6 100644
--- a/src/xfce4-screensaver-preferences.c
+++ b/src/xfce4-screensaver-preferences.c
@@ -50,9 +50,6 @@
#define GTK_BUILDER_FILE "xfce4-screensaver-preferences.ui"
-#define SESSION_SETTINGS_SCHEMA "org.xfce.session"
-#define KEY_IDLE_DELAY "idle-delay"
-
#define GSETTINGS_SCHEMA "org.xfce.screensaver"
#define KEY_LOCK "lock-enabled"
#define KEY_IDLE_ACTIVATION_ENABLED "idle-activation-enabled"
@@ -60,6 +57,7 @@
#define KEY_LOCK_DELAY "lock-delay"
#define KEY_CYCLE_DELAY "cycle-delay"
#define KEY_THEMES "themes"
+#define KEY_IDLE_DELAY "idle-delay"
#define GPM_COMMAND "xfce4-power-manager-settings"
@@ -87,7 +85,6 @@ static GtkBuilder *builder = NULL;
static GSThemeManager *theme_manager = NULL;
static GSJob *job = NULL;
static GSettings *screensaver_settings = NULL;
-static GSettings *session_settings = NULL;
static gint32
config_get_activate_delay (gboolean *is_writable)
@@ -96,11 +93,11 @@ config_get_activate_delay (gboolean *is_writable)
if (is_writable)
{
- *is_writable = g_settings_is_writable (session_settings,
+ *is_writable = g_settings_is_writable (screensaver_settings,
KEY_IDLE_DELAY);
}
- delay = g_settings_get_int (session_settings, KEY_IDLE_DELAY);
+ delay = g_settings_get_int (screensaver_settings, KEY_IDLE_DELAY);
if (delay < 1)
{
@@ -113,7 +110,7 @@ config_get_activate_delay (gboolean *is_writable)
static void
config_set_activate_delay (gint32 timeout)
{
- g_settings_set_int (session_settings, KEY_IDLE_DELAY, timeout);
+ g_settings_set_int (screensaver_settings, KEY_IDLE_DELAY, timeout);
}
static int
@@ -1568,12 +1565,6 @@ init_capplet (void)
G_CALLBACK (key_changed_cb),
NULL);
- session_settings = g_settings_new (SESSION_SETTINGS_SCHEMA);
- g_signal_connect (session_settings,
- "changed::" KEY_IDLE_DELAY,
- G_CALLBACK (key_changed_cb),
- NULL);
-
activate_delay = config_get_activate_delay (&is_writable);
ui_set_delay (activate_delay);
if (! is_writable)
@@ -1663,7 +1654,6 @@ static void
finalize_capplet (void)
{
g_object_unref (screensaver_settings);
- g_object_unref (session_settings);
}
int
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list