Commit 96a74359 authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

return TRUE for GtkWidget::delete_event to avoid destruction of our float

Thu Mar 12 20:17:47 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
        GtkWidget::delete_event to avoid destruction of our float window.

        * gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
        widget if the last handler returned FALSE or there was none connected.

        * gtk/testgtk.c: adapted all delete_event/destroy case that were affected.

        * gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
        a widget and return TRUE to avoid window deletion if
        connected to GtkWIdget::delete_event.
parent 7c698ad4
Thu Mar 12 20:17:47 1998 Tim Janik <timj@gimp.org>
* gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
GtkWidget::delete_event to avoid destruction of our float window.
* gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
widget if the last handler returned FALSE or there was none connected.
* gtk/testgtk.c: adapted all delete_event/destroy case that were affected.
* gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
a widget and return TRUE to avoid window deletion if
connected to GtkWIdget::delete_event.
Thu Mar 12 11:51:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* docs/gtk.texi: Changed name of GTK to the GIMP Toolkit
......
Thu Mar 12 20:17:47 1998 Tim Janik <timj@gimp.org>
* gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
GtkWidget::delete_event to avoid destruction of our float window.
* gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
widget if the last handler returned FALSE or there was none connected.
* gtk/testgtk.c: adapted all delete_event/destroy case that were affected.
* gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
a widget and return TRUE to avoid window deletion if
connected to GtkWIdget::delete_event.
Thu Mar 12 11:51:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* docs/gtk.texi: Changed name of GTK to the GIMP Toolkit
......
Thu Mar 12 20:17:47 1998 Tim Janik <timj@gimp.org>
* gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
GtkWidget::delete_event to avoid destruction of our float window.
* gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
widget if the last handler returned FALSE or there was none connected.
* gtk/testgtk.c: adapted all delete_event/destroy case that were affected.
* gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
a widget and return TRUE to avoid window deletion if
connected to GtkWIdget::delete_event.
Thu Mar 12 11:51:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* docs/gtk.texi: Changed name of GTK to the GIMP Toolkit
......
Thu Mar 12 20:17:47 1998 Tim Janik <timj@gimp.org>
* gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
GtkWidget::delete_event to avoid destruction of our float window.
* gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
widget if the last handler returned FALSE or there was none connected.
* gtk/testgtk.c: adapted all delete_event/destroy case that were affected.
* gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
a widget and return TRUE to avoid window deletion if
connected to GtkWIdget::delete_event.
Thu Mar 12 11:51:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* docs/gtk.texi: Changed name of GTK to the GIMP Toolkit
......
Thu Mar 12 20:17:47 1998 Tim Janik <timj@gimp.org>
* gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
GtkWidget::delete_event to avoid destruction of our float window.
* gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
widget if the last handler returned FALSE or there was none connected.
* gtk/testgtk.c: adapted all delete_event/destroy case that were affected.
* gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
a widget and return TRUE to avoid window deletion if
connected to GtkWIdget::delete_event.
Thu Mar 12 11:51:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* docs/gtk.texi: Changed name of GTK to the GIMP Toolkit
......
Thu Mar 12 20:17:47 1998 Tim Janik <timj@gimp.org>
* gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
GtkWidget::delete_event to avoid destruction of our float window.
* gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
widget if the last handler returned FALSE or there was none connected.
* gtk/testgtk.c: adapted all delete_event/destroy case that were affected.
* gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
a widget and return TRUE to avoid window deletion if
connected to GtkWIdget::delete_event.
Thu Mar 12 11:51:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* docs/gtk.texi: Changed name of GTK to the GIMP Toolkit
......
Thu Mar 12 20:17:47 1998 Tim Janik <timj@gimp.org>
* gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
GtkWidget::delete_event to avoid destruction of our float window.
* gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
widget if the last handler returned FALSE or there was none connected.
* gtk/testgtk.c: adapted all delete_event/destroy case that were affected.
* gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
a widget and return TRUE to avoid window deletion if
connected to GtkWIdget::delete_event.
Thu Mar 12 11:51:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* docs/gtk.texi: Changed name of GTK to the GIMP Toolkit
......
This diff is collapsed.
......@@ -716,5 +716,5 @@ gtk_handle_box_delete_float (GtkWidget *widget,
gtk_widget_queue_resize (GTK_WIDGET (hb));
return FALSE;
return TRUE;
}
......@@ -524,7 +524,8 @@ gtk_main_iteration_do (gboolean blocking)
case GDK_DELETE:
gtk_widget_ref (event_widget);
if (gtk_widget_event (event_widget, event))
if (!gtk_widget_event (event_widget, event) &&
!GTK_OBJECT_DESTROYED (event_widget))
gtk_widget_destroy (event_widget);
gtk_widget_unref (event_widget);
break;
......@@ -532,7 +533,8 @@ gtk_main_iteration_do (gboolean blocking)
case GDK_DESTROY:
gtk_widget_ref (event_widget);
gtk_widget_event (event_widget, event);
gtk_widget_destroy (event_widget);
if (!GTK_OBJECT_DESTROYED (event_widget))
gtk_widget_destroy (event_widget);
gtk_widget_unref (event_widget);
break;
......
......@@ -347,7 +347,6 @@ static void
gtk_statusbar_finalize (GtkObject *object)
{
GtkStatusbar *statusbar;
GSList *list;
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_STATUSBAR (object));
......
......@@ -1239,11 +1239,23 @@ void
gtk_widget_hide (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
if (GTK_WIDGET_VISIBLE (widget))
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[HIDE]);
}
gint
gtk_widget_delete_hides (GtkWidget *widget)
{
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
gtk_widget_hide (widget);
return TRUE;
}
/*****************************************
* gtk_widget_show_all:
*
......
......@@ -459,6 +459,10 @@ gint gtk_widget_is_ancestor (GtkWidget *widget,
gint gtk_widget_is_child (GtkWidget *widget,
GtkWidget *child);
/* Hide widget and return TRUE.
*/
gint gtk_widget_delete_hides (GtkWidget *widget);
/* Widget styles.
*/
void gtk_widget_set_style (GtkWidget *widget,
......
This diff is collapsed.
This diff is collapsed.
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