revert r7973 because it broke color scheme notifications, and add a
2007-08-08 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (gtk_theme_changed): revert r7973 because it broke color scheme notifications, and add a comment * appearance-themes.c: (theme_setting_changed_cb), (themes_init): connect to some signals from GtkSettings instead of GConf svn path=/trunk/; revision=7980
This commit is contained in:
parent
72c7c152b9
commit
159ede4aea
3 changed files with 31 additions and 9 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-08-08 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* appearance-style.c: (gtk_theme_changed): revert r7973 because it
|
||||
broke color scheme notifications, and add a comment
|
||||
* appearance-themes.c: (theme_setting_changed_cb), (themes_init):
|
||||
connect to some signals from GtkSettings instead of GConf
|
||||
|
||||
2007-08-07 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* appearance-desktop.c: (wp_add_images), (wp_dragged_image),
|
||||
|
|
|
@ -305,11 +305,24 @@ gtk_theme_changed (GConfPropertyEditor *peditor,
|
|||
const gchar *name;
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
|
||||
if (value && (name = gconf_value_get_string (value)))
|
||||
if (value && (name = gconf_value_get_string (value))) {
|
||||
gchar *current;
|
||||
|
||||
theme = gnome_theme_info_find (name);
|
||||
|
||||
check_color_schemes_enabled (settings, data);
|
||||
update_color_buttons_from_settings (settings, data);
|
||||
/* Manually update GtkSettings to new gtk+ theme.
|
||||
* This will eventually happen anyway, but we need the
|
||||
* info for the color scheme updates already. */
|
||||
g_object_get (settings, "gtk-theme-name", ¤t, NULL);
|
||||
|
||||
if (strcmp (current, name) != 0)
|
||||
g_object_set (settings, "gtk-theme-name", name, NULL);
|
||||
|
||||
g_free (current);
|
||||
|
||||
check_color_schemes_enabled (settings, data);
|
||||
update_color_buttons_from_settings (settings, data);
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (glade_xml_get_widget (data->xml, "gtk_themes_delete"),
|
||||
gnome_theme_is_writable (theme, GNOME_THEME_TYPE_REGULAR));
|
||||
|
|
|
@ -693,9 +693,9 @@ theme_details_changed_cb (AppearanceData *data)
|
|||
}
|
||||
|
||||
static void
|
||||
theme_color_scheme_changed_cb (GObject *settings,
|
||||
GParamSpec *pspec,
|
||||
AppearanceData *data)
|
||||
theme_setting_changed_cb (GObject *settings,
|
||||
GParamSpec *pspec,
|
||||
AppearanceData *data)
|
||||
{
|
||||
theme_details_changed_cb (data);
|
||||
}
|
||||
|
@ -799,6 +799,7 @@ themes_init (AppearanceData *data)
|
|||
GnomeThemeMetaInfo *meta_theme = NULL;
|
||||
GtkIconView *icon_view;
|
||||
GtkCellRenderer *renderer;
|
||||
GtkSettings *settings;
|
||||
|
||||
/* initialise some stuff */
|
||||
gnome_theme_init (NULL);
|
||||
|
@ -903,15 +904,16 @@ themes_init (AppearanceData *data)
|
|||
/* listen to gconf changes, too */
|
||||
gconf_client_add_dir (data->client, "/apps/metacity/general", GCONF_CLIENT_PRELOAD_NONE, NULL);
|
||||
gconf_client_add_dir (data->client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_NONE, NULL);
|
||||
gconf_client_notify_add (data->client, GTK_THEME_KEY, (GConfClientNotifyFunc) theme_gconf_changed, data, NULL, NULL);
|
||||
gconf_client_notify_add (data->client, METACITY_THEME_KEY, (GConfClientNotifyFunc) theme_gconf_changed, data, NULL, NULL);
|
||||
gconf_client_notify_add (data->client, ICON_THEME_KEY, (GConfClientNotifyFunc) theme_gconf_changed, data, NULL, NULL);
|
||||
gconf_client_notify_add (data->client, BACKGROUND_KEY, (GConfClientNotifyFunc) background_or_font_changed, data, NULL, NULL);
|
||||
gconf_client_notify_add (data->client, APPLICATION_FONT_KEY, (GConfClientNotifyFunc) background_or_font_changed, data, NULL, NULL);
|
||||
gconf_client_notify_add (data->client, DESKTOP_FONT_KEY, (GConfClientNotifyFunc) background_or_font_changed, data, NULL, NULL);
|
||||
gconf_client_notify_add (data->client, MONOSPACE_FONT_KEY, (GConfClientNotifyFunc) background_or_font_changed, data, NULL, NULL);
|
||||
|
||||
g_signal_connect (gtk_settings_get_default (), "notify::gtk-color-scheme", (GCallback) theme_color_scheme_changed_cb, data);
|
||||
settings = gtk_settings_get_default ();
|
||||
g_signal_connect (settings, "notify::gtk-color-scheme", (GCallback) theme_setting_changed_cb, data);
|
||||
g_signal_connect (settings, "notify::gtk-theme-name", (GCallback) theme_setting_changed_cb, data);
|
||||
g_signal_connect (settings, "notify::gtk-icon-theme-name", (GCallback) theme_setting_changed_cb, data);
|
||||
|
||||
if (is_locked_down (data->client)) {
|
||||
/* FIXME: determine what needs disabling */
|
||||
|
|
Loading…
Add table
Reference in a new issue