Commit dcca75a6 authored by Jon Kåre Hellan's avatar Jon Kåre Hellan

Use updated gui-utils.

* plugin-gnomedb.c (view_data_sources): Use updated gui-utils.

* uihello.c (hello_message): Use updated gui-utils.

* src/gui-file.c (go_file_is_writable, gui_get_image_save_info,
check_multiple_sheet_support_if_needed, do_save_as,
gui_file_save_as): Use updated gui-utils

* src/item-cursor.c (item_cursor_target_region_ok): Ditto

* src/print.c (sheet_print): Ditto.

* src/session.c (interaction_function): Ditto.

* src/wbcg-actions.c (cb_edit_search_replace_query): Ditto.

* src/workbook-control-gui.c (wbcg_error_error) Ditto.
(wbcg_close_if_user_permits):

* dialog-view.c (cb_view_ok_clicked): Use updated gui-utils.

* dialog-tabulate.c (tabulate_ok_clicked): Ditto.

* dialog-stf.c (cancel_clicked): Ditto.

* dialog-stf-main-page.c (encodings_changed_cb): Ditto.

* dialog-stf-format-page.c (cb_col_check_clicked): Ditto.

* dialog-stf-fixed-page.c (fixed_page_autodiscover): Ditto.

* dialog-stf-export.c (stf_export_dialog): Ditto.

* dialog-solver.c (dialog_solver): Ditto.

* dialog-sheet-order.c (cb_ok_clicked, cb_sheet_order_changed): Ditto.

* dialog-search.c (search_clicked): Ditto.

* dialog-search-replace.c (ok_clicked): Ditto.

* dialog-scenarios.c (scenario_add_ok_clicked_cb,
scenarios_summary_clicked_cb, dialog_scenarios): Ditto.

* dialog-plugin-manager.c (cb_pm_button_activate_all_clicked,
cb_pm_button_deactivate_all_clicked, cb_active_toggled): Ditto.

* dialog-paste-special.c (dialog_paste_special): Ditto.

* dialog-merge.c (cb_merge_merge_clicked): Ditto.

* dialog-insert-cells.c (dialog_insert_cells): Ditto.

* dialog-hyperlink.c (dhl_get_target_cur_wb, dialog_hyperlink): Ditto.

* dialog-goto-cell.c (dialog_goto_cell): Ditto.

* dialog-goal-seek.c (dialog_goal_seek): Ditto.

* dialog-formula-guru.c (dialog_formula_guru): Ditto.

* dialog-delete-cells.c (dialog_delete_cells): Ditto.

* dialog-define-names.c (cb_scope_changed, name_guru_add,
dialog_define_names): Ditto.

* dialog-cell-sort.c (dialog_cell_sort): Ditto.

* dialog-cell-format.c (cb_fmt_dialog_dialog_buttons): Ditto.

* dialog-autosave.c (dialog_autosave): Ditto.

* dialog-autocorrect.c (dialog_autocorrect): Ditto.

