Commit 19a240df authored by Andreas J. Guelzow's avatar Andreas J. Guelzow Committed by Andreas J. Guelzow

deleted change GnomeDialog to GtkDialog NOTE: untested change! change

2002-04-17  Andreas J. Guelzow <aguelzow@taliesin.ca>

	* src/gui-util.[ch] (gnumeric_dialog_show) : deleted
	* src/gui-file.c (ask_for_file_saver) : change GnomeDialog to GtkDialog
	  NOTE: untested change!
	* src/sheet-object-container.c (sheet_object_container_new_file) :
	  change GnomeDialog to GtkDialog.  NOTE: untested change!
parent e84c9e85
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/gui-util.[ch] (gnumeric_dialog_show) : deleted
* src/gui-file.c (ask_for_file_saver) : change GnomeDialog to GtkDialog
NOTE: untested change!
* src/sheet-object-container.c (sheet_object_container_new_file) :
change GnomeDialog to GtkDialog. NOTE: untested change!
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/gui-util.c (gnumeric_error_info_dialog_show_full) : renamed to
......
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/gui-util.[ch] (gnumeric_dialog_show) : deleted
* src/gui-file.c (ask_for_file_saver) : change GnomeDialog to GtkDialog
NOTE: untested change!
* src/sheet-object-container.c (sheet_object_container_new_file) :
change GnomeDialog to GtkDialog. NOTE: untested change!
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/gui-util.c (gnumeric_error_info_dialog_show_full) : renamed to
......
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/gui-util.[ch] (gnumeric_dialog_show) : deleted
* src/gui-file.c (ask_for_file_saver) : change GnomeDialog to GtkDialog
NOTE: untested change!
* src/sheet-object-container.c (sheet_object_container_new_file) :
change GnomeDialog to GtkDialog. NOTE: untested change!
2002-04-17 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/gui-util.c (gnumeric_error_info_dialog_show_full) : renamed to
......
......@@ -357,19 +357,19 @@ ask_for_file_saver (WorkbookControlGUI *wbcg, WorkbookView *wb_view)
GtkOptionMenu *omenu;
GList *savers;
GnumFileSaver *fs;
const gchar *buttons[] = {GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL, NULL};
dialog = gnome_message_box_newv (_("Which file format would you like?"),
GNOME_MESSAGE_BOX_QUESTION, buttons);
gnome_dialog_set_close (GNOME_DIALOG (dialog), FALSE);
dialog = gtk_message_dialog_new (wbcg_toplevel (wbcg),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_OK_CANCEL,
_("Which file format would you like?"));
/* Add the format chooser */
savers = g_list_copy (get_file_savers ());
savers = g_list_sort (savers, file_saver_description_cmp);
omenu = GTK_OPTION_MENU (gtk_option_menu_new ());
format_chooser = make_format_chooser (savers, omenu);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
format_chooser, FALSE, FALSE, 0);
/* Set default file saver */
......@@ -383,10 +383,10 @@ ask_for_file_saver (WorkbookControlGUI *wbcg, WorkbookView *wb_view)
fs = get_default_file_saver ();
}
gtk_option_menu_set_history (omenu, g_list_index (savers, fs));
gtk_widget_show_all (dialog);
gtk_widget_show_all (GTK_DIALOG (dialog)->vbox);
switch (gnome_dialog_run (GNOME_DIALOG (dialog))) {
case 0: /* Ok */
switch (gnumeric_dialog_run (wbcg, GTK_DIALOG (dialog))) {
case GTK_RESPONSE_OK: /* Ok */
fs = g_list_nth_data (savers,
gnumeric_option_menu_get_selected_index (omenu));
break;
......@@ -394,7 +394,6 @@ ask_for_file_saver (WorkbookControlGUI *wbcg, WorkbookView *wb_view)
fs = NULL;
break;
}
gnome_dialog_close (GNOME_DIALOG (dialog));
g_list_free (savers);
return (fs);
......
......@@ -204,46 +204,6 @@ gnumeric_dialog_run (WorkbookControlGUI *wbcg, GtkDialog *dialog)
return result;
}
/**
* gnumeric_dialog_show
* @parent parent widget
* @dialog dialog
* @click_closes close on click
* @close_with_parent close when parent closes
*
* Pop up a dialog without a recursive main loop
*
* Attach a handler to close if the parent closes.
* The parent widget does not have to be a toplevel shell - we look it
* up here.
*/
void
gnumeric_dialog_show (WorkbookControlGUI *wbcg, GtkDialog *dialog,
gboolean click_closes, gboolean close_with_parent)
{
#if 0
GtkWindow *parent = wbcg_toplevel (wbcg);
DialogRunInfo *run_info = NULL;
g_return_if_fail (GNOME_IS_DIALOG (dialog));
if (parent != NULL) {
run_info = g_new0 (DialogRunInfo, 1);
run_info->parent_toplevel =
gtk_widget_get_toplevel (GTK_WIDGET (parent));
gnome_dialog_set_parent
(GNOME_DIALOG (dialog),
GTK_WINDOW (run_info->parent_toplevel));
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog),
close_with_parent);
}
#endif
gnome_dialog_set_close (GNOME_DIALOG (dialog), click_closes);
if (!GTK_WIDGET_VISIBLE (GTK_WIDGET (dialog))) /* Pop up the dialog */
gtk_widget_show (GTK_WIDGET (dialog));
}
#define ERROR_INFO_MAX_LEVEL 9
#define ERROR_INFO_TAG_NAME "errorinfotag%i"
......
......@@ -17,10 +17,6 @@ void gnumeric_notice_nonmodal (GtkWindow *parent, GtkWidget **ref,
void gnumeric_non_modal_dialog (WorkbookControlGUI *wbcg, GtkWindow *dialog);
gint gnumeric_dialog_run (WorkbookControlGUI *wbcg, GtkDialog *dialog);
void gnumeric_dialog_show (WorkbookControlGUI *wbcg,
GtkDialog *dialog,
gboolean click_closes,
gboolean close_with_parent);
void gnumeric_error_info_dialog_show (WorkbookControlGUI *wbcg,
ErrorInfo *error);
void gnumeric_set_transient (WorkbookControlGUI *context, GtkWindow *window);
......
......@@ -176,7 +176,8 @@ sheet_object_container_new_file (Workbook *wb, char const *fname)
so = sheet_object_container_new_object (wb, iid);
if (so == NULL) {
msg = g_strdup_printf (_("can't create object for '%s'"), iid);
gnome_dialog_run_and_close (GNOME_DIALOG (gnome_error_dialog (msg)));
/* FIXME : we should really provide a parent*/
gnumeric_notice (NULL, GTK_MESSAGE_ERROR, msg);
} else {
CORBA_exception_init (&ev);
sheet_object_bonobo_load_file (SHEET_OBJECT_BONOBO (so),
......@@ -185,13 +186,14 @@ sheet_object_container_new_file (Workbook *wb, char const *fname)
msg = g_strdup_printf (
_("Could not load file: %s"),
bonobo_exception_get_text (&ev));
gnome_dialog_run_and_close (GNOME_DIALOG (gnome_error_dialog (msg)));
/* FIXME : we should really provide a parent*/
gnumeric_notice (NULL, GTK_MESSAGE_ERROR, msg);
}
CORBA_exception_free (&ev);
}
g_free (iid);
} else
gnome_dialog_run_and_close (GNOME_DIALOG (gnome_error_dialog (msg)));
gnumeric_notice (NULL, GTK_MESSAGE_ERROR, msg);
g_free (msg);
......
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