Commit 9a275ddd authored by Andreas J. Guelzow's avatar Andreas J. Guelzow Committed by Andreas J. Guelzow

add checkbox new (cb_dialog_formula_guru_ok_clicked): add as array

2005-06-09  Andreas J. Guelzow <aguelzow@taliesin.ca>

	* formula-guru.glade: add checkbox
	* dialog-formula-guru.c (dialog_formula_guru_is_array): new
	(cb_dialog_formula_guru_ok_clicked): add as array function if
	  requested
	(dialog_formula_guru_init): initialize state->array_button
parent 94b17773
Gnumeric 1.5.2
Andreas:
* permit formula guru to add array functions
Ivan:
* (Win32) Fix opening files with non-ascii names when users "open"
them in explorer. [#304874]
......
2006-06-02 Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
2005-06-09 Andreas J. Guelzow <aguelzow@taliesin.ca>
* formula-guru.glade: add checkbox
* dialog-formula-guru.c (dialog_formula_guru_is_array): new
(cb_dialog_formula_guru_ok_clicked): add as array function if
requested
(dialog_formula_guru_init): initialize state->array_button
2005-06-02 Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
* src/dialog/dialog-about.c (dialog_about): use
gog_object_set_position_flags.
......
......@@ -69,6 +69,7 @@ typedef struct
GtkWidget *selector_button;
GtkWidget *clear_button;
GtkWidget *zoom_button;
GtkWidget *array_button;
GtkWidget *main_button_area;
GtkTreePath* active_path;
char * prefix;
......@@ -626,6 +627,12 @@ cb_dialog_formula_guru_clear_clicked (G_GNUC_UNUSED GtkWidget *button,
return;
}
static gboolean
dialog_formula_guru_is_array (FormulaGuruState *state)
{
return gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->array_button));
}
/**
* cb_dialog_formula_guru_ok_clicked:
......@@ -642,7 +649,10 @@ cb_dialog_formula_guru_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
gnumeric_cell_renderer_expr_entry_editing_done (
GTK_CELL_EDITABLE (state->cellrenderer->entry),
state->cellrenderer);
wbcg_edit_finish (state->wbcg, WBC_EDIT_ACCEPT, NULL);
wbcg_edit_finish (state->wbcg,
dialog_formula_guru_is_array (state)
? WBC_EDIT_ACCEPT_ARRAY
: WBC_EDIT_ACCEPT, NULL);
}
static void
......@@ -825,6 +835,10 @@ dialog_formula_guru_init (FormulaGuruState *state)
/* Finished set-up of treeview */
state->array_button = glade_xml_get_widget (state->gui,
"array_button");
gtk_widget_set_sensitive (state->array_button, TRUE);
state->ok_button = glade_xml_get_widget (state->gui, "ok_button");
gtk_widget_set_sensitive (state->ok_button, TRUE);
g_signal_connect (G_OBJECT (state->ok_button),
......
......@@ -76,7 +76,7 @@
<property name="homogeneous">no</property>
<property name="row_spacing">4</property>
<property name="column_spacing">4</property>
<property name="n-rows">4</property>
<property name="n-rows">5</property>
<property name="n-columns">2</property>
<property name="visible">yes</property>
<child>
......@@ -176,6 +176,28 @@
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="array_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Enter as array function</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment