Commit 914cec6f authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

s/gnome_dialog_run(dialog)/gnumeric_dialog_run (workbook, dialog)/g

Put a wrapper in place around dialog creation.  This will eventually handle the
setting of the parent and closing the parent application while a dialog is up.

2000-01-21  Jody Goldberg <jgoldberg@home.com>

	* src/dialogs/dialog-printer-setup.c (do_hf_config) : Take a Workbook.

	* src/gnumeric-util.c (gnumeric_dialog_run) : New function.
	  It is a wrapper for now.  After the release of .48 we will
	  move the parent setting here.  And handle the case where a
	  user closes the app window while a dialog is displayed.

	* src/file.c (workbook_import) : Use gnumeric_dialog_run.

	* src/dialogs/dialog-{dialog-zoom.c (dialog_zoom_impl)
		    summary.c (dialog_summary_update)
		    solver.c (dialog_solver)
		    solver.c (constr_add_click)
		    solver.c (dialog_solver_options)
		    simple-input.c (dialog_get_number, dialog_get_sheet_name)
		    printer.c (gnumeric_printer_dialog_run)
		    paste-special.c (dialog_paste_special)
		    insert-cells.c (dialog_insert_cells_impl)
		    goto-cell.c (dialog_goto_cell)
		    goal-seek.c (dialog_found_solution, dialog_goal_seek)
		    function-wizard.c (dialog_function_wizard)
		    delete-cells.c (dialog_delete_cells_impl)
		    cell-sort.c (dialog_cell_sort)
		    cell-format.c (fmt_dialog_impl)
		    cell-comment.c (dialog_cell_comment)
		    autosave.c (dialog_autosave_callback, dialog_autosave)
		    autocorrect.c (exceptions_callback)
		    (dialog_autocorrect)} : Ditto.

	* src/dialogs/dialog-analysis-tools.c
	(dialog_{correlation_tool, covariance_tool, sampling_tool,
	 descriptive_stat_tool, ztest_tool, ttest_paired_tool, ttest_eq_tool,
	 ttest_neq_tool, ftest_tool, random_tool, regression_tool,
	 average_tool, ranking_tool, anova_single_factor_tool,
	 anova_two_factor_without_r_tool, data_analysis}) : Ditto.

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

	* src/sheet.c (sheet_move_range) : Avoid leaking when we paste.
	  This information will be used when undo for pasteing a cut
	  is ready.

	* README : update requirements.

	* plugins/Makefile.am : Do not compile the python plugin by
	  default.  This will avoid complaints regarding problems with
	  no dynamic python library until we have a solution.

	* src/functions/fn-stat.c : (gnumeric_kurt, gnumeric_kurtp) : return DIV/0
	  on error.
