GSettingsBackend: emit changes to correct thread
authorRyan Lortie <desrt@desrt.ca>
Tue, 6 Sep 2011 18:01:52 +0000 (14:01 -0400)
committerRyan Lortie <desrt@desrt.ca>
Tue, 6 Sep 2011 18:07:16 +0000 (14:07 -0400)
When g_settings_apply() is called on a delayed settings backend and
there is a D-Bus error when communicating with dconf-service, recent
versions of the dconf GSettingsBackend call a function in GLib that
improperly delivered the signal directly instead of using
g_main_context_invoke().

This patch fixes this function to route in the same way as the others so
that the signal is dispatched in the proper GMainContext.

gio/gsettingsbackend.c

index 4757d63..71341ce 100644 (file)
@@ -676,7 +676,6 @@ g_settings_backend_changed_tree (GSettingsBackend *backend,
                                  GTree            *tree,
                                  gpointer          origin_tag)
 {
-  GSettingsBackendWatch *watch;
   const gchar **keys;
   gchar *path;
 
@@ -696,10 +695,7 @@ g_settings_backend_changed_tree (GSettingsBackend *backend,
   }
 #endif
 
-  for (watch = backend->priv->watches; watch; watch = watch->next)
-    watch->vtable->keys_changed (watch->target, backend,
-                                 path, keys, origin_tag);
-
+  g_settings_backend_keys_changed (backend, path, keys, origin_tag);
   g_free (path);
   g_free (keys);
 }