[glib] Revert "GSettings: fix check for delaying backend subscription"



commit 7fff264777ac9869ff347dd2bb02304e11d83a20
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Sep 1 10:18:23 2015 -0400

    Revert "GSettings: fix check for delaying backend subscription"
    
    This reverts commit d511d6b37f051d2cd8698055cbd85ee7f987325d.

 gio/gsettings.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/gio/gsettings.c b/gio/gsettings.c
index ac6417c..35e9441 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -426,24 +426,18 @@ g_settings_real_writable_change_event (GSettings *settings,
 }
 
 static gboolean
-g_settings_has_signal_handlers (GSettings   *settings,
-                                const gchar *key)
+g_settings_has_signal_handlers (GSettings *settings)
 {
   GSettingsClass *class = G_SETTINGS_GET_CLASS (settings);
-  GQuark keyq;
 
   if (class->change_event != g_settings_real_change_event ||
       class->writable_change_event != g_settings_real_writable_change_event)
     return TRUE;
 
-  keyq = g_quark_from_string (key);
-
   if (g_signal_has_handler_pending (settings, g_settings_signals[SIGNAL_WRITABLE_CHANGE_EVENT], 0, TRUE) ||
       g_signal_has_handler_pending (settings, g_settings_signals[SIGNAL_WRITABLE_CHANGED], 0, TRUE) ||
-      g_signal_has_handler_pending (settings, g_settings_signals[SIGNAL_WRITABLE_CHANGED], keyq, TRUE) ||
       g_signal_has_handler_pending (settings, g_settings_signals[SIGNAL_CHANGE_EVENT], 0, TRUE) ||
-      g_signal_has_handler_pending (settings, g_settings_signals[SIGNAL_CHANGED], 0, TRUE) ||
-      g_signal_has_handler_pending (settings, g_settings_signals[SIGNAL_CHANGED], keyq, TRUE))
+      g_signal_has_handler_pending (settings, g_settings_signals[SIGNAL_CHANGED], 0, TRUE))
     return TRUE;
 
   /* None of that?  Then surely nobody is watching.... */
@@ -1193,7 +1187,7 @@ g_settings_read_from_backend (GSettings          *settings,
   gchar *path;
 
   /* If we are not yet watching for changes, consider doing it now... */
-  if (!settings->priv->is_subscribed && g_settings_has_signal_handlers (settings, key->name))
+  if (!settings->priv->is_subscribed && g_settings_has_signal_handlers (settings))
     {
       g_settings_backend_subscribe (settings->priv->backend, settings->priv->path);
       settings->priv->is_subscribed = TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]