More refcounting stuff. I think canvas refcounting is correct now.

--sg
This commit is contained in:
scott 1998-02-14 15:30:31 +00:00
parent 411e605ebd
commit ff6cbbb8e6
9 changed files with 21 additions and 6 deletions

View File

@ -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 */

View File

@ -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);
}

View File

@ -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 */

View File

@ -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);

View File

@ -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);

View File

@ -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 */

View File

@ -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;

View File

@ -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);
}

View File

@ -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);