diff options
author | Stephan Arts <stephan@xfce.org> | 2008-10-14 21:10:10 +0000 |
---|---|---|
committer | Stephan Arts <stephan@xfce.org> | 2008-10-14 21:10:10 +0000 |
commit | 42e16d102923c7ce8899749ae93ae2b9d2a02ab0 (patch) | |
tree | c5d399b8085f81b3de0e5ef29603e3615ab5b284 | |
parent | 0d1d406ed842c2d8b395af5e8d58ef6ed228b106 (diff) | |
parent | 5a24a7406e579a78f360c12531540dd9eef44ab8 (diff) |
Re-tag xfce 4.6 beta1xfce-4.6beta1
(Old svn revision: 28257)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | plugins/launcher/launcher.c | 28 |
2 files changed, 17 insertions, 18 deletions
@@ -1,3 +1,10 @@ +2008-10-14 15:49 jannis + + * launcher/launcher.c: Change the way the icon theme change callback + is installed: use gtk_icon_theme_for_screen() in combination with + g_signal_connect() instead of adding a signal emission hook to the + icon theme class. This should fix bug #4474. + 2008-10-13 11:42 stephan * mcs-plugins/*, settings/*, diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c index 18416088..f40f7faf 100644 --- a/plugins/launcher/launcher.c +++ b/plugins/launcher/launcher.c @@ -38,9 +38,7 @@ #include "launcher-dialog.h" /* prototypes */ -static gboolean launcher_utility_icon_theme_changed (GSignalInvocationHint *ihint, - guint n_param_values, - const GValue *param_values, +static void launcher_utility_icon_theme_changed (GtkIconTheme *icon_theme, LauncherPlugin *launcher); static gboolean launcher_icon_button_expose_event (GtkWidget *widget, GdkEventExpose *event, @@ -105,20 +103,15 @@ XFCE_PANEL_PLUGIN_REGISTER_INTERNAL (launcher_plugin_construct); /** * Utility Functions **/ -static gboolean -launcher_utility_icon_theme_changed (GSignalInvocationHint *ihint, - guint n_param_values, - const GValue *param_values, - LauncherPlugin *launcher) +static void +launcher_utility_icon_theme_changed (GtkIconTheme *icon_theme, + LauncherPlugin *launcher) { /* update the button icon */ launcher_icon_button_set_icon (launcher); /* destroy the menu */ launcher_menu_destroy (launcher); - - /* keep hook alive */ - return TRUE; } @@ -815,7 +808,8 @@ static LauncherPlugin* launcher_plugin_new (XfcePanelPlugin *plugin) { LauncherPlugin *launcher; - gpointer klass; + GtkIconTheme *icon_theme; + GdkScreen *screen; /* create launcher structure */ launcher = panel_slice_new0 (LauncherPlugin); @@ -851,12 +845,10 @@ launcher_plugin_new (XfcePanelPlugin *plugin) gtk_button_set_focus_on_click (GTK_BUTTON (launcher->arrow_button), FALSE); /* hook for icon themes changes */ - klass = g_type_class_ref (GTK_TYPE_ICON_THEME); - launcher->theme_timeout_id = - g_signal_add_emission_hook (g_signal_lookup ("changed", GTK_TYPE_ICON_THEME), - 0, (GSignalEmissionHook) launcher_utility_icon_theme_changed, - launcher, NULL); - g_type_class_unref (klass); + screen = gtk_widget_get_screen (launcher->image); + icon_theme = gtk_icon_theme_get_for_screen (screen); + g_signal_connect (G_OBJECT (icon_theme), "changed", + G_CALLBACK (launcher_utility_icon_theme_changed), launcher); /* icon button signals */ g_signal_connect (G_OBJECT (launcher->icon_button), "state-changed", |