Commit ba32427d authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan

Set constraint clist title passive. (constr_add_click): Make solver dialog

2000-02-22  Jon K Hellan  <hellan@acm.org>

	* src/dialogs/dialog-solver.c (dialog_solver): Set constraint
	clist title passive.
	(constr_add_click): Make solver dialog reappear if user presses
	<Esc>. Make <Ret> in entry fields invoke default.
	(constr_change_click): Make <Ret> in entry fields invoke default.

	* src/dialogs/solver.glade: Make more room for constraint list title.

	* src/dialogs/solver.glade,
	src/dialogs/solver.glade.h: Accelerators.

	* src/dialogs/solver-options.glade,
	src/dialogs/solver-options.glade.h: Accelerators

	* src/dialogs/utils-dialog.[ch] (hbox_pack_label_and_entry):
	Explicit dialog parameter. Reorder arguments in signature.

	* src/dialogs/dialog-analysis-tools.c (dialog_sampling_tool,
	dialog_descriptive_stat_tool, dialog_ztest_tool,
	dialog_random_tool, dialog_regression_tool): Use new signature of
	hbox_pack_label_and_entry. This kills some Gtk warnings.
	(dialog_data_analysis): Do not destroy if gnumeric_dialog_run
	returns -1.

	* src/dialogs/autosave.glade, src/dialogs/autosave.glade.h :
	Accelerator for "minutes" field.

	* src/dialogs/autocorrect-exceptions.glade,
	src/dialogs/autocorrect-exceptions.glade.h: Accelerators

	* src/dialogs/dialog-autocorrect.c (exceptions_callback): Really
	make <Ret> in entry fields invoke default.

	* src/dialogs/dialog-goal-seek.c (dialog_found_solution):
	Deflickerize.
