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

set active on sheet or workbook, don't set TRUE/FALSE on sheet.

2001-10-28  Jody Goldberg <jgoldberg@home.com>

	* dialog-define-names.c (name_guru_display_scope) : set active on
	  sheet or workbook, don't set TRUE/FALSE on sheet.
	(name_guru_init) : get the wb_scope button.
parent 686720a1
2001-10-28 Jody Goldberg <jgoldberg@home.com>
* dialog-define-names.c (name_guru_display_scope) : set active on
sheet or workbook, don't set TRUE/FALSE on sheet.
(name_guru_init) : get the wb_scope button.
2001-10-27 Almer S. Tigelaar <almer@gnome.org>
* dialog-cell-format.c (validation_style_condition_chain_rebuild): Rename
......
......@@ -35,6 +35,7 @@ typedef struct {
GtkEntry *name;
GnumericExprEntry *expr_text;
GtkToggleButton *sheet_scope;
GtkToggleButton *wb_scope;
GList *expr_names;
NamedExpression *cur_name;
......@@ -88,8 +89,10 @@ name_guru_display_scope (NameGuruState *state)
NamedExpression const *nexpr = state->cur_name;
state->updating = TRUE;
gtk_toggle_button_set_active (state->sheet_scope,
(nexpr != NULL && nexpr->pos.sheet != NULL));
if (nexpr == NULL || nexpr->pos.sheet == NULL)
gtk_toggle_button_set_active (state->wb_scope, TRUE);
else
gtk_toggle_button_set_active (state->sheet_scope, TRUE);
state->updating = FALSE;
}
......@@ -516,12 +519,12 @@ name_guru_init (NameGuruState *state, WorkbookControlGUI *wbcg)
0, 0);
gtk_widget_show (GTK_WIDGET (state->expr_text));
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->list = GTK_LIST (glade_xml_get_widget (state->gui, "name_list"));
state->expr_names = NULL;
state->cur_name = NULL;
state->updating = FALSE;
/* Init the scope combo box */
gtk_label_set_text (GTK_LABEL (GTK_BIN (state->sheet_scope)->child),
state->sheet->name_unquoted);
name_guru_display_scope (state);
......
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