gnumeric r16704 - in trunk: . src/dialogs src/widgets



Author: jody
Date: Wed Jul  9 02:13:49 2008
New Revision: 16704
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16704&view=rev

Log:
* Name guru defaults to absolute references.

Modified:
   trunk/NEWS
   trunk/src/dialogs/ChangeLog
   trunk/src/dialogs/dialog-define-names.c
   trunk/src/widgets/ChangeLog
   trunk/src/widgets/gnumeric-expr-entry.c
   trunk/src/widgets/gnumeric-expr-entry.h

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Wed Jul  9 02:13:49 2008
@@ -3,6 +3,8 @@
 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]

Modified: trunk/src/dialogs/dialog-define-names.c
==============================================================================
--- trunk/src/dialogs/dialog-define-names.c	(original)
+++ trunk/src/dialogs/dialog-define-names.c	Wed Jul  9 02:13:49 2008
@@ -548,7 +548,11 @@
 	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,

Modified: trunk/src/widgets/gnumeric-expr-entry.c
==============================================================================
--- trunk/src/widgets/gnumeric-expr-entry.c	(original)
+++ trunk/src/widgets/gnumeric-expr-entry.c	Wed Jul  9 02:13:49 2008
@@ -88,6 +88,7 @@
 	PROP_UPDATE_POLICY,
 	PROP_WITH_ICON,
 	PROP_TEXT,
+	PROP_FLAGS,
 	PROP_SCG,
 	PROP_WBCG
 };
@@ -139,9 +140,10 @@
 	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 @@
 		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 @@
 	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;
@@ -702,6 +711,11 @@
 			"",
 			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",
 			"The GUI container associated with the entry.",

Modified: trunk/src/widgets/gnumeric-expr-entry.h
==============================================================================
--- trunk/src/widgets/gnumeric-expr-entry.h	(original)
+++ trunk/src/widgets/gnumeric-expr-entry.h	Wed Jul  9 02:13:49 2008
@@ -15,11 +15,12 @@
 	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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]