parent 91e89e9d
2000-02-22 Jon K Hellan <hellan@acm.org>
* src/dialogs/dialog-solver.c (dialog_solver): Set constraint
clist title passive.
(constr_add_click): Make solver dialog reappear if user presses
<Esc>. Make <Ret> in entry fields invoke default.
(constr_change_click): Make <Ret> in entry fields invoke default.
* src/dialogs/solver.glade: Make more room for constraint list title.
* src/dialogs/solver.glade,
src/dialogs/solver.glade.h: Accelerators.
* src/dialogs/solver-options.glade,
src/dialogs/solver-options.glade.h: Accelerators
* src/dialogs/utils-dialog.[ch] (hbox_pack_label_and_entry):
Explicit dialog parameter. Reorder arguments in signature.
* src/dialogs/dialog-analysis-tools.c (dialog_sampling_tool,
dialog_descriptive_stat_tool, dialog_ztest_tool,
dialog_random_tool, dialog_regression_tool): Use new signature of
hbox_pack_label_and_entry. This kills some Gtk warnings.
(dialog_data_analysis): Do not destroy if gnumeric_dialog_run
returns -1.
* src/dialogs/autosave.glade, src/dialogs/autosave.glade.h :
Accelerator for "minutes" field.
* src/dialogs/autocorrect-exceptions.glade,
src/dialogs/autocorrect-exceptions.glade.h: Accelerators
* src/dialogs/dialog-autocorrect.c (exceptions_callback): Really
make <Ret> in entry fields invoke default.
* src/dialogs/dialog-goal-seek.c (dialog_found_solution):
Deflickerize.
2000-02-21 Jody Goldberg <jgoldberg@home.com> 2000-02-21 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : Doh! * src/cell-draw.c (cell_draw) : Doh!
...@@ -60,7 +98,11 @@ ...@@ -60,7 +98,11 @@
(stf_read_workbook) : Detach sheet on parse error. (stf_read_workbook) : Detach sheet on parse error.
2000-02-21 Jon K Hellan <hellan@acm.org> 2000-02-21 Jon K Hellan <hellan@acm.org>
>>>>>>> 1.1342
* src/dialogs/dialog-analysis-tools.c (dialog_sampling_tool,
dialog_descriptive_stat_tool, dialog_ztest_tool,
dialog_random_tool, dialog_regression_tool): Deflickerize.
* src/dialogs/dialog-cell-sort.c (dialog_cell_sort): Deflickerize. * src/dialogs/dialog-cell-sort.c (dialog_cell_sort): Deflickerize.
......
2000-02-22 Jon K Hellan <hellan@acm.org>
* src/dialogs/dialog-solver.c (dialog_solver): Set constraint
clist title passive.
(constr_add_click): Make solver dialog reappear if user presses
<Esc>. Make <Ret> in entry fields invoke default.
(constr_change_click): Make <Ret> in entry fields invoke default.
* src/dialogs/solver.glade: Make more room for constraint list title.
* src/dialogs/solver.glade,
src/dialogs/solver.glade.h: Accelerators.
* src/dialogs/solver-options.glade,
src/dialogs/solver-options.glade.h: Accelerators
* src/dialogs/utils-dialog.[ch] (hbox_pack_label_and_entry):
Explicit dialog parameter. Reorder arguments in signature.
* src/dialogs/dialog-analysis-tools.c (dialog_sampling_tool,
dialog_descriptive_stat_tool, dialog_ztest_tool,
dialog_random_tool, dialog_regression_tool): Use new signature of
hbox_pack_label_and_entry. This kills some Gtk warnings.
(dialog_data_analysis): Do not destroy if gnumeric_dialog_run
returns -1.
* src/dialogs/autosave.glade, src/dialogs/autosave.glade.h :
Accelerator for "minutes" field.
* src/dialogs/autocorrect-exceptions.glade,
src/dialogs/autocorrect-exceptions.glade.h: Accelerators
* src/dialogs/dialog-autocorrect.c (exceptions_callback): Really
make <Ret> in entry fields invoke default.
* src/dialogs/dialog-goal-seek.c (dialog_found_solution):
Deflickerize.
2000-02-21 Jody Goldberg <jgoldberg@home.com> 2000-02-21 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : Doh! * src/cell-draw.c (cell_draw) : Doh!
...@@ -60,7 +98,11 @@ ...@@ -60,7 +98,11 @@
(stf_read_workbook) : Detach sheet on parse error. (stf_read_workbook) : Detach sheet on parse error.
2000-02-21 Jon K Hellan <hellan@acm.org> 2000-02-21 Jon K Hellan <hellan@acm.org>
>>>>>>> 1.1342
* src/dialogs/dialog-analysis-tools.c (dialog_sampling_tool,
dialog_descriptive_stat_tool, dialog_ztest_tool,
dialog_random_tool, dialog_regression_tool): Deflickerize.
* src/dialogs/dialog-cell-sort.c (dialog_cell_sort): Deflickerize. * src/dialogs/dialog-cell-sort.c (dialog_cell_sort): Deflickerize.
......
...@@ -88,13 +88,14 @@ ...@@ -88,13 +88,14 @@
<widget> <widget>
<class>GtkLabel</class> <class>GtkLabel</class>
<name>label3</name> <name>label3</name>
<label>Do not capitalize after:</label> <label>_Do not capitalize after:</label>
<justify>GTK_JUSTIFY_CENTER</justify> <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap> <wrap>False</wrap>
<xalign>0.5</xalign> <xalign>0.5</xalign>
<yalign>0.5</yalign> <yalign>0.5</yalign>
<xpad>0</xpad> <xpad>0</xpad>
<ypad>0</ypad> <ypad>0</ypad>
<focus_target>entry1</focus_target>
<child> <child>
<padding>0</padding> <padding>0</padding>
<expand>False</expand> <expand>False</expand>
...@@ -180,7 +181,7 @@ ...@@ -180,7 +181,7 @@
<class>GtkButton</class> <class>GtkButton</class>
<name>button4</name> <name>button4</name>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<label>Add</label> <label>_Add</label>
<child> <child>
<padding>0</padding> <padding>0</padding>
<expand>False</expand> <expand>False</expand>
...@@ -192,7 +193,7 @@ ...@@ -192,7 +193,7 @@
<class>GtkButton</class> <class>GtkButton</class>
<name>button5</name> <name>button5</name>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<label>Remove</label> <label>_Remove</label>
<child> <child>
<padding>0</padding> <padding>0</padding>
<expand>False</expand> <expand>False</expand>
...@@ -206,7 +207,7 @@ ...@@ -206,7 +207,7 @@
<class>GtkLabel</class> <class>GtkLabel</class>
<child_name>Notebook:tab</child_name> <child_name>Notebook:tab</child_name>
<name>label1</name> <name>label1</name>
<label>First Letter</label> <label>_First Letter</label>
<justify>GTK_JUSTIFY_CENTER</justify> <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap> <wrap>False</wrap>
<xalign>0.5</xalign> <xalign>0.5</xalign>
...@@ -235,13 +236,14 @@ ...@@ -235,13 +236,14 @@
<widget> <widget>
<class>GtkLabel</class> <class>GtkLabel</class>
<name>label4</name> <name>label4</name>
<label>Do not correct:</label> <label>Do _not correct:</label>
<justify>GTK_JUSTIFY_CENTER</justify> <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap> <wrap>False</wrap>
<xalign>0.5</xalign> <xalign>0.5</xalign>
<yalign>0.5</yalign> <yalign>0.5</yalign>
<xpad>0</xpad> <xpad>0</xpad>
<ypad>0</ypad> <ypad>0</ypad>
<focus_target>entry2</focus_target>
<child> <child>
<padding>0</padding> <padding>0</padding>
<expand>False</expand> <expand>False</expand>
...@@ -340,7 +342,7 @@ ...@@ -340,7 +342,7 @@
<class>GtkLabel</class> <class>GtkLabel</class>
<child_name>Notebook:tab</child_name> <child_name>Notebook:tab</child_name>
<name>label2</name> <name>label2</name>
<label>INitial CApitals</label> <label>_INitial CApitals</label>
<justify>GTK_JUSTIFY_CENTER</justify> <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap> <wrap>False</wrap>
<xalign>0.5</xalign> <xalign>0.5</xalign>
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
*/ */
gchar *s = N_("AutoCorrect Exceptions"); gchar *s = N_("AutoCorrect Exceptions");
gchar *s = N_("Do not capitalize after:"); gchar *s = N_("_Do not capitalize after:");
gchar *s = N_("_Add");
gchar *s = N_("_Remove");
gchar *s = N_("_First Letter");
gchar *s = N_("Do _not correct:");
gchar *s = N_("Add"); gchar *s = N_("Add");
gchar *s = N_("Remove"); gchar *s = N_("Remove");
gchar *s = N_("First Letter"); gchar *s = N_("_INitial CApitals");
gchar *s = N_("Do not correct:");
gchar *s = N_("Add");
gchar *s = N_("Remove");
gchar *s = N_("INitial CApitals");
...@@ -173,13 +173,14 @@ ...@@ -173,13 +173,14 @@
<widget> <widget>
<class>GtkLabel</class> <class>GtkLabel</class>
<name>label1</name> <name>label1</name>
<label>minutes</label> <label>_minutes</label>
<justify>GTK_JUSTIFY_CENTER</justify> <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap> <wrap>False</wrap>
<xalign>0.5</xalign> <xalign>0.5</xalign>
<yalign>0.5</yalign> <yalign>0.5</yalign>
<xpad>4</xpad> <xpad>4</xpad>
<ypad>0</ypad> <ypad>0</ypad>
<focus_target>minutes</focus_target>
<child> <child>
<padding>0</padding> <padding>0</padding>
<expand>False</expand> <expand>False</expand>
......
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
gchar *s = N_("Auto Save"); gchar *s = N_("Auto Save");
gchar *s = N_("_Automatic Save Every"); gchar *s = N_("_Automatic Save Every");
gchar *s = N_("_Prompt Before Saving"); gchar *s = N_("_Prompt Before Saving");
gchar *s = N_("minutes"); gchar *s = N_("_minutes");
...@@ -750,7 +750,7 @@ dialog_sampling_tool (Workbook *wb, Sheet *sheet) ...@@ -750,7 +750,7 @@ dialog_sampling_tool (Workbook *wb, Sheet *sheet)
box = new_frame(_("Input:"), box); box = new_frame(_("Input:"), box);
range_entry = hbox_pack_label_and_entry range_entry = hbox_pack_label_and_entry
(_("Input Range:"), "", 20, box); (dialog, box, _("Input Range:"), "", 20);
sampling_label = gtk_label_new (_("Sampling Method:")); sampling_label = gtk_label_new (_("Sampling Method:"));
...@@ -791,10 +791,8 @@ dialog_sampling_tool (Workbook *wb, Sheet *sheet) ...@@ -791,10 +791,8 @@ dialog_sampling_tool (Workbook *wb, Sheet *sheet)
output_range_entry = add_output_frame(box, &output_ops); output_range_entry = add_output_frame(box, &output_ops);
gtk_widget_show_all (dialog); gtk_widget_show_all (GNOME_DIALOG (dialog)->vbox);
} else }
gtk_widget_show_all (dialog);
gtk_widget_grab_focus (range_entry); gtk_widget_grab_focus (range_entry);
sampling_dialog_loop: sampling_dialog_loop:
...@@ -866,16 +864,16 @@ dialog_descriptive_stat_tool (Workbook *wb, Sheet *sheet) ...@@ -866,16 +864,16 @@ dialog_descriptive_stat_tool (Workbook *wb, Sheet *sheet)
box = new_frame(_("Input:"), box); box = new_frame(_("Input:"), box);
range_entry = hbox_pack_label_and_entry range_entry = hbox_pack_label_and_entry
(_("Input Range:"), "", 20, box); (dialog, box, _("Input Range:"), "", 20);
group_ops = add_groupped_by(box); group_ops = add_groupped_by(box);
add_check_buttons(box, first_row_label_button); add_check_buttons(box, first_row_label_button);
check_buttons = gtk_vbox_new (FALSE, 0); check_buttons = gtk_vbox_new (FALSE, 0);
add_check_buttons(check_buttons, desc_stat_buttons);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG gtk_box_pack_start (GTK_BOX (GNOME_DIALOG
(dialog)->vbox), (dialog)->vbox),
check_buttons, TRUE, TRUE, 0); check_buttons, TRUE, TRUE, 0);
add_check_buttons(check_buttons, desc_stat_buttons);
box = gtk_vbox_new (FALSE, 0); box = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG
...@@ -883,10 +881,8 @@ dialog_descriptive_stat_tool (Workbook *wb, Sheet *sheet) ...@@ -883,10 +881,8 @@ dialog_descriptive_stat_tool (Workbook *wb, Sheet *sheet)
output_range_entry = add_output_frame(box, &output_ops); output_range_entry = add_output_frame(box, &output_ops);
gtk_widget_show_all (dialog); gtk_widget_show_all (GNOME_DIALOG (dialog)->vbox);
} else }
gtk_widget_show_all (dialog);
gtk_widget_grab_focus (range_entry); gtk_widget_grab_focus (range_entry);
stat_dialog_loop: stat_dialog_loop:
...@@ -967,22 +963,22 @@ dialog_ztest_tool (Workbook *wb, Sheet *sheet) ...@@ -967,22 +963,22 @@ dialog_ztest_tool (Workbook *wb, Sheet *sheet)
box = new_frame(_("Input:"), box); box = new_frame(_("Input:"), box);
range1_entry = hbox_pack_label_and_entry range1_entry = hbox_pack_label_and_entry
(_("Variable 1 Range:"), "", 20, box); (dialog, box, _("Variable 1 Range:"), "", 20);
range2_entry = hbox_pack_label_and_entry range2_entry = hbox_pack_label_and_entry
(_("Variable 2 Range:"), "", 20, box); (dialog, box, _("Variable 2 Range:"), "", 20);
mean_diff_entry = hbox_pack_label_and_entry mean_diff_entry = hbox_pack_label_and_entry
(_("Hypothesized Mean Difference:"), "0", 20, box); (dialog, box, _("Hypothesized Mean Difference:"), "0", 20);
known_var1_entry = hbox_pack_label_and_entry known_var1_entry = hbox_pack_label_and_entry
(_("Variable 1 Variance (known):"), "", 20, box); (dialog, box, _("Variable 1 Variance (known):"), "", 20);
known_var2_entry = hbox_pack_label_and_entry known_var2_entry = hbox_pack_label_and_entry
(_("Variable 2 Variance (known):"), "", 20, box); (dialog, box, _("Variable 2 Variance (known):"), "", 20);
alpha_entry = hbox_pack_label_and_entry(_("Alpha:"), "0.95", alpha_entry = hbox_pack_label_and_entry
20, box); (dialog, box, _("Alpha:"), "0.95", 20);
add_check_buttons(box, first_row_label_button); add_check_buttons(box, first_row_label_button);
box = gtk_vbox_new (FALSE, 0); box = gtk_vbox_new (FALSE, 0);
...@@ -991,10 +987,8 @@ dialog_ztest_tool (Workbook *wb, Sheet *sheet) ...@@ -991,10 +987,8 @@ dialog_ztest_tool (Workbook *wb, Sheet *sheet)
output_range_entry = add_output_frame(box, &output_ops); output_range_entry = add_output_frame(box, &output_ops);
gtk_widget_show_all (dialog); gtk_widget_show_all (GNOME_DIALOG (dialog)->vbox);
} else }
gtk_widget_show_all (dialog);
gtk_widget_grab_focus (range1_entry); gtk_widget_grab_focus (range1_entry);
ztest_dialog_loop: ztest_dialog_loop:
...@@ -1651,10 +1645,10 @@ dialog_random_tool (Workbook *wb, Sheet *sheet) ...@@ -1651,10 +1645,10 @@ dialog_random_tool (Workbook *wb, Sheet *sheet)
(dialog)->vbox), box); (dialog)->vbox), box);
vars_entry = hbox_pack_label_and_entry vars_entry = hbox_pack_label_and_entry
(_("Number of Variables:"), "", 20, box); (dialog, box, _("Number of Variables:"), "", 20);
count_entry = hbox_pack_label_and_entry count_entry = hbox_pack_label_and_entry
(_("Number of Random Numbers:"), "", 20, box); (dialog, box, _("Number of Random Numbers:"), "", 20);
distribution_combo = gtk_combo_new (); distribution_combo = gtk_combo_new ();
gtk_combo_set_popdown_strings (GTK_COMBO (distribution_combo), gtk_combo_set_popdown_strings (GTK_COMBO (distribution_combo),
...@@ -1678,47 +1672,59 @@ dialog_random_tool (Workbook *wb, Sheet *sheet) ...@@ -1678,47 +1672,59 @@ dialog_random_tool (Workbook *wb, Sheet *sheet)
callback_data.discrete_box = gtk_vbox_new (FALSE, 0); callback_data.discrete_box = gtk_vbox_new (FALSE, 0);
discrete_range_entry = hbox_pack_label_and_entry discrete_range_entry = hbox_pack_label_and_entry
(_("Value and Probability Input Range:"), "", 20, (dialog, callback_data.discrete_box,
callback_data.discrete_box); _("Value and Probability Input Range:"), "", 20);
callback_data.uniform_box = gtk_vbox_new (FALSE, 0); callback_data.uniform_box = gtk_vbox_new (FALSE, 0);
uniform_lower_entry = uniform_lower_entry =
hbox_pack_label_and_entry(_("Between:"), "0", 20, hbox_pack_label_and_entry(dialog, callback_data.uniform_box,
callback_data.uniform_box); _("Between:"), "0", 20);
uniform_upper_entry = uniform_upper_entry =
hbox_pack_label_and_entry(_("And:"), "1", 20, hbox_pack_label_and_entry(dialog,
callback_data.uniform_box); callback_data.uniform_box,
_("And:"), "1", 20);
callback_data.normal_box = gtk_vbox_new (FALSE, 0); callback_data.normal_box = gtk_vbox_new (FALSE, 0);
normal_mean_entry = hbox_pack_label_and_entry normal_mean_entry = hbox_pack_label_and_entry
(_("Mean = "), "0", 20, callback_data.normal_box); (dialog, callback_data.normal_box, _("Mean = "),
"0", 20);
normal_stdev_entry = hbox_pack_label_and_entry normal_stdev_entry = hbox_pack_label_and_entry
(_("Standard Deviation = "), "1", 20, callback_data.normal_box); (dialog, callback_data.normal_box,
_("Standard Deviation = "), "1", 20);
callback_data.poisson_box = gtk_vbox_new (FALSE, 0); callback_data.poisson_box = gtk_vbox_new (FALSE, 0);
poisson_lambda_entry = hbox_pack_label_and_entry poisson_lambda_entry = hbox_pack_label_and_entry
(_("Lambda"), "0", 20, callback_data.poisson_box); (dialog, callback_data.poisson_box, _("Lambda"),
"0", 20);
callback_data.exponential_box = gtk_vbox_new (FALSE, 0); callback_data.exponential_box = gtk_vbox_new (FALSE, 0);
exponential_b_entry = hbox_pack_label_and_entry exponential_b_entry = hbox_pack_label_and_entry
(_("b Value"), "0", 20, callback_data.exponential_box); (dialog, callback_data.exponential_box, _("b Value"),
"0", 20);
callback_data.binomial_box = gtk_vbox_new (FALSE, 0); callback_data.binomial_box = gtk_vbox_new (FALSE, 0);
binomial_p_entry = hbox_pack_label_and_entry binomial_p_entry = hbox_pack_label_and_entry
(_("p Value"), "0", 20, callback_data.binomial_box); (dialog, callback_data.binomial_box, _("p Value"),
"0", 20);
binomial_trials_entry = hbox_pack_label_and_entry binomial_trials_entry = hbox_pack_label_and_entry
(_("Number of Trials"), "0", 20, callback_data.binomial_box); (dialog, callback_data.binomial_box, _("Number of Trials"),
"0", 20);
callback_data.negbinom_box = gtk_vbox_new (FALSE, 0); callback_data.negbinom_box = gtk_vbox_new (FALSE, 0);
negbinom_p_entry = hbox_pack_label_and_entry negbinom_p_entry = hbox_pack_label_and_entry
(_("p Value"), "0", 20, callback_data.negbinom_box); (dialog, callback_data.negbinom_box, _("p Value"),
"0", 20);
negbinom_f_entry = hbox_pack_label_and_entry negbinom_f_entry = hbox_pack_label_and_entry
(_("Number of Failures"), "0", 20, (dialog, callback_data.negbinom_box,
callback_data.negbinom_box); _("Number of Failures"), "0", 20);
callback_data.bernoulli_box = gtk_vbox_new (FALSE, 0); callback_data.bernoulli_box = gtk_vbox_new (FALSE, 0);
bernoulli_p_entry = hbox_pack_label_and_entry bernoulli_p_entry = hbox_pack_label_and_entry
(_("p Value"), "0", 20, callback_data.bernoulli_box); (dialog, callback_data.bernoulli_box, _("p Value"),
"0", 20);
box = gtk_vbox_new (FALSE, 0); box = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG
...@@ -1749,7 +1755,7 @@ dialog_random_tool (Workbook *wb, Sheet *sheet) ...@@ -1749,7 +1755,7 @@ dialog_random_tool (Workbook *wb, Sheet *sheet)
gtk_container_add(GTK_CONTAINER(param_box), gtk_container_add(GTK_CONTAINER(param_box),
callback_data.normal_box); callback_data.normal_box);
gtk_widget_show_all (dialog); gtk_widget_show_all (GNOME_DIALOG (dialog)->vbox);
gtk_widget_hide (callback_data.exponential_box); gtk_widget_hide (callback_data.exponential_box);
gtk_widget_hide (callback_data.negbinom_box); gtk_widget_hide (callback_data.negbinom_box);
gtk_widget_hide (callback_data.binomial_box); gtk_widget_hide (callback_data.binomial_box);
...@@ -1758,7 +1764,7 @@ dialog_random_tool (Workbook *wb, Sheet *sheet) ...@@ -1758,7 +1764,7 @@ dialog_random_tool (Workbook *wb, Sheet *sheet)
gtk_widget_hide (callback_data.normal_box); gtk_widget_hide (callback_data.normal_box);
gtk_widget_hide (callback_data.bernoulli_box); gtk_widget_hide (callback_data.bernoulli_box);
} else { } else {
gtk_widget_show_all (dialog); gtk_widget_show_all (GNOME_DIALOG (dialog)->vbox);
switch (distribution) { switch (distribution) {
case DiscreteDistribution: case DiscreteDistribution:
gtk_widget_hide (callback_data.uniform_box); gtk_widget_hide (callback_data.uniform_box);
...@@ -1956,13 +1962,13 @@ dialog_regression_tool (Workbook *wb, Sheet *sheet) ...@@ -1956,13 +1962,13 @@ dialog_regression_tool (Workbook *wb, Sheet *sheet)
(dialog)->vbox), box); (dialog)->vbox), box);
range1_entry = hbox_pack_label_and_entry range1_entry = hbox_pack_label_and_entry
(_("Input Y Range:"), "", 20, vbox); (dialog, vbox, _("Input Y Range:"), "", 20);
range2_entry = hbox_pack_label_and_entry range2_entry = hbox_pack_label_and_entry
(_("Input X Range:"), "", 20, vbox); (dialog, vbox, _("Input X Range:"), "", 20);
alpha_entry = hbox_pack_label_and_entry(_("Confidence Level:"), alpha_entry = hbox_pack_label_and_entry
"0.95", 20, vbox); (dialog, vbox, _("Confidence Level:"), "0.95", 20);
add_check_buttons(vbox, first_row_label_button); add_check_buttons(vbox, first_row_label_button);
add_check_buttons(vbox, force_intercept_zero_button); add_check_buttons(vbox, force_intercept_zero_button);
...@@ -1973,10 +1979,8 @@ dialog_regression_tool (Workbook *wb, Sheet *sheet) ...@@ -1973,10 +1979,8 @@ dialog_regression_tool (Workbook *wb, Sheet *sheet)
output_range_entry = add_output_frame(box, &output_ops); output_range_entry = add_output_frame(box, &output_ops);
gtk_widget_show_all (dialog); gtk_widget_show_all (GNOME_DIALOG (dialog)->vbox);
} else }
gtk_widget_show_all (dialog);
gtk_widget_grab_focus (range1_entry); gtk_widget_grab_focus (range1_entry);
dialog_loop: dialog_loop:
...@@ -2522,11 +2526,12 @@ dialog_data_analysis (Workbook *wb, Sheet *sheet) ...@@ -2522,11 +2526,12 @@ dialog_data_analysis (Workbook *wb, Sheet *sheet)
/* Run the dialog */ /* Run the dialog */
selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog)); selection = gnumeric_dialog_run (wb, GNOME_DIALOG (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (gui)); gtk_object_unref (GTK_OBJECT (gui));
if (selection == -1) if (selection == -1)
return; return;
else
gtk_object_destroy (GTK_OBJECT (dialog));
if (selection == 0) { if (selection == 0) {
g_return_if_fail (tools[selected_row].fun != NULL); g_return_if_fail (tools[selected_row].fun != NULL);
......
...@@ -293,24 +293,18 @@ exceptions_callback (GtkWidget *widget, autocorrect_t *p) ...@@ -293,24 +293,18 @@ exceptions_callback (GtkWidget *widget, autocorrect_t *p)
e1.entry = glade_xml_get_widget (gui, "entry1"); e1.entry = glade_xml_get_widget (gui, "entry1");
e1.list = glade_xml_get_widget (gui, "clist1"); e1.list = glade_xml_get_widget (gui, "clist1");
#if 0
/* Make <Ret> in entry fields invoke default */ /* Make <Ret> in entry fields invoke default */
/* *** FIXME: NO - invoke Add instead *** */
gnome_dialog_editable_enters (GNOME_DIALOG (dia), gnome_dialog_editable_enters (GNOME_DIALOG (dia),
GTK_EDITABLE (e1.entry)); GTK_EDITABLE (e1.entry));
#endif
gtk_signal_connect(GTK_OBJECT(e1.list), "select_row", gtk_signal_connect(GTK_OBJECT(e1.list), "select_row",
GTK_SIGNAL_FUNC(fl_select_row), NULL); GTK_SIGNAL_FUNC(fl_select_row), NULL);
e2.entry = glade_xml_get_widget (gui, "entry2"); e2.entry = glade_xml_get_widget (gui, "entry2");
e2.list = glade_xml_get_widget (gui, "clist2"); e2.list = glade_xml_get_widget (gui, "clist2");
#if 0
/* Make <Ret> in entry fields invoke default */ /* Make <Ret> in entry fields invoke default */
/* *** FIXME: NO - invoke Add instead *** */
gnome_dialog_editable_enters (GNOME_DIALOG (dia), gnome_dialog_editable_enters (GNOME_DIALOG (dia),
GTK_EDITABLE (e2.entry)); GTK_EDITABLE (e2.entry));
#endif
gtk_signal_connect(GTK_OBJECT(e2.list), "select_row", gtk_signal_connect(GTK_OBJECT(e2.list), "select_row",
GTK_SIGNAL_FUNC(in_select_row), NULL); GTK_SIGNAL_FUNC(in_select_row), NULL);
......
...@@ -238,7 +238,7 @@ dialog_found_solution (Cell *set_cell, Cell *change_cell, float_t target_value) ...@@ -238,7 +238,7 @@ dialog_found_solution (Cell *set_cell, Cell *change_cell, float_t target_value)
gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG
(dialog)->vbox), label_box); (dialog)->vbox), label_box);
gtk_widget_show_all (dialog); gtk_widget_show_all (GNOME_DIALOG (dialog)->vbox);
selection = gnumeric_dialog_run (set_cell->sheet->workbook, GNOME_DIALOG (dialog)); selection = gnumeric_dialog_run (set_cell->sheet->workbook, GNOME_DIALOG (dialog));
if (selection >= 0) if (selection >= 0)
......
...@@ -182,6 +182,13 @@ constr_add_click (GtkWidget *widget, constraint_dialog_t *constraint_dialog) ...@@ -182,6 +182,13 @@ constr_add_click (GtkWidget *widget, constraint_dialog_t *constraint_dialog)
type_entry = glade_xml_get_widget (gui, "combo1"); type_entry = glade_xml_get_widget (gui, "combo1");
combo_entry = glade_xml_get_widget (gui, "combo-entry1"); combo_entry = glade_xml_get_widget (gui, "combo-entry1");
gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
GTK_EDITABLE (lhs_entry));
gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
GTK_EDITABLE (combo_entry));
gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
GTK_EDITABLE (rhs_entry));
if (!dialog || !lhs_entry || !rhs_entry || if (!dialog || !lhs_entry || !rhs_entry ||
!type_entry || !combo_entry) { !type_entry || !combo_entry) {
printf ("Corrupt file solver.glade\n"); printf ("Corrupt file solver.glade\n");
...@@ -201,13 +208,11 @@ add_dialog: ...@@ -201,13 +208,11 @@ add_dialog:
selection = gnumeric_dialog_run (constraint_dialog->wb, selection = gnumeric_dialog_run (constraint_dialog->wb,
GNOME_DIALOG (dialog)); GNOME_DIALOG (dialog));
if (selection == -1){ if (selection == -1 || selection == GNOME_CANCEL) {
gtk_object_destroy (GTK_OBJECT (gui)); if (selection == -1)
return; gtk_object_destroy (GTK_OBJECT (gui));
} else
gnome_dialog_close (GNOME_DIALOG (dialog));
if (selection == 1) {
gnome_dialog_close (GNOME_DIALOG (dialog));
gtk_widget_show (constraint_dialog->dialog); gtk_widget_show (constraint_dialog->dialog);
return; return;
} }
...@@ -290,6 +295,13 @@ constr_change_click (GtkWidget *widget, constraint_dialog_t *data) ...@@ -290,6 +295,13 @@ constr_change_click (GtkWidget *widget, constraint_dialog_t *data)
return; return;
} }
gnome_dialog_editable_enters (GNOME_DIALOG (dia),