mirror of https://github.com/GNOME/gimp.git
More refcounting stuff. I think canvas refcounting is correct now.
--sg
This commit is contained in:
parent
411e605ebd
commit
ff6cbbb8e6
|
@ -210,6 +210,8 @@ gdisplay_delete (GDisplay *gdisp)
|
|||
if (popup_shell == gdisp->shell)
|
||||
popup_shell= NULL;
|
||||
|
||||
gtk_widget_unref (gdisp->shell);
|
||||
|
||||
g_free (gdisp);
|
||||
}
|
||||
|
||||
|
@ -1379,12 +1381,14 @@ void
|
|||
gdisplays_delete ()
|
||||
{
|
||||
GSList *list = display_list;
|
||||
GDisplay *gdisp;
|
||||
|
||||
/* traverse the linked list of displays */
|
||||
while (list)
|
||||
{
|
||||
gdisplay_delete ((GDisplay *) list->data);
|
||||
gdisp = (GDisplay *) list->data;
|
||||
list = g_slist_next (list);
|
||||
gtk_widget_destroy (gdisp->shell);
|
||||
}
|
||||
|
||||
/* free up linked list data */
|
||||
|
|
|
@ -266,7 +266,7 @@ gdisplay_close_warning_callback (GtkWidget *w,
|
|||
if (popup_shell == gdisp->shell)
|
||||
popup_shell = NULL;
|
||||
|
||||
gtk_widget_destroy (gdisp->shell);
|
||||
gtk_widget_unref (gdisp->shell);
|
||||
gtk_widget_destroy (mbox);
|
||||
}
|
||||
|
||||
|
|
|
@ -210,6 +210,8 @@ gdisplay_delete (GDisplay *gdisp)
|
|||
if (popup_shell == gdisp->shell)
|
||||
popup_shell= NULL;
|
||||
|
||||
gtk_widget_unref (gdisp->shell);
|
||||
|
||||
g_free (gdisp);
|
||||
}
|
||||
|
||||
|
@ -1379,12 +1381,14 @@ void
|
|||
gdisplays_delete ()
|
||||
{
|
||||
GSList *list = display_list;
|
||||
GDisplay *gdisp;
|
||||
|
||||
/* traverse the linked list of displays */
|
||||
while (list)
|
||||
{
|
||||
gdisplay_delete ((GDisplay *) list->data);
|
||||
gdisp = (GDisplay *) list->data;
|
||||
list = g_slist_next (list);
|
||||
gtk_widget_destroy (gdisp->shell);
|
||||
}
|
||||
|
||||
/* free up linked list data */
|
||||
|
|
|
@ -624,6 +624,7 @@ create_display_shell (int gdisp_id,
|
|||
|
||||
/* The toplevel shell */
|
||||
gdisp->shell = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_ref (gdisp->shell);
|
||||
gtk_window_set_title (GTK_WINDOW (gdisp->shell), title);
|
||||
gtk_window_set_wmclass (GTK_WINDOW (gdisp->shell), "image_window", "Gimp");
|
||||
gtk_window_set_policy (GTK_WINDOW (gdisp->shell), TRUE, TRUE, TRUE);
|
||||
|
|
|
@ -624,6 +624,7 @@ create_display_shell (int gdisp_id,
|
|||
|
||||
/* The toplevel shell */
|
||||
gdisp->shell = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_ref (gdisp->shell);
|
||||
gtk_window_set_title (GTK_WINDOW (gdisp->shell), title);
|
||||
gtk_window_set_wmclass (GTK_WINDOW (gdisp->shell), "image_window", "Gimp");
|
||||
gtk_window_set_policy (GTK_WINDOW (gdisp->shell), TRUE, TRUE, TRUE);
|
||||
|
|
|
@ -210,6 +210,8 @@ gdisplay_delete (GDisplay *gdisp)
|
|||
if (popup_shell == gdisp->shell)
|
||||
popup_shell= NULL;
|
||||
|
||||
gtk_widget_unref (gdisp->shell);
|
||||
|
||||
g_free (gdisp);
|
||||
}
|
||||
|
||||
|
@ -1379,12 +1381,14 @@ void
|
|||
gdisplays_delete ()
|
||||
{
|
||||
GSList *list = display_list;
|
||||
GDisplay *gdisp;
|
||||
|
||||
/* traverse the linked list of displays */
|
||||
while (list)
|
||||
{
|
||||
gdisplay_delete ((GDisplay *) list->data);
|
||||
gdisp = (GDisplay *) list->data;
|
||||
list = g_slist_next (list);
|
||||
gtk_widget_destroy (gdisp->shell);
|
||||
}
|
||||
|
||||
/* free up linked list data */
|
||||
|
|
|
@ -116,7 +116,7 @@ gdisplay_delete_invoker (Argument *args)
|
|||
|
||||
int_value = args[0].value.pdb_int;
|
||||
if ((gdisplay = gdisplay_get_ID (int_value)))
|
||||
gdisplay_remove_and_delete (gdisplay);
|
||||
gtk_widget_destroy (gdisplay->shell);
|
||||
else
|
||||
success = FALSE;
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ gdisplay_close_warning_callback (GtkWidget *w,
|
|||
if (popup_shell == gdisp->shell)
|
||||
popup_shell = NULL;
|
||||
|
||||
gtk_widget_destroy (gdisp->shell);
|
||||
gtk_widget_unref (gdisp->shell);
|
||||
gtk_widget_destroy (mbox);
|
||||
}
|
||||
|
||||
|
|
|
@ -624,6 +624,7 @@ create_display_shell (int gdisp_id,
|
|||
|
||||
/* The toplevel shell */
|
||||
gdisp->shell = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_ref (gdisp->shell);
|
||||
gtk_window_set_title (GTK_WINDOW (gdisp->shell), title);
|
||||
gtk_window_set_wmclass (GTK_WINDOW (gdisp->shell), "image_window", "Gimp");
|
||||
gtk_window_set_policy (GTK_WINDOW (gdisp->shell), TRUE, TRUE, TRUE);
|
||||
|
|
Loading…
Reference in New Issue