From: Matthias Clasen Date: Sun, 26 Mar 2006 20:15:19 +0000 (+0000) Subject: Improve the description of parameter_string in the docs. (#336085, Claudio X-Git-Tag: GLIB_2_11_0~93 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a205620a8808d1d161e47b9bbec9f81b07b30fdd;p=platform%2Fupstream%2Fglib.git Improve the description of parameter_string in the docs. (#336085, Claudio 2006-03-26 Matthias Clasen * glib/goption.c (g_option_context_new): Improve the description of parameter_string in the docs. (#336085, Claudio Saavedra) --- diff --git a/ChangeLog b/ChangeLog index abb5d28..4eba47c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-03-26 Matthias Clasen + + * glib/goption.c (g_option_context_new): Improve the description + of parameter_string in the docs. (#336085, Claudio Saavedra) + 2006-03-24 Martyn Russell * glib/gthreadpool.c: Updated the documentation to explain that diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index abb5d28..4eba47c 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2006-03-26 Matthias Clasen + + * glib/goption.c (g_option_context_new): Improve the description + of parameter_string in the docs. (#336085, Claudio Saavedra) + 2006-03-24 Martyn Russell * glib/gthreadpool.c: Updated the documentation to explain that diff --git a/glib/goption.c b/glib/goption.c index 73809e6..37a24cd 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -128,11 +128,27 @@ g_option_error_quark (void) /** * g_option_context_new: * @parameter_string: a string which is displayed in - * the first line of output, after + * the first line of output, after the + * usage summary * programname [OPTION...] * * Creates a new option context. * + * The @parameter_text can serve multiple purposes. It can be used + * to add descriptions for "rest" arguments, which are not parsed by + * the #GOptionContext, typically something like "FILES" or + * "FILE1 FILE2...". (If you are using #G_OPTION_REMAINING for + * collecting "rest" arguments, GLib handles this automatically by + * using the @arg_description of the corresponding #GOptionEntry in + * the usage summary.) + * + * Another common usage is to give a summary of the program + * functionality. This can be a short summary on the same line, + * like " - frob the strings", or a longer description in a paragraph + * below the usage summary. In this case, @parameter_string should start + * with two newlines, to separate the description from the usage summary: + * "\n\nA program to frob strings, which will..." + * * Returns: a newly created #GOptionContext, which must be * freed with g_option_context_free() after use. *