Commit 7c95256d authored by Jody Goldberg's avatar Jody Goldberg

Name guru defaults to absolute references.

* Name guru defaults to absolute references.

svn path=/trunk/; revision=16704
parent c2557c32
......@@ -3,6 +3,8 @@ Gnumeric 1.9.2
Jody:
* Fix distcheck. [#540284]
* Fix ODS import failure on win32. [#536552]
* Get closer to a turnkey win32 build. [#534291]
* Name guru defaults to absolute references.
Morten:
* Fix EOMONTH issue. [#540069]
......
2008-07-08 Jody Goldberg <jody@gnome.org>
* dialog-define-names.c (name_guru_init) : default to absolute
references.
2008-06-25 Jody Goldberg <jody@gnome.org>
* Release 1.9.1
......
......@@ -548,7 +548,11 @@ name_guru_init (NameGuruState *state, WBCGtk *wbcg)
state->dialog = glade_xml_get_widget (state->gui, "NameGuru");
definition_table = GTK_TABLE (glade_xml_get_widget (state->gui, "definition_table"));
state->name = GTK_ENTRY (glade_xml_get_widget (state->gui, "name"));
state->expr_entry = gnm_expr_entry_new (state->wbcg, TRUE);
state->expr_entry = g_object_new (GNM_EXPR_ENTRY_TYPE,
"flags", GNM_EE_SHEET_OPTIONAL | GNM_EE_DEFAULT_ABS_REF,
"with-icon", TRUE,
"scg", wbcg_cur_scg (wbcg),
NULL);
gtk_table_attach (definition_table, GTK_WIDGET (state->expr_entry),
1, 2, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
......
2008-07-08 Jody Goldberg <jody@gnome.org>
* gnumeric-expr-entry.c (gee_rangesel_reset) : add a DEFAULT_ABS_REF
flag to init things to absolute.
(gee_set_property) : add a flags property.
(gee_get_property) : ditto.
(gee_class_init) : ditto.
2008-06-25 Jody Goldberg <jody@gnome.org>
* Release 1.9.1
......
......@@ -88,6 +88,7 @@ enum {
PROP_UPDATE_POLICY,
PROP_WITH_ICON,
PROP_TEXT,
PROP_FLAGS,
PROP_SCG,
PROP_WBCG
};
......@@ -139,9 +140,10 @@ gee_rangesel_reset (GnmExprEntry *gee)
rs->text_start = 0;
rs->text_end = 0;
memset (&rs->ref, 0, sizeof (GnmRange));
if (!(gee->flags & GNM_EE_FORCE_ABS_REF))
rs->ref.a.col_relative = rs->ref.b.col_relative =
rs->ref.a.row_relative = rs->ref.b.row_relative = TRUE;
rs->ref.a.col_relative =
rs->ref.b.col_relative =
rs->ref.a.row_relative =
rs->ref.b.row_relative = ((gee->flags & (GNM_EE_FORCE_ABS_REF|GNM_EE_DEFAULT_ABS_REF)) == 0);
gee->rangesel.is_valid = FALSE;
}
......@@ -308,6 +310,10 @@ gee_set_property (GObject *object,
gnm_expr_entry_signal_update (gee, FALSE);
break;
case PROP_FLAGS:
gnm_expr_entry_set_flags (gee,
g_value_get_uint (value), GNM_EE_MASK);
break;
case PROP_SCG:
gnm_expr_entry_set_scg (gee,
SHEET_CONTROL_GUI (g_value_get_object (value)));
......@@ -338,6 +344,9 @@ gee_get_property (GObject *object,
case PROP_TEXT:
g_value_set_string (value, gnm_expr_entry_get_text (gee));
break;
case PROP_FLAGS:
g_value_set_uint (value, gee->flags);
break;
case PROP_SCG:
g_value_set_object (value, G_OBJECT (gee->scg));
break;
......@@ -701,6 +710,11 @@ gee_class_init (GObjectClass *gobject_class)
"The contents of the entry",
"",
GSF_PARAM_STATIC | G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_FLAGS,
g_param_spec_uint ("flags", NULL, NULL,
0, GNM_EE_MASK, 0,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_SCG,
g_param_spec_object ("scg", "SheetControlGUI",
......
......@@ -15,11 +15,12 @@ typedef enum {
GNM_EE_SINGLE_RANGE = 1 << 0,
GNM_EE_FORCE_ABS_REF = 1 << 1, /* takes precedence over FORCE_REL_REF */
GNM_EE_FORCE_REL_REF = 1 << 2,
GNM_EE_FULL_COL = 1 << 3,
GNM_EE_FULL_ROW = 1 << 4,
GNM_EE_SHEET_OPTIONAL = 1 << 5,
GNM_EE_FORMULA_ONLY = 1 << 6,
GNM_EE_MASK = 0x7F
GNM_EE_DEFAULT_ABS_REF = 1 << 3, /* lower priority than the _FORCE variants */
GNM_EE_FULL_COL = 1 << 4,
GNM_EE_FULL_ROW = 1 << 5,
GNM_EE_SHEET_OPTIONAL = 1 << 6,
GNM_EE_FORMULA_ONLY = 1 << 7,
GNM_EE_MASK = 0xFF
} GnmExprEntryFlags;
GType gnm_expr_entry_get_type (void);
......
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