[gnumeric] mark optional arguments in expr entry too; tip



commit d5c5d5d136c80aad9c94285d2df9b79866fea5dc
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue Jun 15 10:28:20 2010 -0600

    mark optional arguments in expr entry too; tip
    
    2010-06-15  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* gnumeric-expr-entry.c (gee_set_tooltip_argument): new
    	(gee_set_tooltip): use gee_set_tooltip_argument

 BUGS                              |   13 +++----------
 src/widgets/ChangeLog             |    5 +++++
 src/widgets/gnumeric-expr-entry.c |   14 ++++++++++++--
 3 files changed, 20 insertions(+), 12 deletions(-)
---
diff --git a/BUGS b/BUGS
index 82b791c..ec76d8f 100644
--- a/BUGS
+++ b/BUGS
@@ -48,9 +48,6 @@ Short term goals
     - undo of cell range cut over clipboard
       http://live.gnome.org/Academic
     - ={A1:A3+rand()}	only calls rand() once.
-    - validate names to ensure that they are not :
-	: simple values (eg TRUE)
-	: Range refs (even in other conventions) eg 'A1' or 'R'
 
 Misc stuff that should be fixed
 -------------------------------
@@ -59,8 +56,7 @@ Misc stuff that should be fixed
     - Freeze panes (tricky this is a view attribute)
     - `Add Scenario' Portion of Solver
     - Workbook attr changes
-    - Adding autofilters
-
+ 
 - cols/rows
     : Make unhide smarter to find hidden regions on either side of
       selected ranges.
@@ -112,9 +108,6 @@ Pending Patches
 Blocked Patches
 ---------------
 
-    http://bugzilla.gnome.org/show_bug.cgi?id=84062
-    - XIM menu, blocking on gtk changes
-
 -------------------------------------------------------------------------------
 Architecture Changes
 --------------------
@@ -346,8 +339,8 @@ Architecture Changes
     - Suport >100 style for SUBTOTAL
     - docs
 	: Translate each arg name + description seperately to get better
-	  commonality.
-	: Translate description paragraphs seperately to allow better grouping.
+	  commonality.                                                       (DONE)
+	: Translate description paragraphs seperately to allow better grouping.( DONE)
 	: Make 'func is foo compatible' a flag on the importers
 	: func_help [] = {							(DONE)
 	    { ARG, N_("issue:The issue date of the underlying bond") },
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index 16be652..3036d92 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,5 +1,10 @@
 2010-06-15  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* gnumeric-expr-entry.c (gee_set_tooltip_argument): new
+	(gee_set_tooltip): use gee_set_tooltip_argument
+	
+2010-06-15  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* gnumeric-expr-entry.h (gnm_expr_entry_enable_tips): new
 	(gnm_expr_entry_disable_tips): new
 	* gnumeric-expr-entry.c (gnm_expr_entry_enable_tips): new
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 4ec4e2c..1e9632b 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -657,6 +657,16 @@ gee_create_tooltip (GnmExprEntry *gee, gchar const *str)
 }
 
 static void
+gee_set_tooltip_argument (GString *str, char *arg, gboolean optional)
+{
+	if (optional)
+		g_string_append_c (str, '[');
+	g_string_append (str, arg);
+	if (optional)
+		g_string_append_c (str, ']');
+}
+
+static void
 gee_set_tooltip (GnmExprEntry *gee, GnmFunc *fd, gint args)
 {
 	GString *str;
@@ -689,10 +699,10 @@ gee_set_tooltip (GnmExprEntry *gee, GnmFunc *fd, gint args)
 				g_string_append_c (str, sep);
 			if (i == args) {
 				g_string_append (str, "\xe2\x9e\xa1");
-				g_string_append (str, arg_name);
+				gee_set_tooltip_argument (str, arg_name, i >= min);
 				g_string_append (str, "\xe2\xac\x85");
 			} else
-				g_string_append (str, arg_name);
+				gee_set_tooltip_argument (str, arg_name, i >= min);
 			g_free (arg_name);
 		} else
 			break;



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