Commit a8f0162f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

implement GtkWidget::unrealize() and destroy the control pixmap. fixes

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

	* app/widgets/gimpgradienteditor.c: implement GtkWidget::unrealize()
	and destroy the control pixmap. fixes crash when moving the dialog
	to another display.

	* menus/dockable-menu.xml.in: added a separator before the
	"Move to Screen" submenu.
parent 8b6b8f41
2005-11-17 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpgradienteditor.c: implement GtkWidget::unrealize()
and destroy the control pixmap. fixes crash when moving the dialog
to another display.
* menus/dockable-menu.xml.in: added a separator before the
"Move to Screen" submenu.
2005-11-17 Michael Natterer <mitch@gimp.org> 2005-11-17 Michael Natterer <mitch@gimp.org>
* app/actions/window-actions.[ch]: connect to GdkDisplayManager * app/actions/window-actions.[ch]: connect to GdkDisplayManager
......
...@@ -112,6 +112,7 @@ static GObject * gimp_gradient_editor_constructor (GType type, ...@@ -112,6 +112,7 @@ static GObject * gimp_gradient_editor_constructor (GType type,
static void gimp_gradient_editor_destroy (GtkObject *object); static void gimp_gradient_editor_destroy (GtkObject *object);
static void gimp_gradient_editor_unmap (GtkWidget *widget); static void gimp_gradient_editor_unmap (GtkWidget *widget);
static void gimp_gradient_editor_unrealize (GtkWidget *widget);
static void gimp_gradient_editor_set_data (GimpDataEditor *editor, static void gimp_gradient_editor_set_data (GimpDataEditor *editor,
GimpData *data); GimpData *data);
...@@ -289,6 +290,7 @@ gimp_gradient_editor_class_init (GimpGradientEditorClass *klass) ...@@ -289,6 +290,7 @@ gimp_gradient_editor_class_init (GimpGradientEditorClass *klass)
gtk_object_class->destroy = gimp_gradient_editor_destroy; gtk_object_class->destroy = gimp_gradient_editor_destroy;
widget_class->unmap = gimp_gradient_editor_unmap; widget_class->unmap = gimp_gradient_editor_unmap;
widget_class->unrealize = gimp_gradient_editor_unrealize;
editor_class->set_data = gimp_gradient_editor_set_data; editor_class->set_data = gimp_gradient_editor_set_data;
editor_class->title = _("Gradient Editor"); editor_class->title = _("Gradient Editor");
...@@ -482,6 +484,20 @@ gimp_gradient_editor_unmap (GtkWidget *widget) ...@@ -482,6 +484,20 @@ gimp_gradient_editor_unmap (GtkWidget *widget)
GTK_WIDGET_CLASS (parent_class)->unmap (widget); GTK_WIDGET_CLASS (parent_class)->unmap (widget);
} }
static void
gimp_gradient_editor_unrealize (GtkWidget *widget)
{
GimpGradientEditor *editor = GIMP_GRADIENT_EDITOR (widget);
if (editor->control_pixmap)
{
g_object_unref (editor->control_pixmap);
editor->control_pixmap = NULL;
}
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
static void static void
gimp_gradient_editor_set_data (GimpDataEditor *editor, gimp_gradient_editor_set_data (GimpDataEditor *editor,
GimpData *data) GimpData *data)
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
<separator /> <separator />
<menuitem action="dock-show-image-menu" /> <menuitem action="dock-show-image-menu" />
<menuitem action="dock-auto-follow-active" /> <menuitem action="dock-auto-follow-active" />
<separator />
<menu action="dock-move-to-screen-menu" name="Move to Screen" /> <menu action="dock-move-to-screen-menu" name="Move to Screen" />
</popup> </popup>
</ui> </ui>
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