Commit d5751a77 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

implement GtkWidget::unrealize() and unrealize all GimpViewRenderers.

2005-11-15  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpcontainercombobox.c: implement
	GtkWidget::unrealize() and unrealize all GimpViewRenderers.
	Fixes BadMatch with the renderers' GCs on display change.
parent fb3954ca
2005-11-15 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainercombobox.c: implement
GtkWidget::unrealize() and unrealize all GimpViewRenderers.
Fixes BadMatch with the renderers' GCs on display change.
2005-11-14 Karine Delvare <kdelvare@nerim.net>
* app/tools/gimprectangletool.c: better looking rectangle boundary.
......
......@@ -50,6 +50,8 @@ static void gimp_container_combo_box_init (GimpContainerComboBox *v
static void gimp_container_combo_box_view_iface_init (GimpContainerViewInterface *view_iface);
static void gimp_container_combo_box_unrealize (GtkWidget *widget);
static gpointer gimp_container_combo_box_insert_item (GimpContainerView *view,
GimpViewable *viewable,
gint index);
......@@ -120,13 +122,16 @@ gimp_container_combo_box_get_type (void)
static void
gimp_container_combo_box_class_init (GimpContainerComboBoxClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->set_property = gimp_container_view_set_property;
object_class->get_property = gimp_container_view_get_property;
widget_class->unrealize = gimp_container_combo_box_unrealize;
gimp_container_view_install_properties (object_class);
}
......@@ -255,6 +260,30 @@ gimp_container_combo_box_set (GimpContainerComboBox *combo_box,
g_free (name);
}
static void
gimp_container_combo_box_unrealize (GtkWidget *widget)
{
GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
GtkTreeIter iter;
gboolean iter_valid;
for (iter_valid = gtk_tree_model_get_iter_first (model, &iter);
iter_valid;
iter_valid = gtk_tree_model_iter_next (model, &iter))
{
GimpViewRenderer *renderer;
gtk_tree_model_get (model, &iter,
COLUMN_RENDERER, &renderer,
-1);
gimp_view_renderer_unrealize (renderer);
g_object_unref (renderer);
}
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
/* GimpContainerView methods */
static gpointer
......
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