parent 1180a48e
Thu Jan 20 16:52:14 2000 Morten Welinder <welinder@rentec.com>
2000-01-21 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-printer-setup.c (do_hf_config) : Take a Workbook.
* src/gnumeric-util.c (gnumeric_dialog_run) : New function.
It is a wrapper for now. After the release of .48 we will
move the parent setting here. And handle the case where a
user closes the app window while a dialog is displayed.
* src/file.c (workbook_import) : Use gnumeric_dialog_run.
* src/dialogs/dialog-{dialog-zoom.c (dialog_zoom_impl)
summary.c (dialog_summary_update)
solver.c (dialog_solver)
solver.c (constr_add_click)
solver.c (dialog_solver_options)
simple-input.c (dialog_get_number, dialog_get_sheet_name)
printer.c (gnumeric_printer_dialog_run)
paste-special.c (dialog_paste_special)
insert-cells.c (dialog_insert_cells_impl)
goto-cell.c (dialog_goto_cell)
goal-seek.c (dialog_found_solution, dialog_goal_seek)
function-wizard.c (dialog_function_wizard)
delete-cells.c (dialog_delete_cells_impl)
cell-sort.c (dialog_cell_sort)
cell-format.c (fmt_dialog_impl)
cell-comment.c (dialog_cell_comment)
autosave.c (dialog_autosave_callback, dialog_autosave)
autocorrect.c (exceptions_callback)
(dialog_autocorrect)} : Ditto.
* src/dialogs/dialog-analysis-tools.c
(dialog_{correlation_tool, covariance_tool, sampling_tool,
descriptive_stat_tool, ztest_tool, ttest_paired_tool, ttest_eq_tool,
ttest_neq_tool, ftest_tool, random_tool, regression_tool,
average_tool, ranking_tool, anova_single_factor_tool,
anova_two_factor_without_r_tool, data_analysis}) : Ditto.
* src/workbook.c (workbook_can_close) : Ditto.
* src/item-cursor.c (item_cursor_target_region_ok) : Ditto.
* src/sheet.c (sheet_move_range) : Avoid leaking when we paste.
This information will be used when undo for pasteing a cut
is ready.
* README : update requirements.
* plugins/Makefile.am : Do not compile the python plugin by
default. This will avoid complaints regarding problems with
no dynamic python library until we have a solution.
* src/functions/fn-stat.c : (gnumeric_kurt, gnumeric_kurtp) : return DIV/0
on error.
2000-01-20 Jody Goldberg <jgoldberg@home.com>
* src/functions/fn-stat.c (gnumeric_kurtp, gnumeric_kurt) :
return DIV/0 on error.
* src/sheet.c (sheet_move_range) : Release the list of changed
expressions until we have paste_cut undo ready.
2000-01-20 Morten Welinder <terra@diku.dk>
* src/functions/fn-stat.c (gnumeric_stdev): Correct error code.
......
Thu Jan 20 16:52:14 2000 Morten Welinder <welinder@rentec.com>
2000-01-21 Jody Goldberg <jgoldberg@home.com>
* src/dialogs/dialog-printer-setup.c (do_hf_config) : Take a Workbook.
* src/gnumeric-util.c (gnumeric_dialog_run) : New function.
It is a wrapper for now. After the release of .48 we will
move the parent setting here. And handle the case where a
user closes the app window while a dialog is displayed.
* src/file.c (workbook_import) : Use gnumeric_dialog_run.
* src/dialogs/dialog-{dialog-zoom.c (dialog_zoom_impl)
summary.c (dialog_summary_update)
solver.c (dialog_solver)
solver.c (constr_add_click)
solver.c (dialog_solver_options)
simple-input.c (dialog_get_number, dialog_get_sheet_name)
printer.c (gnumeric_printer_dialog_run)
paste-special.c (dialog_paste_special)
insert-cells.c (dialog_insert_cells_impl)
goto-cell.c (dialog_goto_cell)
goal-seek.c (dialog_found_solution, dialog_goal_seek)
function-wizard.c (dialog_function_wizard)
delete-cells.c (dialog_delete_cells_impl)
cell-sort.c (dialog_cell_sort)
cell-format.c (fmt_dialog_impl)
cell-comment.c (dialog_cell_comment)
autosave.c (dialog_autosave_callback, dialog_autosave)
autocorrect.c (exceptions_callback)
(dialog_autocorrect)} : Ditto.
* src/dialogs/dialog-analysis-tools.c
(dialog_{correlation_tool, covariance_tool, sampling_tool,
descriptive_stat_tool, ztest_tool, ttest_paired_tool, ttest_eq_tool,
ttest_neq_tool, ftest_tool, random_tool, regression_tool,
average_tool, ranking_tool, anova_single_factor_tool,
anova_two_factor_without_r_tool, data_analysis}) : Ditto.
* src/workbook.c (workbook_can_close) : Ditto.
* src/item-cursor.c (item_cursor_target_region_ok) : Ditto.
* src/sheet.c (sheet_move_range) : Avoid leaking when we paste.
This information will be used when undo for pasteing a cut
is ready.
* README : update requirements.
* plugins/Makefile.am : Do not compile the python plugin by
default. This will avoid complaints regarding problems with
no dynamic python library until we have a solution.
* src/functions/fn-stat.c : (gnumeric_kurt, gnumeric_kurtp) : return DIV/0
on error.
2000-01-20 Jody Goldberg <jgoldberg@home.com>
* src/functions/fn-stat.c (gnumeric_kurtp, gnumeric_kurt) :
return DIV/0 on error.
* src/sheet.c (sheet_move_range) : Release the list of changed
expressions until we have paste_cut undo ready.
2000-01-20 Morten Welinder <terra@diku.dk>
* src/functions/fn-stat.c (gnumeric_stdev): Correct error code.
......
......@@ -27,13 +27,13 @@ Requirements
You need:
gnome-libs-1.0
gnome-libs-1.0.55
gnome-print-0.10
libxml-1.0
gnome-xml-1.8.5
libglade-0.11
Optionally:
bonobo-0.1
bonobo-0.5
Notes regarding plugins
......@@ -160,6 +160,8 @@ documentation for these:
- Control-Pg{Up,Down}: Switch to the previous/next worksheet.
- Alt-Pg{Up,Down}: Page left and right.
o Auto-convert-on-input features: When you enter text in Gnumeric
it is now matched against the known formats of Gnumeric and if
possible, converted to a (number, format) pair. This works
......
if WITH_PYTHON
PYTHON = python
else
PYTHON =
endif
# Do not build by default until the libtool problems with
# a static libpython are resolved.
# if WITH_PYTHON
# PYTHON = python
# else
# PYTHON =
# endif
if WITH_PERL
PERL = perl
......
......@@ -2077,7 +2077,7 @@ gnumeric_kurt (FunctionEvalInfo *ei, GList *expr_node_list)
range_kurtosis_m3_est,
COLLECT_IGNORE_STRINGS |
COLLECT_IGNORE_BOOLS,
gnumeric_err_VALUE);
gnumeric_err_DIV0);
}
/***************************************************************************/
......@@ -2110,7 +2110,7 @@ gnumeric_kurtp (FunctionEvalInfo *ei, GList *expr_node_list)
range_kurtosis_m3_pop,
COLLECT_IGNORE_STRINGS |
COLLECT_IGNORE_BOOLS,
gnumeric_err_VALUE);
gnumeric_err_DIV0);
}
/***************************************************************************/
......
......@@ -114,43 +114,43 @@ static const char *distribution_strs[] = {
};
static void
summary_stat_signal_fun()
summary_stat_signal_fun ()
{
ds.summary_statistics = !ds.summary_statistics;
}
static void
confidence_signal_fun()
confidence_signal_fun ()
{
ds.confidence_level = !ds.confidence_level;
}
static void
kth_largest_signal_fun()
kth_largest_signal_fun ()
{
ds.kth_largest = !ds.kth_largest;
}
static void
kth_smallest_signal_fun()
kth_smallest_signal_fun ()
{
ds.kth_smallest = !ds.kth_smallest;
}
static void
first_row_label_signal_fun()
first_row_label_signal_fun ()
{
label_row_flag = !label_row_flag;
}
static void
force_intercept_zero_signal_fun()
force_intercept_zero_signal_fun ()
{
intercept_flag = !intercept_flag;
}
static void
standard_errors_signal_fun()
standard_errors_signal_fun ()
{
standard_errors_flag = !standard_errors_flag;
}
......@@ -444,7 +444,7 @@ add_groupped_by(GtkWidget *box)
static void
dialog_correlation_tool(Workbook *wb, Sheet *sheet)
dialog_correlation_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range_entry, *output_range_entry;
......@@ -491,7 +491,7 @@ dialog_correlation_tool(Workbook *wb, Sheet *sheet)
correlation_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -525,7 +525,7 @@ correlation_dialog_loop:
}
static void
dialog_covariance_tool(Workbook *wb, Sheet *sheet)
dialog_covariance_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range_entry, *output_range_entry;
......@@ -571,7 +571,7 @@ dialog_covariance_tool(Workbook *wb, Sheet *sheet)
covariance_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -605,7 +605,7 @@ covariance_dialog_loop:
}
static void
dialog_sampling_tool(Workbook *wb, Sheet *sheet)
dialog_sampling_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box, *sampling_box, *sampling_label;
static GtkWidget *range_entry, *output_range_entry, *sampling_entry[2];
......@@ -678,7 +678,7 @@ dialog_sampling_tool(Workbook *wb, Sheet *sheet)
sampling_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -712,7 +712,7 @@ sampling_dialog_loop:
}
static void
dialog_descriptive_stat_tool(Workbook *wb, Sheet *sheet)
dialog_descriptive_stat_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range_entry, *output_range_entry;
......@@ -765,7 +765,7 @@ dialog_descriptive_stat_tool(Workbook *wb, Sheet *sheet)
stat_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -807,7 +807,7 @@ stat_dialog_loop:
}
static void
dialog_ztest_tool(Workbook *wb, Sheet *sheet)
dialog_ztest_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range1_entry, *range2_entry, *output_range_entry;
......@@ -869,7 +869,7 @@ dialog_ztest_tool(Workbook *wb, Sheet *sheet)
ztest_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -925,7 +925,7 @@ ztest_dialog_loop:
}
static void
dialog_ttest_paired_tool(Workbook *wb, Sheet *sheet)
dialog_ttest_paired_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range1_entry, *range2_entry, *output_range_entry;
......@@ -980,7 +980,7 @@ dialog_ttest_paired_tool(Workbook *wb, Sheet *sheet)
ttest_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -1030,7 +1030,7 @@ ttest_dialog_loop:
}
static void
dialog_ttest_eq_tool(Workbook *wb, Sheet *sheet)
dialog_ttest_eq_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range1_entry, *range2_entry, *output_range_entry;
......@@ -1085,7 +1085,7 @@ dialog_ttest_eq_tool(Workbook *wb, Sheet *sheet)
ttest_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -1135,7 +1135,7 @@ ttest_dialog_loop:
}
static void
dialog_ttest_neq_tool(Workbook *wb, Sheet *sheet)
dialog_ttest_neq_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range1_entry, *range2_entry, *output_range_entry;
......@@ -1191,7 +1191,7 @@ dialog_ttest_neq_tool(Workbook *wb, Sheet *sheet)
ttest_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -1241,7 +1241,7 @@ ttest_dialog_loop:
}
static void
dialog_ftest_tool(Workbook *wb, Sheet *sheet)
dialog_ftest_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box, *vbox;
static GtkWidget *range1_entry, *range2_entry, *output_range_entry;
......@@ -1291,7 +1291,7 @@ dialog_ftest_tool(Workbook *wb, Sheet *sheet)
ftest_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -1339,7 +1339,7 @@ ftest_dialog_loop:
static void
distribution_callback(GtkWidget *widget, random_tool_callback_t *p)
distribution_callback (GtkWidget *widget, random_tool_callback_t *p)
{
char *text;
......@@ -1378,7 +1378,7 @@ distribution_callback(GtkWidget *widget, random_tool_callback_t *p)
}
static void
dialog_random_tool(Workbook *wb, Sheet *sheet)
dialog_random_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box, *param_box, *distribution_combo;
static GtkWidget *vars_entry, *count_entry, *output_range_entry;
......@@ -1518,7 +1518,7 @@ dialog_random_tool(Workbook *wb, Sheet *sheet)
random_dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -1577,7 +1577,7 @@ random_dialog_loop:
}
static void
dialog_regression_tool(Workbook *wb, Sheet *sheet)
dialog_regression_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box, *vbox;
static GtkWidget *range1_entry, *range2_entry, *output_range_entry;
......@@ -1633,7 +1633,7 @@ dialog_regression_tool(Workbook *wb, Sheet *sheet)
dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -1705,7 +1705,7 @@ dialog_loop:
}
static void
dialog_average_tool(Workbook *wb, Sheet *sheet)
dialog_average_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box, *vbox;
static GtkWidget *range_entry, *output_range_entry;
......@@ -1753,7 +1753,7 @@ dialog_average_tool(Workbook *wb, Sheet *sheet)
dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -1794,7 +1794,7 @@ dialog_loop:
static void
dialog_ranking_tool(Workbook *wb, Sheet *sheet)
dialog_ranking_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range_entry, *output_range_entry;
......@@ -1841,7 +1841,7 @@ dialog_ranking_tool(Workbook *wb, Sheet *sheet)
dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -1876,7 +1876,7 @@ dialog_loop:
static void
dialog_anova_single_factor_tool(Workbook *wb, Sheet *sheet)
dialog_anova_single_factor_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range_entry, *output_range_entry, *alpha_entry;
......@@ -1926,7 +1926,7 @@ dialog_anova_single_factor_tool(Workbook *wb, Sheet *sheet)
dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -1964,7 +1964,7 @@ dialog_loop:
static void
dialog_anova_two_factor_without_r_tool(Workbook *wb, Sheet *sheet)
dialog_anova_two_factor_without_r_tool (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *box;
static GtkWidget *range_entry, *output_range_entry, *alpha_entry;
......@@ -2013,7 +2013,7 @@ dialog_anova_two_factor_without_r_tool(Workbook *wb, Sheet *sheet)
dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection != 0) {
gnome_dialog_close (GNOME_DIALOG (dialog));
return;
......@@ -2050,7 +2050,7 @@ dialog_loop:
static void
selection_made(GtkWidget *clist, gint row, gint column,
selection_made (GtkWidget *clist, gint row, gint column,
GdkEventButton *event, gpointer data)
{
selected_row = row;
......@@ -2059,7 +2059,6 @@ selection_made(GtkWidget *clist, gint row, gint column,
void
dialog_data_analysis (Workbook *wb, Sheet *sheet)
{
static GtkWidget *dialog, *scrolled_win;
static GtkWidget *main_label;
......@@ -2118,7 +2117,7 @@ dialog_data_analysis (Workbook *wb, Sheet *sheet)
gtk_widget_grab_focus (GTK_WIDGET(tool_list));
/* Run the dialog */
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
gnome_dialog_close (GNOME_DIALOG (dialog));
if (selection == 0) {
......
......@@ -337,8 +337,7 @@ exceptions_callback (GtkWidget *widget, autocorrect_t *p)
gtk_signal_connect (GTK_OBJECT (remove), "clicked",
GTK_SIGNAL_FUNC (remove_in_clicked), &e2);
v = gnome_dialog_run (GNOME_DIALOG (dia));
v = gnumeric_dialog_run (p->wb, GNOME_DIALOG (dia));
if (v != -1)
gtk_object_destroy (GTK_OBJECT (dia));
gtk_object_unref (GTK_OBJECT (gui));
......@@ -434,7 +433,7 @@ dialog_autocorrect (Workbook *wb)
gtk_signal_connect (GTK_OBJECT (replace), "toggled",
GTK_SIGNAL_FUNC (replace_toggled), wb);
#endif
v = gnome_dialog_run (GNOME_DIALOG (dia));
v = gnumeric_dialog_run (wb, GNOME_DIALOG (dia));
if (v != 0) {
autocorrect_init_caps = old_init_caps;
......
......@@ -48,7 +48,7 @@ dialog_autosave_callback (gpointer *data)
gnome_dialog_set_parent (GNOME_DIALOG (dia),
GTK_WINDOW (wb->toplevel));
v = gnome_dialog_run (GNOME_DIALOG (dia));
v = gnumeric_dialog_run (wb, GNOME_DIALOG (dia));
if (v != -1)
gtk_object_destroy (GTK_OBJECT (dia));
gtk_object_unref (GTK_OBJECT (gui));
......@@ -118,7 +118,7 @@ dialog_autosave (Workbook *wb)
gtk_entry_set_text (GTK_ENTRY (minutes), buf);
loop:
v = gnome_dialog_run (GNOME_DIALOG (dia));
v = gnumeric_dialog_run (wb, GNOME_DIALOG (dia));
if (v == 0) {
gchar *txt;
......
......@@ -45,7 +45,7 @@ dialog_cell_comment (Workbook *wb, Cell *cell)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_widget_grab_focus (text);
v = gnome_dialog_run (GNOME_DIALOG (dialog));
v = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (v == -1)
return;
......
......@@ -16,6 +16,7 @@
#include "widgets/widget-font-selector.h"
#include "widgets/gnumeric-dashed-canvas-line.h"
#include "gnumeric-sheet.h"
#include "gnumeric-util.h"
#include "selection.h"
#include "ranges.h"
#include "format.h"
......@@ -2096,7 +2097,8 @@ fmt_dialog_impl (FormatState *state, MStyleBorder **borders)
state->enable_edit = TRUE;
/* Bring up the dialog, and run it until someone hits ok or cancel */
while ((res = gnome_dialog_run (GNOME_DIALOG (dialog))) > 0)
while ((res = gnumeric_dialog_run (state->sheet->workbook,
GNOME_DIALOG (dialog))) > 0)
;
g_free ((char *)state->format.spec);
......
......@@ -616,7 +616,7 @@ dialog_cell_sort (Workbook *inwb, Sheet *sheet)
/* Run the dialog */
cont = TRUE;
while (cont) {
btn = gnome_dialog_run (GNOME_DIALOG (sort_flow.dialog));
btn = gnumeric_dialog_run (inwb, GNOME_DIALOG (sort_flow.dialog));
if (btn == BUTTON_OK)
cont = dialog_cell_sort_ok (&sort_flow);
else if (btn == BUTTON_ADD)
......
......@@ -277,7 +277,7 @@ dialog_define_names (Workbook *wb)
gtk_signal_connect (GTK_OBJECT (state.list), "selection_changed",
GTK_SIGNAL_FUNC (select_name), &state);
v = gnome_dialog_run (GNOME_DIALOG (state.dia));
v = gnumeric_dialog_run (wb, GNOME_DIALOG (state.dia));
if (v == -1)
destroy_state (&state);
......
......@@ -39,7 +39,7 @@ dialog_delete_cells_impl (Workbook *wb, Sheet *sheet, GladeXML *gui)
GTK_WINDOW (wb->toplevel));
/* Bring up the dialog */
res = gnome_dialog_run (GNOME_DIALOG (dialog));
res = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (res == GNOME_OK) {
i = gtk_radio_group_get_selected
(GTK_RADIO_BUTTON(radio_0)->group);
......
......@@ -342,7 +342,7 @@ dialog_function_wizard (Workbook *wb, FunctionDefinition *fd)
function_wizard_create (&state);
if (gnome_dialog_run (GNOME_DIALOG(dialog)) == 0)
if (gnumeric_dialog_run (wb, GNOME_DIALOG(dialog)) == 0)
ans = get_text_value (&state);
gnome_dialog_close (GNOME_DIALOG(dialog));
......
......@@ -342,7 +342,7 @@ dialog_function_wizard (Workbook *wb, FunctionDefinition *fd)
function_wizard_create (&state);
if (gnome_dialog_run (GNOME_DIALOG(dialog)) == 0)
if (gnumeric_dialog_run (wb, GNOME_DIALOG(dialog)) == 0)
ans = get_text_value (&state);
gnome_dialog_close (GNOME_DIALOG(dialog));
......
......@@ -238,8 +238,10 @@ dialog_found_solution (Cell *set_cell, Cell *change_cell, float_t target_value)
(dialog)->vbox), label_box);
gtk_widget_show_all (dialog);
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
gnome_dialog_close (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (set_cell->sheet->workbook, GNOME_DIALOG (dialog));
if (selection >= 0)
gnome_dialog_close (GNOME_DIALOG (dialog));
g_free (status_str);
g_free (target_str);
......@@ -337,7 +339,7 @@ dialog_goal_seek (Workbook *wb, Sheet *sheet)
gtk_widget_grab_focus (set_entry);
dialog_loop:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (selection == 0) {
Cell *set_cell;
int set_cell_col, set_cell_row;
......@@ -440,5 +442,6 @@ dialog_loop:
value_release (old_value);
}
gnome_dialog_close (GNOME_DIALOG (dialog));
if (selection >= 0)
gnome_dialog_close (GNOME_DIALOG (dialog));
}
......@@ -75,7 +75,7 @@ dialog_goto_cell (Workbook *wb)
gtk_widget_grab_focus (entry);
/* Run the dialog */
if (gnome_dialog_run (GNOME_DIALOG (dialog)) == GNOME_OK) {
if (gnumeric_dialog_run (wb, GNOME_DIALOG (dialog)) == GNOME_OK) {
text = gtk_entry_get_text (GTK_ENTRY (entry));
......
......@@ -39,7 +39,7 @@ dialog_insert_cells_impl (Workbook *wb, Sheet *sheet, GladeXML *gui)
GTK_WINDOW (wb->toplevel));
/* Bring up the dialog */
res = gnome_dialog_run (GNOME_DIALOG (dialog));
res = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (res == GNOME_OK) {
i = gtk_radio_group_get_selected
(GTK_RADIO_BUTTON(radio_0)->group);
......
......@@ -118,7 +118,7 @@ dialog_paste_special (Workbook *wb)
/* Run the dialog */
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
v = gnome_dialog_run (GNOME_DIALOG (dialog));
v = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
/* If closed with the window manager, cancel */
if (v == -1)
......
......@@ -436,7 +436,7 @@ text_get (GtkText *text_widget)
}
static PrintHF *
do_hf_config (const char *title, PrintHF **config)
do_hf_config (const char *title, PrintHF **config, Workbook *wb)
{
GladeXML *gui = glade_xml_new (GNUMERIC_GLADEDIR "/hf-config.glade", NULL);
GtkText *left, *middle, *right;
......@@ -457,7 +457,7 @@ do_hf_config (const char *title, PrintHF **config)
text_insert (middle, (*config)->middle_format);
text_insert (right, (*config)->right_format);
v = gnome_dialog_run (GNOME_DIALOG (dialog));
v = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
if (v == 0) {
char *left_format, *right_format, *middle_format;
......@@ -501,7 +501,8 @@ do_header_config (GtkWidget *button, dialog_print_info_t *dpi)
{
PrintHF *hf;
hf = do_hf_config (_("Custom header configuration"), &dpi->header);
hf = do_hf_config (_("Custom header configuration"),