Commit f3ec1a22 authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

Fix the delete_event setup.

1999-09-11  Miguel de Icaza  <miguel@gnu.org>

	* src/workbook.c (workbook_delete_event): Fix the delete_event
	setup.
parent eaf7d051
1999-09-11 Miguel de Icaza <miguel@gnu.org>
* src/workbook.c (workbook_delete_event): Fix the delete_event
setup.
1999-09-11 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object-widget.c (sheet_object_widget_update_bounds) :
......
1999-09-11 Miguel de Icaza <miguel@gnu.org>
* src/workbook.c (workbook_delete_event): Fix the delete_event
setup.
1999-09-11 Jody Goldberg <jgoldberg@home.com>
* src/sheet-object-widget.c (sheet_object_widget_update_bounds) :
......
......@@ -396,24 +396,15 @@ workbook_destroy (GtkObject *wb_object)
GTK_OBJECT_CLASS (workbook_parent_class)->destroy (wb_object);
}
static int
workbook_widget_delete_event (GtkWidget *widget, Workbook *wb)
{
#ifdef ENABLE_BONOBO
if (wb->bonobo_regions) {
gtk_widget_hide (GTK_WIDGET (wb->toplevel));
return FALSE;
}
#endif
/* gtk_object_unref (GTK_OBJECT (wb)); */
return TRUE;
}
static int
workbook_delete_event (GtkWidget *widget, GdkEvent *event, Workbook *wb)
{
if (workbook_can_close (wb)){
#ifdef BONOBO_ENABLED
if (wb->bonobo_regions) {
gtk_widget_hide (GTK_WIDGET (wb->toplevel));
return FALSE;
}
gnome_object_unref (GNOME_OBJECT (wb));
#else
gtk_object_unref (GTK_OBJECT (wb));
......@@ -2038,7 +2029,7 @@ workbook_new (void)
gtk_signal_connect (
GTK_OBJECT (wb->toplevel), "delete_event",
GTK_SIGNAL_FUNC (workbook_widget_delete_event), wb);
GTK_SIGNAL_FUNC (workbook_delete_event), wb);
#if 0
/* Enable toplevel as a drop target */
......@@ -2056,12 +2047,6 @@ workbook_new (void)
/* clipboard setup */
x_clipboard_bind_workbook (wb);
/* delete_event */
gtk_signal_connect (
GTK_OBJECT (wb->toplevel), "delete_event",
GTK_SIGNAL_FUNC (workbook_delete_event), wb);
gtk_widget_show_all (wb->table);
return wb;
......
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