Commit afb8f70d authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Tidy up the namespacing. (gnm_expr_entry_new) : use the scg property which


2003-04-22  Jody Goldberg <jody@gnome.org>

	* gnumeric-expr-entry.c : Tidy up the namespacing.
	(gnm_expr_entry_new) : use the scg property which seems like a better
	  match than wbcg, but continue to take a wbcg to keep life simple.
	(gnm_expr_entry_thaw) : actually implement the update policies
	  partially.  Things are still broken for direct edits.  Mouse based
	  selection should work smoothly.
parent c8a685d1
......@@ -27,7 +27,7 @@ Pending Patches
1.5) Make colour combos viable mnemonic activation targets
1.6) make the 'apply' behavior of the color combo optional
1.7) Pinch Guppi's property bag code for GOGraphItem ?
1.8) chart group canvas item
1.8) chart group canvas item (DONE)
1.9) 2d plot group canvas item
1.10) gradient for background item
1.11) images for background item
......@@ -37,9 +37,9 @@ Pending Patches
- theme
- series style
- attributes for
: type
: instance
: data point
: type : GObject::parms
: instance : GObject::parms with a flag
: data point :
- layout
- axis management
......
......@@ -56,45 +56,6 @@ libgnomeui-2.0 >= 1.106.0
libgnomeprint-2.2 >= 2.2.0
libgnomeprintui-2.2 >= 2.2.0
"
#try_graphs=auto
#graph_msg="disabled by default"
#AC_ARG_WITH(graphs,
# [--{with,without}-graphs ],
# if test "x$withval" = xyes ; then
# try_graphs=auto
# elif test "x$withval" = xgtkextra -o "x$withval" = xGtkExtra -o "x$withval" = xGTKEXTRA; then
# try_graphs=gtkextra
# elif test "x$withval" = xguppi -o "x$withval" = xGuppi -o "x$withval" = xGUPPI; then
# try_graphs=guppi
# fi
#)
#if test "x$try_graphs" = "xgtkextra" -o "x$try_graphs" = "xauto" ; then
# PKG_CHECK_MODULES(LIBGTKEXTRA, [gtkextra-2.0 >= 1.1.0],
# [found_gtkextra="yes"],
# [found_gtkextra="no"])
# if test "x$found_gtkextra" = "xyes"; then
# gnumeric_reqs="$gnumeric_reqs gtkextra-2.0 >= 1.1.0"
# graph_msg=GtkExtra-2
# try_graphs=gtkextra # in case we were auto
# elif test "x$try_graphs" = "xgtkextra"; then
# graph_msg="GtkExtra not found"
# fi
#fi
#if test "x$try_graphs" = "xguppi" -o "x$try_graphs" = "xauto" ; then
# PKG_CHECK_MODULES(LIBGUPPI, [libguppi-2 >= 0.50.0],
# [found_guppi="yes"],
# [found_guppi="no"])
# if test "x$found_guppi" = "xyes"; then
# gnumeric_reqs="$gnumeric_reqs libguppi-2 >= 0.50.0"
# graph_msg=Guppi
# try_graphs=guppi # in case we were auto
# elif test "x$try_graphs" = "xguppi"; then
# graph_msg="Guppi not found"
# else
# graph_msg="Neither GtkExtra nor Guppi was found"
# fi
#fi
#
dnl **************
dnl Bonobo support
dnl **************
......
SUBDIRS = egg foocanvas # goffice
SUBDIRS = egg foocanvas #goffice
......@@ -58,7 +58,7 @@ cb_focus_on_entry (GtkWidget *widget, GtkWidget *entry)
if (GTK_TOGGLE_BUTTON (widget)->active)
gtk_widget_grab_focus
(GTK_WIDGET (gnm_expr_entry_get_entry
(GNUMERIC_EXPR_ENTRY (entry))));
(GNM_EXPR_ENTRY (entry))));
}
/**
......@@ -108,11 +108,9 @@ dialog_tool_init_outputs (GenericToolState *state, GtkSignalFunc sensitivity_cb)
state->retain_comments_button = glade_xml_get_widget
(state->gui, "retain_comments_button");
table = GTK_TABLE (glade_xml_get_widget (state->gui, "output-table"));
state->output_entry = gnumeric_expr_entry_new (state->wbcg, TRUE);
state->output_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->output_entry,
GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
gnm_expr_entry_set_scg (state->output_entry,
wbcg_cur_scg (state->wbcg));
gtk_table_attach (table, GTK_WIDGET (state->output_entry),
1, 2, 2, 3,
GTK_EXPAND | GTK_FILL, 0,
......@@ -122,7 +120,7 @@ dialog_tool_init_outputs (GenericToolState *state, GtkSignalFunc sensitivity_cb)
G_CALLBACK (cb_focus_on_entry), state->output_entry);
g_signal_connect
(G_OBJECT (gnm_expr_entry_get_entry
(GNUMERIC_EXPR_ENTRY (state->output_entry))),
(GNM_EXPR_ENTRY (state->output_entry))),
"focus-in-event",
G_CALLBACK (tool_set_focus_output_range), state);
g_signal_connect_after (G_OBJECT (state->output_entry),
......@@ -164,7 +162,7 @@ parse_output (GenericToolState *state, data_analysis_output_t *dao)
break;
case 2:
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->output_entry), state->sheet);
(GNM_EXPR_ENTRY (state->output_entry), state->sheet);
g_return_val_if_fail (output_range != NULL, NULL);
g_return_val_if_fail (output_range->type == VALUE_CELLRANGE, NULL);
......
......@@ -64,7 +64,7 @@ advanced_filter_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
int i;
input_range = gnm_expr_entry_parse_as_value (
GNUMERIC_EXPR_ENTRY (state->input_entry), state->sheet);
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
if (input_range == NULL) {
gtk_label_set_text (GTK_LABEL (state->warning),
_("The list range is invalid."));
......@@ -86,7 +86,7 @@ advanced_filter_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
i = gnumeric_glade_group_value (state->gui, output_group);
if (i == 2) {
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->output_entry),
(GNM_EXPR_ENTRY (state->output_entry),
state->sheet);
if (output_range == NULL) {
gtk_label_set_text (GTK_LABEL (state->warning),
......@@ -124,7 +124,7 @@ advanced_filter_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
gboolean unique;
input = gnm_expr_entry_parse_as_value (
GNUMERIC_EXPR_ENTRY (state->input_entry), state->sheet);
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
criteria = gnm_expr_entry_parse_as_value
(state->input_entry_2, state->sheet);
......
......@@ -191,8 +191,8 @@ error_in_entry (GenericToolState *state, GtkWidget *entry, const char *err_str)
&(state->warning_dialog),
GTK_MESSAGE_ERROR, err_str);
if (IS_GNUMERIC_EXPR_ENTRY (entry))
gnm_expr_entry_grab_focus (GNUMERIC_EXPR_ENTRY (entry), TRUE);
if (IS_GNM_EXPR_ENTRY (entry))
gnm_expr_entry_grab_focus (GNM_EXPR_ENTRY (entry), TRUE);
else
focus_on_entry (GTK_ENTRY (entry));
}
......@@ -322,7 +322,7 @@ dialog_tool_init (GenericToolState *state,
GtkSignalFunc ok_function,
GtkSignalFunc close_function,
GtkSignalFunc sensitivity_cb,
GnumericExprEntryFlags flags)
GnmExprEntryFlags flags)
{
GtkTable *table;
GtkWidget *widget;
......@@ -358,12 +358,9 @@ dialog_tool_init (GenericToolState *state,
state->accel = gtk_accel_group_new ();
table = GTK_TABLE (glade_xml_get_widget (state->gui,
"input-table"));
state->input_entry = gnumeric_expr_entry_new (state->wbcg,
TRUE);
state->input_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->input_entry, flags,
GNM_EE_MASK);
gnm_expr_entry_set_scg (state->input_entry,
wbcg_cur_scg (state->wbcg));
gtk_table_attach (table, GTK_WIDGET (state->input_entry),
1, 2, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
......@@ -393,12 +390,9 @@ dialog_tool_init (GenericToolState *state,
GList *this_label_widget;
GtkTableChild *tchild;
state->input_entry_2 = gnumeric_expr_entry_new (state->wbcg,
TRUE);
state->input_entry_2 = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->input_entry_2,
GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
gnm_expr_entry_set_scg (state->input_entry_2,
wbcg_cur_scg (state->wbcg));
table = GTK_TABLE (gtk_widget_get_parent (widget));
this_label_widget = g_list_find_custom
......@@ -475,7 +469,7 @@ tool_load_selection (GenericToolState *state, gboolean allow_multiple)
}
gtk_widget_show (state->dialog);
gnm_expr_entry_grab_focus (GNUMERIC_EXPR_ENTRY (state->input_entry),
gnm_expr_entry_grab_focus (GNM_EXPR_ENTRY (state->input_entry),
FALSE);
}
......@@ -509,13 +503,13 @@ tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
Value *input_range_2;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->output_entry), state->sheet);
(GNM_EXPR_ENTRY (state->output_entry), state->sheet);
input_range = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->input_entry), state->sheet);
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
if (state->input_entry_2 != NULL) {
input_range_2 = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->input_entry_2), state->sheet);
(GNM_EXPR_ENTRY (state->input_entry_2), state->sheet);
} else {
input_range_2 = NULL;
}
......@@ -573,7 +567,7 @@ corr_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output (state, NULL);
data->input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->input_entry), state->sheet);
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->group_by = gnumeric_glade_group_value (state->gui, grouped_by_group);
w = glade_xml_get_widget (state->gui, "labels_button");
......@@ -690,7 +684,7 @@ cov_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output (state, NULL);
data->input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->input_entry), state->sheet);
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->group_by = gnumeric_glade_group_value (state->gui, grouped_by_group);
w = glade_xml_get_widget (state->gui, "labels_button");
......@@ -803,7 +797,7 @@ rank_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output (state, NULL);
data->base.input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->input_entry), state->sheet);
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->base.group_by = gnumeric_glade_group_value (state->gui, grouped_by_group);
w = glade_xml_get_widget (state->gui, "labels_button");
......@@ -892,7 +886,7 @@ fourier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output (state, NULL);
data->base.input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->input_entry), state->sheet);
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->base.group_by = gnumeric_glade_group_value (state->gui, grouped_by_group);
w = glade_xml_get_widget (state->gui, "labels_button");
......@@ -991,7 +985,7 @@ cb_desc_stat_tool_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output ((GenericToolState *)state, NULL);
data->base.input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnumeric_glade_group_value (state->base.gui, grouped_by_group);
data->summary_statistics = gtk_toggle_button_get_active (
......@@ -1039,9 +1033,9 @@ desc_stat_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
GSList *input_range;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
input_range = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
j = gnumeric_glade_group_value (state->base.gui, stats_group);
......@@ -1196,10 +1190,10 @@ ttest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
gtk_widget_destroy (state->base.warning_dialog);
data->base.range_1 = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.range_2 = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
w = glade_xml_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
......@@ -1292,11 +1286,11 @@ ttest_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
Value *input_range_2;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
input_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
input_range_2 = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
err = entry_to_float (GTK_ENTRY (state->mean_diff_entry), &mean_diff, FALSE);
......@@ -1580,10 +1574,10 @@ ftest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
gtk_widget_destroy (state->base.warning_dialog);
data->range_1 = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->range_2 = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
w = glade_xml_get_widget (state->base.gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
......@@ -1621,11 +1615,11 @@ ftest_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
Value *input_range_2;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
input_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
input_range_2 = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
err = entry_to_float (GTK_ENTRY (state->alpha_entry), &alpha, FALSE);
......@@ -1723,9 +1717,9 @@ sampling_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
GSList *input_range;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
input_range = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
periodic = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->periodic_button));
......@@ -1777,7 +1771,7 @@ sampling_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->base.wbc = WORKBOOK_CONTROL (state->base.wbcg);
data->base.input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnumeric_glade_group_value (state->base.gui, grouped_by_group);
w = glade_xml_get_widget (state->base.gui, "labels_button");
......@@ -1964,9 +1958,9 @@ regression_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->base.wbc = WORKBOOK_CONTROL (state->base.wbcg);
data->base.input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->y_input = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
data->base.group_by = gnumeric_glade_group_value (state->base.gui, grouped_by_group);
w = glade_xml_get_widget (state->base.gui, "labels_button");
......@@ -2033,11 +2027,11 @@ regression_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
Value *input_range_2;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
input_range = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
input_range_2 = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
err = entry_to_float (GTK_ENTRY (state->confidence_entry), &confidence, FALSE);
......@@ -2140,7 +2134,7 @@ exp_smoothing_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output ((GenericToolState *)state, NULL);
data->base.input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnumeric_glade_group_value (state->base.gui, grouped_by_group);
w = glade_xml_get_widget (state->base.gui, "labels_button");
......@@ -2178,9 +2172,9 @@ exp_smoothing_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
GSList *input_range;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
input_range = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
err = entry_to_float (GTK_ENTRY (state->damping_fact_entry), &damp_fact, FALSE);
......@@ -2282,7 +2276,7 @@ average_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output ((GenericToolState *)state, NULL);
data->base.input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnumeric_glade_group_value (state->base.gui, grouped_by_group);
w = glade_xml_get_widget (state->base.gui, "labels_button");
......@@ -2319,9 +2313,9 @@ average_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
GSList *input_range;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
input_range = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
err = entry_to_int (GTK_ENTRY (state->interval_entry), &interval, FALSE);
......@@ -2421,18 +2415,18 @@ histogram_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
Value *input_range_2 = NULL;
input_range = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
if (i == 2)
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.output_entry), state->base.sheet);
predetermined_bins = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (state->predetermined_button));
if (predetermined_bins)
input_range_2 = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
input_ready = (input_range != NULL);
bin_ready = (predetermined_bins && input_range_2 != NULL) ||
......@@ -2475,7 +2469,7 @@ histogram_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output ((GenericToolState *)state, NULL);
data->input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->group_by = gnumeric_glade_group_value (state->base.gui, grouped_by_group);
if (gtk_toggle_button_get_active (
......@@ -2483,7 +2477,7 @@ histogram_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = glade_xml_get_widget (state->base.gui, "labels_2_button");
data->bin_labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
data->bin = g_slist_prepend (NULL, gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry_2),
(GNM_EXPR_ENTRY (state->base.input_entry_2),
state->base.sheet));
} else {
entry_to_int(state->n_entry, &data->n,TRUE);
......@@ -2678,7 +2672,7 @@ anova_single_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output ((GenericToolState *)state, NULL);
data->base.input = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnumeric_glade_group_value (state->base.gui, grouped_by_group);
w = glade_xml_get_widget (state->base.gui, "labels_button");
......@@ -2715,10 +2709,10 @@ anova_single_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
GSList *input_range;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry),
(GNM_EXPR_ENTRY (state->base.output_entry),
state->base.sheet);
input_range = gnm_expr_entry_parse_as_list (
GNUMERIC_EXPR_ENTRY (state->base.input_entry),
GNM_EXPR_ENTRY (state->base.input_entry),
state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
......@@ -2828,7 +2822,7 @@ anova_two_factor_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output ((GenericToolState *)state, NULL);
data->input = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry),
(GNM_EXPR_ENTRY (state->base.input_entry),
state->base.sheet);
data->err = analysis_tools_noerr;
data->wbc = WORKBOOK_CONTROL (state->base.wbcg);
......@@ -2920,10 +2914,10 @@ anova_two_factor_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
Value *input_range;
output_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.output_entry),
(GNM_EXPR_ENTRY (state->base.output_entry),
state->base.sheet);
input_range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->base.input_entry),
(GNM_EXPR_ENTRY (state->base.input_entry),
state->base.sheet);
i = gnumeric_glade_group_value (state->base.gui, output_group);
err_alpha = entry_to_float (GTK_ENTRY (state->alpha_entry), &alpha,
......
......@@ -116,8 +116,8 @@ typedef struct
} BorderPicker;
typedef struct {
GtkLabel *name;
GnumericExprEntry *entry;
GtkLabel *name;
GnmExprEntry *entry;
} ExprEntry;
typedef struct _FormatState
{
......@@ -2286,7 +2286,7 @@ fmt_dialog_init_protection_page (FormatState *state)
/*****************************************************************************/
static GnmExpr const *
validation_entry_to_expr (Sheet *sheet, GnumericExprEntry *gee)
validation_entry_to_expr (Sheet *sheet, GnmExprEntry *gee)
{
ParsePos pp;
parse_pos_init (&pp, sheet->workbook, sheet, 0, 0);
......@@ -2461,10 +2461,10 @@ static void
fmt_dialog_init_validation_expr_entry (FormatState *state, ExprEntry *entry,
char const *name, int i)
{
GnumericExprEntryFlags flags = GNM_EE_ABS_ROW | GNM_EE_ABS_COL | GNM_EE_SHEET_OPTIONAL;
GnmExprEntryFlags flags = GNM_EE_ABS_ROW | GNM_EE_ABS_COL | GNM_EE_SHEET_OPTIONAL;
entry->name = GTK_LABEL (glade_xml_get_widget (state->gui, name));
entry->entry = gnumeric_expr_entry_new (state->wbcg, TRUE);
entry->entry = gnm_expr_entry_new (state->wbcg, TRUE);
gtk_table_attach (state->validation.criteria_table,
GTK_WIDGET (entry->entry),
1, 3, 2+i, 3+i, GTK_EXPAND | GTK_FILL, 0, 0, 0);
......@@ -2472,7 +2472,6 @@ fmt_dialog_init_validation_expr_entry (FormatState *state, ExprEntry *entry,
gnumeric_editable_enters (
GTK_WINDOW (state->dialog),
GTK_WIDGET (entry->entry));
gnm_expr_entry_set_scg (entry->entry, wbcg_cur_scg (state->wbcg));
g_signal_connect (G_OBJECT (entry->entry),
"changed",
G_CALLBACK (cb_validation_changed), state);
......
......@@ -65,8 +65,8 @@ typedef struct {
GtkWidget *down_button;
GtkWidget *add_button;
GtkWidget *delete_button;
GnumericExprEntry *range_entry;
GnumericExprEntry *add_entry;
GnmExprEntry *range_entry;
GnmExprEntry *add_entry;
GtkListStore *model;
GtkTreeView *treeview;
GtkTreeSelection *selection;
......@@ -219,7 +219,7 @@ cb_update_add_sensitivity (G_GNUC_UNUSED GtkWidget *dummy,
Value *range_add;
range_add = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->add_entry), state->sheet);
(GNM_EXPR_ENTRY (state->add_entry), state->sheet);
if (state->sel == NULL || range_add == NULL) {
gtk_widget_set_sensitive (state->add_button, FALSE);
......@@ -247,7 +247,7 @@ cb_update_sensitivity (GtkWidget *dummy, SortFlowState *state)
int items;
range = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->range_entry), state->sheet);
(GNM_EXPR_ENTRY (state->range_entry), state->sheet);
if (range == NULL) {
if (state->sel != NULL) {
value_release (state->sel);
......@@ -558,7 +558,7 @@ cb_add_clicked (G_GNUC_UNUSED GtkWidget *w, SortFlowState *state)
int i;
range_add = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->add_entry), state->sheet);
(GNM_EXPR_ENTRY (state->add_entry), state->sheet);
g_return_if_fail (range_add != NULL && state->sel != NULL);
......@@ -670,18 +670,17 @@ dialog_init (SortFlowState *state)
table = GTK_TABLE (glade_xml_get_widget (state->gui, "cell_sort_table"));
/* setup range entry */
state->range_entry = gnumeric_expr_entry_new (state->wbcg, TRUE);
state->range_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->range_entry,
GNM_EE_SINGLE_RANGE,
GNM_EE_MASK);
gnm_expr_entry_set_scg (state->range_entry, wbcg_cur_scg (state->wbcg));
GNM_EE_SINGLE_RANGE,
GNM_EE_MASK);
gtk_table_attach (table, GTK_WIDGET (state->range_entry),
1, 2, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (state->range_entry));
gnumeric_expr_entry_set_update_policy (state->range_entry, GTK_UPDATE_DISCONTINUOUS);
gnm_expr_entry_set_update_policy (state->range_entry, GTK_UPDATE_DISCONTINUOUS);
gtk_widget_show (GTK_WIDGET (state->range_entry));
g_signal_connect (G_OBJECT (state->range_entry),
"update",
......@@ -690,11 +689,10 @@ dialog_init (SortFlowState *state)
table = GTK_TABLE (glade_xml_get_widget (state->gui, "cell_sort_buttons_table"));
/* setup add entry */
state->add_entry = gnumeric_expr_entry_new (state->wbcg, TRUE);
state->add_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->add_entry,
GNM_EE_SINGLE_RANGE,
GNM_EE_MASK);
gnm_expr_entry_set_scg (state->add_entry, wbcg_cur_scg (state->wbcg));
GNM_EE_SINGLE_RANGE,
GNM_EE_MASK);
gtk_table_attach (table, GTK_WIDGET (state->add_entry),
0, 2, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
......
......@@ -46,9 +46,9 @@ typedef struct {
GtkOptionMenu *function;
GtkOptionMenu *put;
GnumericExprEntry *source;
GnmExprEntry *source;
GnumericExprEntry *destination;
GnmExprEntry *destination;
GtkButton *add;
GtkCList *areas;
GtkButton *clear;
......@@ -113,7 +113,7 @@ construct_consolidate (ConsolidateState *state)
consolidate_set_mode (cs, mode);
range_value = gnm_expr_entry_parse_as_value
(GNUMERIC_EXPR_ENTRY (state->gui.destination), state->sheet);
(GNM_EXPR_ENTRY (state->gui.destination), state->sheet);
g_return_val_if_fail (range_value != NULL, NULL);
if (!consolidate_set_destination (cs, range_value)) {
......@@ -345,15 +345,15 @@ connect_signal_btn_clicked (ConsolidateState *state, GtkButton *button)
static void
setup_widgets (ConsolidateState *state, GladeXML *glade_gui)
{
GnumericExprEntryFlags flags;
GnmExprEntryFlags flags;
state->gui.dialog = GTK_DIALOG (glade_xml_get_widget (glade_gui, "dialog"));
state->gui.function = GTK_OPTION_MENU (glade_xml_get_widget (glade_gui, "function"));
state->gui.put = GTK_OPTION_MENU (glade_xml_get_widget (glade_gui, "put"));
state->gui.destination = gnumeric_expr_entry_new (state->wbcg, TRUE);
state->gui.source = gnumeric_expr_entry_new (state->wbcg, TRUE);
state->gui.destination = gnm_expr_entry_new (state->wbcg, TRUE);
state->gui.source = gnm_expr_entry_new (state->wbcg, TRUE);
state->gui.add = GTK_BUTTON (glade_xml_get_widget (glade_gui, "add"));
state->gui.areas = GTK_CLIST (glade_xml_get_widget (glade_gui, "areas"));
......@@ -378,9 +378,6 @@ setup_widgets (ConsolidateState *state, GladeXML *glade_gui)
gtk_widget_show (GTK_WIDGET (state->gui.destination));
gtk_widget_show (GTK_WIDGET (state->gui.source));
gnm_expr_entry_set_scg (state->gui.destination, wbcg_cur_scg (state->wbcg));
gnm_expr_entry_set_scg (state->gui.source, wbcg_cur_scg (state->wbcg));
flags = GNM_EE_SINGLE_RANGE;
gnm_expr_entry_set_flags (state->gui.destination, flags, flags);
gnm_expr_entry_set_flags (state->gui.source, flags, flags);
......
......@@ -52,7 +52,7 @@ typedef struct {
GtkListStore *model;
GtkTreeSelection *selection;
GtkEntry *name;
GnumericExprEntry *expr_entry;
GnmExprEntry *expr_entry;
GtkToggleButton *sheet_scope, *wb_scope;
GtkWidget *ok_button;
......@@ -480,14 +480,15 @@ name_guru_init (NameGuruState *state, WorkbookControlGUI *wbcg)
state->dialog = glade_xml_get_widget (state->gui, "NameGuru");
table2 = GTK_TABLE (glade_xml_get_widget (state->gui, "table2"));
state->name = GTK_ENTRY (glade_xml_get_widget (state->gui, "name"));
state->expr_entry = gnumeric_expr_entry_new (state->wbcg, TRUE);
state->expr_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_absolute (state->expr_entry);
gtk_table_attach (table2, GTK_WIDGET (state->expr_entry),
1, 2, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gnm_expr_entry_set_absolute (state->expr_entry);
gtk_widget_show (GTK_WIDGET (state->expr_entry));
state->sheet_scope = GTK_TOGGLE_BUTTON (glade_xml_get_widget (state->gui, "sheet_scope"));
state->wb_scope = GTK_TOGGLE_BUTTON (glade_xml_get_widget (state->gui, "workbook_scope"));
state->expr_names = NULL;
state->cur_name = NULL;
......@@ -540,8 +541,6 @@ name_guru_init (NameGuruState *state, WorkbookControlGUI *wbcg)
"activate",
G_CALLBACK (cb_entry_activate), state);
gnm_expr_entry_set_scg (state->expr_entry, wbcg_cur_scg (wbcg));
name_guru_populate_list (state);
gnumeric_init_help_button (
......
......@@ -53,8 +53,8 @@
typedef struct {
GladeXML *gui;
GtkWidget *dialog;
GnumericExprEntry *set_cell_entry;
GnumericExprEntry *change_cell_entry;
GnmExprEntry *set_cell_entry;
GnmExprEntry *change_cell_entry;
GtkWidget *to_value_entry;
GtkWidget *at_least_entry;
GtkWidget *at_most_entry;
......@@ -536,12 +536,11 @@ dialog_init (GoalSeekState *state)
state->result_frame = glade_xml_get_widget (state->gui, "result-frame");
table = GTK_TABLE (glade_xml_get_widget (state->gui, "goal-table"));