Commit 2a2e7416 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

new function which destroys the GCs kept by the shell and unrealizes the

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

	* app/display/gimpdisplayshell.c (gimp_display_shell_unrealize):
	new function which destroys the GCs kept by the shell and
	unrealizes the navigation popup.
parent 4a56c4a1
2005-11-26 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_unrealize):
new function which destroys the GCs kept by the shell and
unrealizes the navigation popup.
2005-11-24 Sven Neumann <sven@gimp.org> 2005-11-24 Sven Neumann <sven@gimp.org>
* plug-ins/common/oilify.c: applied a patch by Daniel Richard G. * plug-ins/common/oilify.c: applied a patch by Daniel Richard G.
......
...@@ -102,6 +102,8 @@ static void gimp_display_shell_get_property (GObject *object, ...@@ -102,6 +102,8 @@ static void gimp_display_shell_get_property (GObject *object,
GParamSpec *pspec); GParamSpec *pspec);
static void gimp_display_shell_destroy (GtkObject *object); static void gimp_display_shell_destroy (GtkObject *object);
static void gimp_display_shell_unrealize (GtkWidget *widget);
static void gimp_display_shell_screen_changed (GtkWidget *widget, static void gimp_display_shell_screen_changed (GtkWidget *widget,
GdkScreen *previous); GdkScreen *previous);
static gboolean gimp_display_shell_delete_event (GtkWidget *widget, static gboolean gimp_display_shell_delete_event (GtkWidget *widget,
...@@ -199,6 +201,7 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass) ...@@ -199,6 +201,7 @@ gimp_display_shell_class_init (GimpDisplayShellClass *klass)
gtk_object_class->destroy = gimp_display_shell_destroy; gtk_object_class->destroy = gimp_display_shell_destroy;
widget_class->unrealize = gimp_display_shell_unrealize;
widget_class->screen_changed = gimp_display_shell_screen_changed; widget_class->screen_changed = gimp_display_shell_screen_changed;
widget_class->delete_event = gimp_display_shell_delete_event; widget_class->delete_event = gimp_display_shell_delete_event;
widget_class->popup_menu = gimp_display_shell_popup_menu; widget_class->popup_menu = gimp_display_shell_popup_menu;
...@@ -363,6 +366,46 @@ gimp_display_shell_finalize (GObject *object) ...@@ -363,6 +366,46 @@ gimp_display_shell_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object); G_OBJECT_CLASS (parent_class)->finalize (object);
} }
static void
gimp_display_shell_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object);
switch (property_id)
{
case PROP_UNIT:
gimp_display_shell_set_unit (shell, g_value_get_int (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void
gimp_display_shell_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object);
switch (property_id)
{
case PROP_UNIT:
g_value_set_int (value, shell->unit);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static void static void
gimp_display_shell_destroy (GtkObject *object) gimp_display_shell_destroy (GtkObject *object)
{ {
...@@ -436,43 +479,26 @@ gimp_display_shell_destroy (GtkObject *object) ...@@ -436,43 +479,26 @@ gimp_display_shell_destroy (GtkObject *object)
} }
static void static void
gimp_display_shell_set_property (GObject *object, gimp_display_shell_unrealize (GtkWidget *widget)
guint property_id,
const GValue *value,
GParamSpec *pspec)
{ {
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object); GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (widget);
switch (property_id) if (shell->grid_gc)
{ {
case PROP_UNIT: g_object_unref (shell->grid_gc);
gimp_display_shell_set_unit (shell, g_value_get_int (value)); shell->grid_gc = NULL;
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
} }
}
static void if (shell->pen_gc)
gimp_display_shell_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (object);
switch (property_id)
{ {
case PROP_UNIT: g_object_unref (shell->pen_gc);
g_value_set_int (value, shell->unit); shell->pen_gc = NULL;
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
} }
if (shell->nav_popup)
gtk_widget_unrealize (shell->nav_popup);
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
} }
static void static void
......
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