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

Handle the window closing by the window manager here.

1999-05-23  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/file.c (workbook_save_as): Handle the window closing by the
	window manager here.
	(dialog_query_load_file): And here.

	* src/dialog-zoom.c (dialog_zoom): Handle window manager close
	here (it comes in the form of return value being NULL).

	* src/dialog-insert-cells.c (dialog_insert_cells): ditto.

	* src/dialog-delete-cells.c (dialog_delete_cells): ditto.
parent ce525a44
1999-05-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/file.c (workbook_save_as): Handle the window closing by the
window manager here.
(dialog_query_load_file): And here.
* src/dialog-zoom.c (dialog_zoom): Handle window manager close
here (it comes in the form of return value being NULL).
* src/dialog-insert-cells.c (dialog_insert_cells): ditto.
* src/dialog-delete-cells.c (dialog_delete_cells): ditto.
1999-05-24 Morten Welinder <terra@diku.dk>
* src/workbook.c (workbook_fixup_references): Set formula
......
1999-05-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/file.c (workbook_save_as): Handle the window closing by the
window manager here.
(dialog_query_load_file): And here.
* src/dialog-zoom.c (dialog_zoom): Handle window manager close
here (it comes in the form of return value being NULL).
* src/dialog-insert-cells.c (dialog_insert_cells): ditto.
* src/dialog-delete-cells.c (dialog_delete_cells): ditto.
1999-05-24 Morten Welinder <terra@diku.dk>
* src/workbook.c (workbook_fixup_references): Set formula
......
1999-05-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/file.c (workbook_save_as): Handle the window closing by the
window manager here.
(dialog_query_load_file): And here.
* src/dialog-zoom.c (dialog_zoom): Handle window manager close
here (it comes in the form of return value being NULL).
* src/dialog-insert-cells.c (dialog_insert_cells): ditto.
* src/dialog-delete-cells.c (dialog_delete_cells): ditto.
1999-05-24 Morten Welinder <terra@diku.dk>
* src/workbook.c (workbook_fixup_references): Set formula
......
1999-05-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/file.c (workbook_save_as): Handle the window closing by the
window manager here.
(dialog_query_load_file): And here.
* src/dialog-zoom.c (dialog_zoom): Handle window manager close
here (it comes in the form of return value being NULL).
* src/dialog-insert-cells.c (dialog_insert_cells): ditto.
* src/dialog-delete-cells.c (dialog_delete_cells): ditto.
1999-05-24 Morten Welinder <terra@diku.dk>
* src/workbook.c (workbook_fixup_references): Set formula
......
......@@ -141,8 +141,7 @@ AM_CONDITIONAL(GNOME_SUPPORT, true)
AM_CONDITIONAL(LIBGLADE_FULLDIST, false)
XML_LIBS=`gnome-config --libs xml`
XML_CFLAGS=`gnome-config --cflags xml`/gnome-xml
AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
AM_CONDITIONAL(HAVE_GTK_DOC, false)
AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS)
......
......@@ -42,6 +42,7 @@ GNUMERIC_BASE_SOURCES = \
clipboard.h \
color.c \
color.h \
corba.h \
cursors.c \
cursors.h \
dates.c \
......
......@@ -37,6 +37,9 @@ dialog_delete_cells (Workbook *wb, Sheet *sheet)
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL);
if (ret == NULL)
return;
if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0)
return;
......
......@@ -38,6 +38,9 @@ dialog_insert_cells (Workbook *wb, Sheet *sheet)
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL);
if (ret == NULL)
return;
if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0)
return;
......
......@@ -59,6 +59,9 @@ dialog_zoom (Workbook *wb, Sheet *sheet)
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL);
if (ret == NULL)
return;
if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0)
return;
......
......@@ -37,6 +37,9 @@ dialog_delete_cells (Workbook *wb, Sheet *sheet)
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL);
if (ret == NULL)
return;
if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0)
return;
......
......@@ -38,6 +38,9 @@ dialog_insert_cells (Workbook *wb, Sheet *sheet)
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL);
if (ret == NULL)
return;
if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0)
return;
......
......@@ -59,6 +59,9 @@ dialog_zoom (Workbook *wb, Sheet *sheet)
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL);
if (ret == NULL)
return;
if (strcmp (ret, GNOME_STOCK_BUTTON_CANCEL) == 0)
return;
......
......@@ -256,6 +256,13 @@ insure_saver (FileSaver *current)
return NULL;
}
static guint
file_dialog_delete_event (GtkWidget *widget, GdkEventAny *event)
{
gtk_main_quit ();
return TRUE;
}
void
workbook_save_as (Workbook *wb)
{
......@@ -284,7 +291,14 @@ workbook_save_as (Workbook *wb)
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
gtk_window_set_position (GTK_WINDOW (fsel), GTK_WIN_POS_MOUSE);
/*
* Make sure that we quit the main loop if the window is destroyed
*/
gtk_signal_connect (GTK_OBJECT (fsel), "delete_event",
GTK_SIGNAL_FUNC (file_dialog_delete_event), NULL);
/* Run the dialog */
gtk_widget_show (GTK_WIDGET (fsel));
gtk_grab_add (GTK_WIDGET (fsel));
gtk_main ();
......@@ -347,6 +361,12 @@ dialog_query_load_file (Workbook *wb)
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
gtk_window_set_position (GTK_WINDOW (fsel), GTK_WIN_POS_MOUSE);
/*
* Make sure that we quit the main loop if the window is destroyed
*/
gtk_signal_connect (GTK_OBJECT (fsel), "delete_event",
GTK_SIGNAL_FUNC (file_dialog_delete_event), NULL);
/* Run the dialog */
gtk_widget_show (GTK_WIDGET (fsel));
gtk_grab_add (GTK_WIDGET (fsel));
......
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