From cc4b0a54528bad2cf0fc6ea1b90c31d7aa5f4305 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Tue, 5 Jun 2007 08:44:20 +0000 Subject: [PATCH] don't replace the usage line with the description for optional parameters, 2007-06-05 Vincent Untz * glib/goption.c: (g_option_context_get_help): don't replace the usage line with the description for optional parameters, but append the description. (#444130) svn path=/trunk/; revision=5534 --- ChangeLog | 6 ++++++ glib/goption.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ddd4039..8d0e07b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-05 Vincent Untz + + * glib/goption.c: (g_option_context_get_help): don't replace the usage + line with the description for optional parameters, but append the + description. (#444130) + 2007-06-04 Matthias Clasen * configure.in: Bump version diff --git a/glib/goption.c b/glib/goption.c index 1548edc..c385140 100644 --- a/glib/goption.c +++ b/glib/goption.c @@ -573,14 +573,14 @@ g_option_context_get_help (GOptionContext *context, if (rest_description) { - g_string_printf (string, " "); - g_string_printf (string, rest_description); + g_string_append (string, " "); + g_string_append (string, rest_description); } if (context->parameter_string) { - g_string_printf (string, " "); - g_string_printf (string, TRANSLATE (context, context->parameter_string)); + g_string_append (string, " "); + g_string_append (string, TRANSLATE (context, context->parameter_string)); } g_string_append (string, "\n\n"); -- 2.7.4