gnumeric r16955 - in trunk: plugins/fn-stat src/dialogs



Author: guelzow
Date: Sun Nov  9 04:22:26 2008
New Revision: 16955
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16955&view=rev

Log:
2008-11-08  Andreas J. Guelzow <aguelzow pyrshep ca>

	* dialog-function-select.c (describe_new_style): handle @{}




Modified:
   trunk/plugins/fn-stat/functions.c
   trunk/src/dialogs/ChangeLog
   trunk/src/dialogs/dialog-function-select.c

Modified: trunk/plugins/fn-stat/functions.c
==============================================================================
--- trunk/plugins/fn-stat/functions.c	(original)
+++ trunk/plugins/fn-stat/functions.c	Sun Nov  9 04:22:26 2008
@@ -3148,7 +3148,7 @@
 					"of determination; "
 					"that is the proportion of the sum of squares explained by the model.")},
 	{ GNM_FUNC_HELP_NOTE, F_("If the length of @{y} does not match the corresponding length of @{x}, "
-				 "this function  returns a #NUM! error")},
+				 "this function returns a #NUM! error.")},
 	{ GNM_FUNC_HELP_SEEALSO, "LOGEST,TREND" },
 	{ GNM_FUNC_HELP_END }
 };

Modified: trunk/src/dialogs/dialog-function-select.c
==============================================================================
--- trunk/src/dialogs/dialog-function-select.c	(original)
+++ trunk/src/dialogs/dialog-function-select.c	Sun Nov  9 04:22:26 2008
@@ -341,6 +341,9 @@
 #define ADD_LTEXT(text,len) gtk_text_buffer_insert (description, &ti, (text), (len))
 #define ADD_TEXT(text) ADD_LTEXT((text),-1)
 #define ADD_BOLD_TEXT(text,len) gtk_text_buffer_insert_with_tags (description, &ti, (text), (len), bold, NULL)
+#define ADD_TEXT_WITH_ARGS(text) { const char *t = text; while (*t) { const char *at = strstr (t, "@{"); \
+			if (at == NULL) { ADD_TEXT(t); break;} ADD_LTEXT(t, at - t); t = at + 2; at = strchr (t,'}'); \
+			if (at != NULL) { ADD_BOLD_TEXT(t, at - t); t = at + 1; } else {ADD_TEXT (t); break;}}} 
 
 static void
 describe_new_style (GtkTextBuffer *description, GnmFunc const *func)
@@ -365,7 +368,7 @@
 				break;
 			ADD_BOLD_TEXT (text, colon - text);
 			ADD_TEXT (": ");
-			ADD_TEXT (colon + 1);
+			ADD_TEXT_WITH_ARGS (colon + 1);
 			ADD_TEXT ("\n\n");
 			break;
 		}
@@ -390,7 +393,7 @@
 		case GNM_FUNC_HELP_DESCRIPTION: {
 			const char *text = F_(help->text);
 			ADD_TEXT ("\n");
-			ADD_TEXT (text);
+			ADD_TEXT_WITH_ARGS (text);
 			ADD_TEXT ("\n");
 			break;
 		}
@@ -398,7 +401,7 @@
 			const char *text = F_(help->text);
 			ADD_TEXT ("\n");
 			ADD_TEXT (_("Note: "));
-			ADD_TEXT (text);
+			ADD_TEXT_WITH_ARGS (text);
 			ADD_TEXT ("\n");
 			break;
 		}



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