summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-03 20:48:45 +0100
committerStefano Karapetsas <[email protected]>2012-11-03 20:48:45 +0100
commit89da311b36aab8dbd39d33a4e49a62a32b594c97 (patch)
treed79e02f3b060ceca631e233bd0f7f4dbc7a503ae
parent994009c15ad8198dc38964bf49823e90609d4029 (diff)
downloadmate-screensaver-89da311b36aab8dbd39d33a4e49a62a32b594c97.tar.bz2
mate-screensaver-89da311b36aab8dbd39d33a4e49a62a32b594c97.tar.xz
use background system settings from latest libmate-desktopmate-screensaver-1.5.0
-rw-r--r--configure.ac6
-rw-r--r--src/gs-manager.c61
2 files changed, 8 insertions, 59 deletions
diff --git a/configure.ac b/configure.ac
index 24d20a2..f70ad46 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,9 +48,9 @@ GLIB_REQUIRED_VERSION=2.15.0
GDK_REQUIRED_VERSION=2.14.0
GTK_REQUIRED_VERSION=2.11.5
X11_REQUIRED_VERSION=1.0
-LIBMATE_MENU_REQUIRED_VERSION=1.1.0
-MATE_DESKTOP_REQUIRED_VERSION=1.1.0
-LIBMATEKBDUI_REQUIRED_VERSION=1.1.0
+LIBMATE_MENU_REQUIRED_VERSION=1.5.0
+MATE_DESKTOP_REQUIRED_VERSION=1.5.3
+LIBMATEKBDUI_REQUIRED_VERSION=1.5.0
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(crypt.h sys/select.h)
diff --git a/src/gs-manager.c b/src/gs-manager.c
index b4db80f..276b0c3 100644
--- a/src/gs-manager.c
+++ b/src/gs-manager.c
@@ -53,7 +53,6 @@ struct GSManagerPrivate
GHashTable *jobs;
GSThemeManager *theme_manager;
- GSettings *settings;
MateBG *bg;
/* Policy */
@@ -1032,47 +1031,6 @@ on_bg_changed (MateBG *bg,
gs_debug ("background changed");
}
-static gboolean
-background_settings_change_event_cb (GSettings *settings,
- gpointer keys,
- gint n_keys,
- GSManager *manager)
-{
-#if 0
- /* FIXME: since we bind user settings instead of system ones,
- * watching for changes is no longer valid.
- */
- mate_bg_load_from_preferences (manager->priv->bg);
-#endif
-
- return FALSE;
-}
-
-static GSettings *
-get_system_settings (void)
-{
- GSettings *settings;
- gchar **keys;
- gchar **k;
-
- /* FIXME: we need to bind system settings instead of user but
- * that's currently impossible, not implemented yet.
- * Hence, reset to system default values.
- */
- /* TODO: Ideally we would like to bind some other key, screensaver-specific. */
- settings = g_settings_new ("org.mate.background");
-
- g_settings_delay (settings);
-
- keys = g_settings_list_keys (settings);
- for (k = keys; *k; k++) {
- g_settings_reset (settings, *k);
- }
- g_strfreev (keys);
-
- return settings;
-}
-
static void
gs_manager_init (GSManager *manager)
{
@@ -1082,19 +1040,14 @@ gs_manager_init (GSManager *manager)
manager->priv->grab = gs_grab_new ();
manager->priv->theme_manager = gs_theme_manager_new ();
- manager->priv->settings = get_system_settings ();
- manager->priv->bg = mate_bg_new ();
+ manager->priv->bg = mate_bg_new ();
g_signal_connect (manager->priv->bg,
- "changed",
- G_CALLBACK (on_bg_changed),
- manager);
- g_signal_connect (manager->priv->settings,
- "change-event",
- G_CALLBACK (background_settings_change_event_cb),
- manager);
+ "changed",
+ G_CALLBACK (on_bg_changed),
+ manager);
- mate_bg_load_from_preferences (manager->priv->bg);
+ mate_bg_load_from_system_preferences (manager->priv->bg);
}
static void
@@ -1709,10 +1662,6 @@ gs_manager_finalize (GObject *object)
{
g_object_unref (manager->priv->bg);
}
- if (manager->priv->settings != NULL) {
- g_settings_revert (manager->priv->settings);
- g_object_unref (manager->priv->settings);
- }
free_themes (manager);
g_free (manager->priv->logout_command);