Commit efe65519 authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan
Browse files

Handle wb = NULL correctly. Move handling of wb != NULL to

2000-01-28  Jon K Hellan  <hellan@acm.org>

	* src/gnumeric-util.c (gnumeric_dialog_run): Handle wb = NULL
	correctly. Move handling of wb != NULL to gnumeric_wb_dialog_run.
	(gnumeric_wb_dialog_run): New static function.
parent 9ad2bf6c
2000-01-28 Jon K Hellan <hellan@acm.org>
* src/gnumeric-util.c (gnumeric_dialog_run): Handle wb = NULL
correctly. Move handling of wb != NULL to gnumeric_wb_dialog_run.
(gnumeric_wb_dialog_run): New static function.
2000-01-27 Jody Goldberg <jgoldberg@home.com>
* *.c : convert to using Workbook::current_sheet rather than
......
2000-01-28 Jon K Hellan <hellan@acm.org>
* src/gnumeric-util.c (gnumeric_dialog_run): Handle wb = NULL
correctly. Move handling of wb != NULL to gnumeric_wb_dialog_run.
(gnumeric_wb_dialog_run): New static function.
2000-01-27 Jody Goldberg <jgoldberg@home.com>
* *.c : convert to using Workbook::current_sheet rather than
......
......@@ -31,22 +31,22 @@ gnumeric_notice (Workbook *wb, const char *type, const char *str)
}
/**
* gnumeric_dialog_run : A utility routine to handle the application being closed by
* the window manager while a modal dialog is being displayed.
* gnumeric_wb_dialog_run : A utility routine to handle the
* application being closed by the window manager while a modal dialog
* is being displayed.
*/
gint
gnumeric_dialog_run (Workbook *wb, GnomeDialog *dialog)
static gint
gnumeric_wb_dialog_run (Workbook *wb, GnomeDialog *dialog)
{
gint res;
GtkObject * const app = GTK_OBJECT (wb->toplevel);
if (wb)
gnome_dialog_set_parent (GNOME_DIALOG (dialog),
GTK_WINDOW (wb->toplevel));
gnome_dialog_set_parent (GNOME_DIALOG (dialog),
GTK_WINDOW (wb->toplevel));
gtk_object_ref (app);
res = gnome_dialog_run (dialog);
/* If the application was closed close the dialog too */
if (res < 0 && GTK_OBJECT_DESTROYED (app))
gnome_dialog_close (dialog);
......@@ -60,6 +60,19 @@ gnumeric_dialog_run (Workbook *wb, GnomeDialog *dialog)
return res;
}
/**
* gnumeric_dialog_run : A utility routine to handle the application being closed by
* the window manager while a modal dialog is being displayed.
*/
gint
gnumeric_dialog_run (Workbook *wb, GnomeDialog *dialog)
{
if (wb)
return gnumeric_wb_dialog_run (wb, dialog);
else
return gnome_dialog_run (dialog);
}
int
gtk_radio_group_get_selected (GSList *radio_group)
{
......
......@@ -31,22 +31,22 @@ gnumeric_notice (Workbook *wb, const char *type, const char *str)
}
/**
* gnumeric_dialog_run : A utility routine to handle the application being closed by
* the window manager while a modal dialog is being displayed.
* gnumeric_wb_dialog_run : A utility routine to handle the
* application being closed by the window manager while a modal dialog
* is being displayed.
*/
gint
gnumeric_dialog_run (Workbook *wb, GnomeDialog *dialog)
static gint
gnumeric_wb_dialog_run (Workbook *wb, GnomeDialog *dialog)
{
gint res;
GtkObject * const app = GTK_OBJECT (wb->toplevel);
if (wb)
gnome_dialog_set_parent (GNOME_DIALOG (dialog),
GTK_WINDOW (wb->toplevel));
gnome_dialog_set_parent (GNOME_DIALOG (dialog),
GTK_WINDOW (wb->toplevel));
gtk_object_ref (app);
res = gnome_dialog_run (dialog);
/* If the application was closed close the dialog too */
if (res < 0 && GTK_OBJECT_DESTROYED (app))
gnome_dialog_close (dialog);
......@@ -60,6 +60,19 @@ gnumeric_dialog_run (Workbook *wb, GnomeDialog *dialog)
return res;
}
/**
* gnumeric_dialog_run : A utility routine to handle the application being closed by
* the window manager while a modal dialog is being displayed.
*/
gint
gnumeric_dialog_run (Workbook *wb, GnomeDialog *dialog)
{
if (wb)
return gnumeric_wb_dialog_run (wb, dialog);
else
return gnome_dialog_run (dialog);
}
int
gtk_radio_group_get_selected (GSList *radio_group)
{
......
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