* dialog-analysis-tools.c (dialog_tool_init): Ditto.
parent 825450ae
2004-09-07 Jon K Hellan <hellan@acm.org>
* src/gui-util.[hc] (gnumeric_notice, gnumeric_notice,
gnumeric_dialog_run, gnumeric_error_info_dialog_show): Replace
WorkboookControlGUI first paremeter with GtkWindow.
* src/gui-file.c (go_file_is_writable, gui_get_image_save_info,
check_multiple_sheet_support_if_needed, do_save_as,
gui_file_save_as): Use updated gui-utils
* src/item-cursor.c (item_cursor_target_region_ok): Ditto
* src/print.c (sheet_print): Ditto.
* src/session.c (interaction_function): Ditto.
* src/wbcg-actions.c (cb_edit_search_replace_query): Ditto.
* src/workbook-control-gui.c (wbcg_error_error) Ditto.
(wbcg_close_if_user_permits):
2004-09-06 Jody Goldberg <jody@gnome.org> 2004-09-06 Jody Goldberg <jody@gnome.org>
* configure.in : Add a --disable-ssconvert for development. * configure.in : Add a --disable-ssconvert for development.
......
2004-09-07 Jon K Hellan <hellan@acm.org>
* src/gui-util.[hc] (gnumeric_notice, gnumeric_notice,
gnumeric_dialog_run, gnumeric_error_info_dialog_show): Replace
WorkboookControlGUI first paremeter with GtkWindow.
* src/gui-file.c (go_file_is_writable, gui_get_image_save_info,
check_multiple_sheet_support_if_needed, do_save_as,
gui_file_save_as): Use updated gui-utils
* src/item-cursor.c (item_cursor_target_region_ok): Ditto
* src/print.c (sheet_print): Ditto.
* src/session.c (interaction_function): Ditto.
* src/wbcg-actions.c (cb_edit_search_replace_query): Ditto.
* src/workbook-control-gui.c (wbcg_error_error) Ditto.
(wbcg_close_if_user_permits):
2004-09-06 Jody Goldberg <jody@gnome.org> 2004-09-06 Jody Goldberg <jody@gnome.org>
* configure.in : Add a --disable-ssconvert for development. * configure.in : Add a --disable-ssconvert for development.
......
2004-09-07 Jon K Hellan <hellan@acm.org>
* plugin-gnomedb.c (view_data_sources): Use updated gui-utils.
2004-08-29 Jody Goldberg <jody@gnome.org> 2004-08-29 Jody Goldberg <jody@gnome.org>
* Release 1.3.2 * Release 1.3.2
......
...@@ -21,7 +21,9 @@ view_data_sources (WorkbookControlGUI *wbcg) ...@@ -21,7 +21,9 @@ view_data_sources (WorkbookControlGUI *wbcg)
if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH,
NULL, NULL, NULL, NULL)) NULL, NULL, NULL, NULL))
gnumeric_notice (wbcg, GTK_MESSAGE_INFO, _("Could not run GNOME database configuration tool")); gnumeric_notice (wbcg_toplevel (wbcg),
GTK_MESSAGE_INFO,
_("Could not run GNOME database configuration tool"));
} }
const ModulePluginUIVerbInfo gnome_db_ui_verbs[] = { const ModulePluginUIVerbInfo gnome_db_ui_verbs[] = {
......
2004-09-07 Jon K Hellan <hellan@acm.org>
* uihello.c (hello_message): Use updated gui-utils.
2004-08-29 Jody Goldberg <jody@gnome.org> 2004-08-29 Jody Goldberg <jody@gnome.org>
* Release 1.3.2 * Release 1.3.2
......
...@@ -23,7 +23,7 @@ hello_message (WorkbookControlGUI *wbcg) ...@@ -23,7 +23,7 @@ hello_message (WorkbookControlGUI *wbcg)
msg = g_strdup_printf ( msg = g_strdup_printf (
_("This is message from the \"%s\" plugin."), _("This is message from the \"%s\" plugin."),
gnm_plugin_get_name (PLUGIN)); gnm_plugin_get_name (PLUGIN));
gnumeric_notice (wbcg, GTK_MESSAGE_INFO, msg); gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_INFO, msg);
g_free (msg); g_free (msg);
} }
......
2004-09-07 Jon K Hellan <hellan@acm.org>
* dialog-view.c (cb_view_ok_clicked): Use updated gui-utils.
* dialog-tabulate.c (tabulate_ok_clicked): Ditto.
* dialog-stf.c (cancel_clicked): Ditto.
* dialog-stf-main-page.c (encodings_changed_cb): Ditto.
* dialog-stf-format-page.c (cb_col_check_clicked): Ditto.
* dialog-stf-fixed-page.c (fixed_page_autodiscover): Ditto.
* dialog-stf-export.c (stf_export_dialog): Ditto.
* dialog-solver.c (dialog_solver): Ditto.
* dialog-sheet-order.c (cb_ok_clicked, cb_sheet_order_changed): Ditto.
* dialog-search.c (search_clicked): Ditto.
* dialog-search-replace.c (ok_clicked): Ditto.
* dialog-scenarios.c (scenario_add_ok_clicked_cb,
scenarios_summary_clicked_cb, dialog_scenarios): Ditto.
* dialog-plugin-manager.c (cb_pm_button_activate_all_clicked,
cb_pm_button_deactivate_all_clicked, cb_active_toggled): Ditto.
* dialog-paste-special.c (dialog_paste_special): Ditto.
* dialog-merge.c (cb_merge_merge_clicked): Ditto.
* dialog-insert-cells.c (dialog_insert_cells): Ditto.
* dialog-hyperlink.c (dhl_get_target_cur_wb, dialog_hyperlink): Ditto.
* dialog-goto-cell.c (dialog_goto_cell): Ditto.
* dialog-goal-seek.c (dialog_goal_seek): Ditto.
* dialog-formula-guru.c (dialog_formula_guru): Ditto.
* dialog-delete-cells.c (dialog_delete_cells): Ditto.
* dialog-define-names.c (cb_scope_changed, name_guru_add,
dialog_define_names): Ditto.
* dialog-cell-sort.c (dialog_cell_sort): Ditto.
* dialog-cell-format.c (cb_fmt_dialog_dialog_buttons): Ditto.
* dialog-autosave.c (dialog_autosave): Ditto.
* dialog-autocorrect.c (dialog_autocorrect): Ditto.
* dialog-analysis-tools.c (dialog_tool_init): Ditto.
2004-09-06 Andreas J. Guelzow <aguelzow@taliesin.ca> 2004-09-06 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dialog-analysis-tools.c (dialog_ttest_tool): Enable the `put' * dialog-analysis-tools.c (dialog_ttest_tool): Enable the `put'
......
...@@ -423,7 +423,7 @@ dialog_tool_init (GenericToolState *state, ...@@ -423,7 +423,7 @@ dialog_tool_init (GenericToolState *state,
return FALSE; return FALSE;
dialog_tool_init_error: dialog_tool_init_error:
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, error_str); gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR, error_str);
g_free (state); g_free (state);
return TRUE; return TRUE;
} }
......
...@@ -325,7 +325,7 @@ dialog_autocorrect (WorkbookControlGUI *wbcg) ...@@ -325,7 +325,7 @@ dialog_autocorrect (WorkbookControlGUI *wbcg)
state->first_letter.exceptions = NULL; state->first_letter.exceptions = NULL;
if (dialog_init (state)) { if (dialog_init (state)) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the AutoCorrect dialog.")); _("Could not create the AutoCorrect dialog."));
cb_autocorrect_destroy (NULL, state); cb_autocorrect_destroy (NULL, state);
return; return;
......
...@@ -180,7 +180,7 @@ dialog_autosave (WorkbookControlGUI *wbcg) ...@@ -180,7 +180,7 @@ dialog_autosave (WorkbookControlGUI *wbcg)
if (!state->dialog || !state->minutes_entry || !state->prompt_cb || if (!state->dialog || !state->minutes_entry || !state->prompt_cb ||
!state->autosave_on_off) { !state->autosave_on_off) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the autosave dialog.")); _("Could not create the autosave dialog."));
g_free (state); g_free (state);
return; return;
......
...@@ -2110,7 +2110,8 @@ cb_fmt_dialog_dialog_buttons (GtkWidget *btn, FormatState *state) ...@@ -2110,7 +2110,8 @@ cb_fmt_dialog_dialog_buttons (GtkWidget *btn, FormatState *state)
validation_rebuild_validation (state); validation_rebuild_validation (state);
if (state->validation.valid < 0) { if (state->validation.valid < 0) {
if (gnumeric_dialog_question_yes_no (state->wbcg, if (gnumeric_dialog_question_yes_no (
GTK_WINDOW (state->dialog),
_ ("The validation criteria are unusable. Disable validation?"), FALSE)) _ ("The validation criteria are unusable. Disable validation?"), FALSE))
{ {
gtk_combo_box_set_active (state->validation.constraint_type, 0); gtk_combo_box_set_active (state->validation.constraint_type, 0);
......
...@@ -1201,7 +1201,7 @@ dialog_cell_sort (WorkbookControlGUI *wbcg) ...@@ -1201,7 +1201,7 @@ dialog_cell_sort (WorkbookControlGUI *wbcg)
GTK_ICON_SIZE_LARGE_TOOLBAR, GTK_ICON_SIZE_LARGE_TOOLBAR,
"Gnumeric-Cell-Sort"); "Gnumeric-Cell-Sort");
if (dialog_init (state)) { if (dialog_init (state)) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the Cell-Sort dialog.")); _("Could not create the Cell-Sort dialog."));
g_free (state); g_free (state);
return; return;
......
...@@ -247,7 +247,8 @@ cb_scope_changed (G_GNUC_UNUSED GtkToggleButton *button, NameGuruState *state) ...@@ -247,7 +247,8 @@ cb_scope_changed (G_GNUC_UNUSED GtkToggleButton *button, NameGuruState *state)
err = expr_name_set_scope (state->cur_name, err = expr_name_set_scope (state->cur_name,
name_guru_scope_is_sheet (state) ? state->sheet : NULL); name_guru_scope_is_sheet (state) ? state->sheet : NULL);
if (err != NULL) { if (err != NULL) {
gnumeric_notice (state->wbcg, GTK_MESSAGE_ERROR, err); gnumeric_notice (GTK_WINDOW (state->dialog),
GTK_MESSAGE_ERROR, err);
g_free (err); g_free (err);
name_guru_display_scope (state); /* flip it back */ name_guru_display_scope (state); /* flip it back */
} else } else
...@@ -345,7 +346,8 @@ name_guru_add (NameGuruState *state) ...@@ -345,7 +346,8 @@ name_guru_add (NameGuruState *state)
if (perr.err == NULL) if (perr.err == NULL)
return TRUE; return TRUE;
gnumeric_notice (state->wbcg, GTK_MESSAGE_ERROR, perr.err->message); gnumeric_notice (GTK_WINDOW (state->dialog),
GTK_MESSAGE_ERROR, perr.err->message);
gtk_widget_grab_focus (GTK_WIDGET (state->expr_entry)); gtk_widget_grab_focus (GTK_WIDGET (state->expr_entry));
parse_error_free (&perr); parse_error_free (&perr);
return FALSE; return FALSE;
...@@ -355,7 +357,7 @@ name_guru_add (NameGuruState *state) ...@@ -355,7 +357,7 @@ name_guru_add (NameGuruState *state)
* because it will be would disappear from the lists. * because it will be would disappear from the lists.
*/ */
if (gnm_expr_is_err (expr, GNM_ERROR_NAME)) { if (gnm_expr_is_err (expr, GNM_ERROR_NAME)) {
gnumeric_notice (state->wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->dialog), GTK_MESSAGE_ERROR,
_("Why would you want to define a name to be #NAME?")); _("Why would you want to define a name to be #NAME?"));
gtk_widget_grab_focus (GTK_WIDGET (state->expr_entry)); gtk_widget_grab_focus (GTK_WIDGET (state->expr_entry));
parse_error_free (&perr); parse_error_free (&perr);
...@@ -576,7 +578,7 @@ dialog_define_names (WorkbookControlGUI *wbcg) ...@@ -576,7 +578,7 @@ dialog_define_names (WorkbookControlGUI *wbcg)
state = g_new0 (NameGuruState, 1); state = g_new0 (NameGuruState, 1);
if (name_guru_init (state, wbcg)) { if (name_guru_init (state, wbcg)) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the Name Guru.")); _("Could not create the Name Guru."));
g_free (state); g_free (state);
return; return;
......
...@@ -162,7 +162,7 @@ dialog_delete_cells (WorkbookControlGUI *wbcg) ...@@ -162,7 +162,7 @@ dialog_delete_cells (WorkbookControlGUI *wbcg)
state->dialog = glade_xml_get_widget (state->gui, "Delete_cells"); state->dialog = glade_xml_get_widget (state->gui, "Delete_cells");
if (state->dialog == NULL) { if (state->dialog == NULL) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the Delete Cell dialog.")); _("Could not create the Delete Cell dialog."));
g_free (state); g_free (state);
return ; return ;
......
...@@ -972,7 +972,7 @@ dialog_formula_guru (WorkbookControlGUI *wbcg, GnmFunc const *fd) ...@@ -972,7 +972,7 @@ dialog_formula_guru (WorkbookControlGUI *wbcg, GnmFunc const *fd)
state->dialog = glade_xml_get_widget (state->gui, "formula_guru"); state->dialog = glade_xml_get_widget (state->gui, "formula_guru");
if (dialog_formula_guru_init (state)) { if (dialog_formula_guru_init (state)) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the formula guru.")); _("Could not create the formula guru."));
g_free (state); g_free (state);
return; return;
......
...@@ -651,7 +651,7 @@ dialog_goal_seek (WorkbookControlGUI *wbcg, Sheet *sheet) ...@@ -651,7 +651,7 @@ dialog_goal_seek (WorkbookControlGUI *wbcg, Sheet *sheet)
state->cancelled = TRUE; state->cancelled = TRUE;
if (dialog_init (state)) { if (dialog_init (state)) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the Goal-Seek dialog.")); _("Could not create the Goal-Seek dialog."));
g_free (state); g_free (state);
return; return;
......
...@@ -353,7 +353,7 @@ dialog_goto_cell (WorkbookControlGUI *wbcg) ...@@ -353,7 +353,7 @@ dialog_goto_cell (WorkbookControlGUI *wbcg)
state->dialog = glade_xml_get_widget (state->gui, "goto_dialog"); state->dialog = glade_xml_get_widget (state->gui, "goto_dialog");
if (dialog_goto_init (state)) { if (dialog_goto_init (state)) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the goto dialog.")); _("Could not create the goto dialog."));
g_free (state); g_free (state);
return; return;
......
...@@ -144,7 +144,8 @@ dhl_get_target_cur_wb (HyperlinkState *state, gboolean *success) ...@@ -144,7 +144,8 @@ dhl_get_target_cur_wb (HyperlinkState *state, gboolean *success)
ret = (char *) target; ret = (char *) target;
value_release (val); value_release (val);
} else { } else {
gnumeric_notice (state->wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->dialog),
GTK_MESSAGE_ERROR,
_("Not a range or name")); _("Not a range or name"));
gnm_expr_entry_grab_focus (gee, TRUE); gnm_expr_entry_grab_focus (gee, TRUE);
} }
...@@ -485,7 +486,7 @@ dialog_hyperlink (WorkbookControlGUI *wbcg, SheetControl *sc) ...@@ -485,7 +486,7 @@ dialog_hyperlink (WorkbookControlGUI *wbcg, SheetControl *sc)
state->link = link; state->link = link;
if (dhl_init (state)) { if (dhl_init (state)) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the hyperlink dialog.")); _("Could not create the hyperlink dialog."));
g_free (state); g_free (state);
return; return;
......
...@@ -162,7 +162,7 @@ dialog_insert_cells (WorkbookControlGUI *wbcg) ...@@ -162,7 +162,7 @@ dialog_insert_cells (WorkbookControlGUI *wbcg)
state->gui = gui; state->gui = gui;
state->dialog = glade_xml_get_widget (state->gui, "Insert_cells"); state->dialog = glade_xml_get_widget (state->gui, "Insert_cells");
if (state->dialog == NULL) { if (state->dialog == NULL) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the Insert Cell dialog.")); _("Could not create the Insert Cell dialog."));
g_free (state); g_free (state);
return ; return ;
......
...@@ -286,7 +286,8 @@ cb_merge_merge_clicked (G_GNUC_UNUSED GtkWidget *ignore, ...@@ -286,7 +286,8 @@ cb_merge_merge_clicked (G_GNUC_UNUSED GtkWidget *ignore,
"%i and proceed?"), min_length, max_length, "%i and proceed?"), min_length, max_length,
min_length); min_length);
if (gnumeric_dialog_question_yes_no (state->wbcg, text, TRUE)) { if (gnumeric_dialog_question_yes_no (
GTK_WINDOW (state->dialog), text, TRUE)) {
g_slist_foreach (data_list, cb_merge_trim_data, &min_length); g_slist_foreach (data_list, cb_merge_trim_data, &min_length);
g_free (text); g_free (text);
} else { } else {
......
...@@ -195,7 +195,7 @@ dialog_paste_special (WorkbookControlGUI *wbcg) ...@@ -195,7 +195,7 @@ dialog_paste_special (WorkbookControlGUI *wbcg)
gtk_widget_show_all (hbox); gtk_widget_show_all (hbox);
gtk_widget_grab_focus (first_button); gtk_widget_grab_focus (first_button);
v = gnumeric_dialog_run (wbcg, state.dialog); v = gnumeric_dialog_run (wbcg_toplevel (wbcg), state.dialog);
/* If closed with the window manager, cancel */ /* If closed with the window manager, cancel */
if (v == -1) if (v == -1)
......
...@@ -488,7 +488,8 @@ cb_pm_button_activate_all_clicked (G_GNUC_UNUSED GtkButton *button, ...@@ -488,7 +488,8 @@ cb_pm_button_activate_all_clicked (G_GNUC_UNUSED GtkButton *button,
if (activation_error != NULL) { if (activation_error != NULL) {
error = error_info_new_str_with_details ( error = error_info_new_str_with_details (
_("Errors while activating plugins"), activation_error); _("Errors while activating plugins"), activation_error);
gnumeric_error_info_dialog_show (pm_gui->wbcg, error); gnumeric_error_info_dialog_show (
GTK_WINDOW (pm_gui->dialog_pm), error);
error_info_free (error); error_info_free (error);
} }
} }
...@@ -504,7 +505,8 @@ cb_pm_button_deactivate_all_clicked (G_GNUC_UNUSED GtkButton *button, ...@@ -504,7 +505,8 @@ cb_pm_button_deactivate_all_clicked (G_GNUC_UNUSED GtkButton *button,
if (deactivation_error != NULL) { if (deactivation_error != NULL) {
error = error_info_new_str_with_details ( error = error_info_new_str_with_details (
_("Errors while deactivating plugins"), deactivation_error); _("Errors while deactivating plugins"), deactivation_error);
gnumeric_error_info_dialog_show (pm_gui->wbcg, error); gnumeric_error_info_dialog_show (
GTK_WINDOW (pm_gui->dialog_pm), error);
error_info_free (error); error_info_free (error);
} }
} }
...@@ -614,7 +616,7 @@ cb_active_toggled (G_GNUC_UNUSED GtkCellRendererToggle *celltoggle, ...@@ -614,7 +616,7 @@ cb_active_toggled (G_GNUC_UNUSED GtkCellRendererToggle *celltoggle,
); );
g_string_append (s, _("\nDo you want to activate this plugin together with its dependencies?")); g_string_append (s, _("\nDo you want to activate this plugin together with its dependencies?"));
if (n_inactive_deps > 0) { if (n_inactive_deps > 0) {
want_activate = gnumeric_dialog_question_yes_no (pm_gui->wbcg, s->str, TRUE); want_activate = gnumeric_dialog_question_yes_no (GTK_WINDOW (pm_gui->dialog_pm), s->str, TRUE);
} }
g_string_free (s, TRUE); g_string_free (s, TRUE);
} }
......
...@@ -125,14 +125,16 @@ scenario_add_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button, ...@@ -125,14 +125,16 @@ scenario_add_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
rr = value_get_rangeref (cell_range); rr = value_get_rangeref (cell_range);
if (rr == NULL) { if (rr == NULL) {
gnumeric_notice (state->base.wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->base.dialog),
GTK_MESSAGE_ERROR,
_("Invalid changing cells")); _("Invalid changing cells"));
gnm_expr_entry_grab_focus (state->base.input_entry, TRUE); gnm_expr_entry_grab_focus (state->base.input_entry, TRUE);
return; return;
} }
if (rr->a.sheet != state->base.sheet) { if (rr->a.sheet != state->base.sheet) {
gnumeric_notice (state->base.wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->base.dialog),
GTK_MESSAGE_ERROR,
_("Changing cells should be on the current " _("Changing cells should be on the current "
"sheet only.")); "sheet only."));
gnm_expr_entry_grab_focus (state->base.input_entry, TRUE); gnm_expr_entry_grab_focus (state->base.input_entry, TRUE);
...@@ -143,12 +145,14 @@ scenario_add_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button, ...@@ -143,12 +145,14 @@ scenario_add_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
name = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry))); name = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
if (scenario_name_used (state->base.sheet->scenarios, name)) { if (scenario_name_used (state->base.sheet->scenarios, name)) {
g_free (name); g_free (name);
gnumeric_notice (state->base.wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->base.dialog),
GTK_MESSAGE_ERROR,
_("Scenario name already used")); _("Scenario name already used"));
goto out; goto out;
} else if (check_name (name)) { } else if (check_name (name)) {
g_free (name); g_free (name);
gnumeric_notice (state->base.wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->base.dialog),
GTK_MESSAGE_ERROR,
_("Invalid scenario name")); _("Invalid scenario name"));
goto out; goto out;
} }
...@@ -173,7 +177,8 @@ scenario_add_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button, ...@@ -173,7 +177,8 @@ scenario_add_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
cmd_scenario_add (wbc, scenario, state->base.sheet); cmd_scenario_add (wbc, scenario, state->base.sheet);
if (res) if (res)
gnumeric_notice (state->base.wbcg, GTK_MESSAGE_WARNING, gnumeric_notice (GTK_WINDOW (state->base.dialog),
GTK_MESSAGE_WARNING,
_("Changing cells contain at least one " _("Changing cells contain at least one "
"expression that is not just a value. " "expression that is not just a value. "
"Note that showing the scenario will " "Note that showing the scenario will "
...@@ -562,7 +567,8 @@ scenarios_summary_clicked_cb (G_GNUC_UNUSED GtkWidget *button, ...@@ -562,7 +567,8 @@ scenarios_summary_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet); GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
if (results == NULL) { if (results == NULL) {
gnumeric_notice (state->base.wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->base.dialog),
GTK_MESSAGE_ERROR,
_("Results entry did not contain valid " _("Results entry did not contain valid "
"cell names.")); "cell names."));
return; return;
...@@ -690,7 +696,7 @@ dialog_scenarios (WorkbookControlGUI *wbcg) ...@@ -690,7 +696,7 @@ dialog_scenarios (WorkbookControlGUI *wbcg)
return; return;
error_out: error_out:
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, error_str); gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR, error_str);
g_free (state->scenario_state); g_free (state->scenario_state);
g_free (state); g_free (state);
......
...@@ -143,7 +143,7 @@ ok_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd) ...@@ -143,7 +143,7 @@ ok_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd)
err = search_replace_verify (sr, TRUE); err = search_replace_verify (sr, TRUE);
if (err) { if (err) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, err); gnumeric_notice (GTK_WINDOW (dialog), GTK_MESSAGE_ERROR, err);
g_free (err); g_free (err);
search_replace_free (sr); search_replace_free (sr);
return; return;
...@@ -152,7 +152,7 @@ ok_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd) ...@@ -152,7 +152,7 @@ ok_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd)
!sr->search_expressions && !sr->search_expressions &&
!sr->search_expression_results && !sr->search_expression_results &&
!sr->search_comments) { !sr->search_comments) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (dialog), GTK_MESSAGE_ERROR,
_("You must select some cell types to search.")); _("You must select some cell types to search."));
search_replace_free (sr); search_replace_free (sr);
return; return;
......
...@@ -318,7 +318,8 @@ search_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd) ...@@ -318,7 +318,8 @@ search_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd)
err = search_replace_verify (sr, FALSE); err = search_replace_verify (sr, FALSE);
if (err) { if (err) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, err); gnumeric_notice (GTK_WINDOW (dd->dialog),
GTK_MESSAGE_ERROR, err);
g_free (err); g_free (err);
search_replace_free (sr); search_replace_free (sr);
return; return;
...@@ -327,7 +328,7 @@ search_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd) ...@@ -327,7 +328,7 @@ search_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd)
!sr->search_expressions && !sr->search_expressions &&
!sr->search_expression_results && !sr->search_expression_results &&
!sr->search_comments) { !sr->search_comments) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (dd->dialog), GTK_MESSAGE_ERROR,
_("You must select some cell types to search.")); _("You must select some cell types to search."));
search_replace_free (sr); search_replace_free (sr);
return; return;
......
...@@ -728,17 +728,17 @@ cb_ok_clicked (G_GNUC_UNUSED GtkWidget *ignore, SheetManager *state) ...@@ -728,17 +728,17 @@ cb_ok_clicked (G_GNUC_UNUSED GtkWidget *ignore, SheetManager *state)
changed_names = g_slist_reverse (changed_names); changed_names = g_slist_reverse (changed_names);
if (!one_is_visible) { if (!one_is_visible) {
gnumeric_notice (state->wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->dialog), GTK_MESSAGE_ERROR,
_("At least one sheet must remain visible!")); _("At least one sheet must remain visible!"));
goto cleanup; goto cleanup;
} }
if (new_order == NULL) { if (new_order == NULL) {
gnumeric_notice (state->wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->dialog), GTK_MESSAGE_ERROR,
_("You may not delete all sheets in a workbook!")); _("You may not delete all sheets in a workbook!"));
goto cleanup; goto cleanup;
} }
if (workbook_sheet_count (wb) <= (int)g_slist_length (deleted_sheets) ) { if (workbook_sheet_count (wb) <= (int)g_slist_length (deleted_sheets) ) {
gnumeric_notice (state->wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (GTK_WINDOW (state->dialog), GTK_MESSAGE_ERROR,
_("To replace all exisiting sheets, please " _("To replace all exisiting sheets, please "
"delete the current workbook and create " "delete the current workbook and create "
"a new one!")); "a new one!"));
...@@ -983,7 +983,7 @@ cb_sheet_order_changed (Workbook *wb, SheetManager *state) ...@@ -983,7 +983,7 @@ cb_sheet_order_changed (Workbook *wb, SheetManager *state)
* The order in the dialog and the new sheet order are totally * The order in the dialog and the new sheet order are totally
* different. Ask the user what to do. * different. Ask the user what to do.
*/ */
if (gnumeric_dialog_question_yes_no (state->wbcg, if (gnumeric_dialog_question_yes_no (GTK_WINDOW (state->dialog),
_("The sheet order has changed. Do you want to " _("The sheet order has changed. Do you want to "
"update the list?"), TRUE)) "update the list?"), TRUE))
dialog_sheet_order_update_sheet_order (state); dialog_sheet_order_update_sheet_order (state);
......
...@@ -1442,7 +1442,7 @@ dialog_solver (WorkbookControlGUI *wbcg, Sheet *sheet) ...@@ -1442,7 +1442,7 @@ dialog_solver (WorkbookControlGUI *wbcg, Sheet *sheet)
state->cancelled = TRUE; state->cancelled = TRUE;
if (dialog_init (state)) { if (dialog_init (state)) {
gnumeric_notice (wbcg, GTK_MESSAGE_ERROR, gnumeric_notice (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the Solver dialog.")); _("Could not create the Solver dialog."));
g_free (state); g_free (state);
return; return;
......
...@@ -464,7 +464,7 @@ stf_export_dialog (WorkbookControlGUI *wbcg, Workbook *wb) ...@@ -464,7 +464,7 @@ stf_export_dialog (WorkbookControlGUI *wbcg, Workbook *wb)
"clicked", "clicked",
G_CALLBACK (cb_next_page), &state); G_CALLBACK (cb_next_page), &state);
gnumeric_dialog_run (wbcg, GTK_DIALOG (state.window)); gnumeric_dialog_run (wbcg_toplevel (wbcg), GTK_DIALOG (state.window));
g_object_unref (G_OBJECT (state.gui)); g_object_unref (G_OBJECT (state.gui));
return state.result; return state.result;
......
...@@ -50,7 +50,8 @@ fixed_page_autodiscover (StfDialogData *pagedata) ...@@ -50,7 +50,8 @@ fixed_page_autodiscover (StfDialogData *pagedata)
GTK_MESSAGE_INFO, GTK_MESSAGE_INFO,
GTK_BUTTONS_OK, GTK_BUTTONS_OK,
_("Autodiscovery did not find any columns in the text. Try manually")); _("Autodiscovery did not find any columns in the text. Try manually"));
gnumeric_dialog_run (pagedata->wbcg, GTK_DIALOG (dialog)); gnumeric_dialog_run (GTK_WINDOW (pagedata->dialog),
GTK_DIALOG (dialog));
} }
} }