diff --git a/gnome-settings-daemon/ChangeLog b/gnome-settings-daemon/ChangeLog index b421e987f..dba6a697e 100644 --- a/gnome-settings-daemon/ChangeLog +++ b/gnome-settings-daemon/ChangeLog @@ -1,3 +1,9 @@ +2007-04-10 Alexander Larsson + + * utils.c (config_notify): + Also check registered directories for notification. + Fixes theme e.g. switching. + 2007-04-02 Rodrigo Moya * gnome-settings-daemon.c (gnome_settings_daemon_new): return NULL diff --git a/gnome-settings-daemon/utils.c b/gnome-settings-daemon/utils.c index fdd1c2752..a45e3842d 100644 --- a/gnome-settings-daemon/utils.c +++ b/gnome-settings-daemon/utils.c @@ -130,6 +130,7 @@ config_notify (GConfClient *client, gpointer user_data) { GSList *callbacks; + char *dir, *last_slash; callbacks = g_hash_table_lookup (directories, entry->key); if (callbacks) { @@ -137,6 +138,21 @@ config_notify (GConfClient *client, for (sl = callbacks; sl; sl = sl->next) ((GnomeSettingsConfigCallback) sl->data) (entry); } + + /* Also check if the directory, not the specific key was registered */ + + dir = g_strdup (entry->key); + last_slash = strrchr (dir, '/'); + if (last_slash) + *last_slash = 0; + + callbacks = g_hash_table_lookup (directories, dir); + g_free (dir); + if (callbacks) { + GSList *sl; + for (sl = callbacks; sl; sl = sl->next) + ((GnomeSettingsConfigCallback) sl->data) (entry); + } } void