mirror of https://github.com/GNOME/gimp.git
Bug 760362 - gimp-swap-colors not changed 'on the fly' when icon-theme changes
GimpFgBgEditor: free the cached icons in GtkWidget::style_set().
This commit is contained in:
parent
2560ad60fa
commit
0c2797c22e
|
@ -71,6 +71,8 @@ static void gimp_fg_bg_editor_get_property (GObject *object,
|
|||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gimp_fg_bg_editor_style_set (GtkWidget *widget,
|
||||
GtkStyle *prev_style);
|
||||
static gboolean gimp_fg_bg_editor_expose (GtkWidget *widget,
|
||||
GdkEventExpose *eevent);
|
||||
static gboolean gimp_fg_bg_editor_button_press (GtkWidget *widget,
|
||||
|
@ -120,6 +122,7 @@ gimp_fg_bg_editor_class_init (GimpFgBgEditorClass *klass)
|
|||
object_class->set_property = gimp_fg_bg_editor_set_property;
|
||||
object_class->get_property = gimp_fg_bg_editor_get_property;
|
||||
|
||||
widget_class->style_set = gimp_fg_bg_editor_style_set;
|
||||
widget_class->expose_event = gimp_fg_bg_editor_expose;
|
||||
widget_class->button_press_event = gimp_fg_bg_editor_button_press;
|
||||
widget_class->button_release_event = gimp_fg_bg_editor_button_release;
|
||||
|
@ -222,6 +225,27 @@ gimp_fg_bg_editor_get_property (GObject *object,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_fg_bg_editor_style_set (GtkWidget *widget,
|
||||
GtkStyle *prev_style)
|
||||
{
|
||||
GimpFgBgEditor *editor = GIMP_FG_BG_EDITOR (widget);
|
||||
|
||||
GTK_WIDGET_CLASS (parent_class)->style_set (widget, prev_style);
|
||||
|
||||
if (editor->default_icon)
|
||||
{
|
||||
g_object_unref (editor->default_icon);
|
||||
editor->default_icon = NULL;
|
||||
}
|
||||
|
||||
if (editor->swap_icon)
|
||||
{
|
||||
g_object_unref (editor->swap_icon);
|
||||
editor->swap_icon = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_fg_bg_editor_expose (GtkWidget *widget,
|
||||
GdkEventExpose *eevent)
|
||||
|
|
Loading…
Reference in New Issue