Commit 0c2797c2 authored by Michael Natterer's avatar Michael Natterer 😴

Bug 760362 - gimp-swap-colors not changed 'on the fly' when icon-theme changes

GimpFgBgEditor: free the cached icons in GtkWidget::style_set().
parent 2560ad60
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment