summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2005-02-23 17:17:51 +0000
committerElijah Newren <newren@src.gnome.org>2005-02-23 17:17:51 +0000
commit7a5c4625e8014e19b0eac758bd50448373582bb7 (patch)
treea2420819dab9e565f3ec273efb844fe729c29e3b
parent2172ec5fd0d488dfb91d4f50060336bb8bd9852c (diff)
downloadgnome-control-center-gnome-2-8.tar.gz
(Note: Somehow I committed only the ChangeLog for this before withoutgnome-2-8
2005-02-01 Elijah Newren <newren@gmail.com> (Note: Somehow I committed only the ChangeLog for this before without committing the actual patch.) Fix an infinite loop that was bringing single-CPU systems to their knees. Approved by Kjartan. #160803 * gnome-theme-manager.c: (window_settings_changed): keep track of the window manager theme last selected and just exit if we are already using the one we want
-rw-r--r--capplets/theme-switcher/gnome-theme-manager.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/capplets/theme-switcher/gnome-theme-manager.c b/capplets/theme-switcher/gnome-theme-manager.c
index 1d2a6aa7a..9e15fb130 100644
--- a/capplets/theme-switcher/gnome-theme-manager.c
+++ b/capplets/theme-switcher/gnome-theme-manager.c
@@ -920,7 +920,19 @@ static void
window_settings_changed (GnomeWindowManager *window_manager,
GladeXML *dialog)
{
- /* There is no way to know what changed, so we just check it all */
+ static gchar *window_theme = NULL;
+ GnomeWMSettings wm_settings;
+
+ wm_settings.flags = GNOME_WM_SETTING_THEME;
+ gnome_window_manager_get_settings (window_manager, &wm_settings);
+ if (window_theme == NULL || strcmp (wm_settings.theme, window_theme) != 0)
+ {
+ g_free (window_theme);
+ window_theme = g_strdup (wm_settings.theme);
+ }
+ else
+ return;
+
update_settings_from_gconf ();
gnome_theme_details_update_from_gconf ();
}