From 7fff264777ac9869ff347dd2bb02304e11d83a20 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 1 Sep 2015 10:18:23 -0400 Subject: [PATCH] Revert "GSettings: fix check for delaying backend subscription" This reverts commit d511d6b37f051d2cd8698055cbd85ee7f987325d. --- gio/gsettings.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/gio/gsettings.c b/gio/gsettings.c index ac6417c10..35e944141 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;