summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-12-09 14:38:13 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-12-09 14:38:13 +0000
commit4f402e2489bf504eda8693c92a34538dc341de01 (patch)
tree4e0f3ab3d2f25d5fd09ac89c8234800ac6512913
parent10632e416f52fadc7f1b80ce9c8444085d06b2e2 (diff)
Don't print help options if the options of a specific group have been
2004-12-09 Matthias Clasen <mclasen@redhat.com> * glib/goption.c (print_help): Don't print help options if the options of a specific group have been requested. (#160645, Glynn Foster)
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-126
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--glib/goption.c35
6 files changed, 49 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 467eec569..090d0c645 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-09 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (print_help): Don't print help options
+ if the options of a specific group have been
+ requested. (#160645, Glynn Foster)
+
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_language_names): Update the returned
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 467eec569..090d0c645 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+2004-12-09 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (print_help): Don't print help options
+ if the options of a specific group have been
+ requested. (#160645, Glynn Foster)
+
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_language_names): Update the returned
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index 467eec569..090d0c645 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -1,3 +1,9 @@
+2004-12-09 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (print_help): Don't print help options
+ if the options of a specific group have been
+ requested. (#160645, Glynn Foster)
+
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_language_names): Update the returned
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 467eec569..090d0c645 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+2004-12-09 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (print_help): Don't print help options
+ if the options of a specific group have been
+ requested. (#160645, Glynn Foster)
+
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_language_names): Update the returned
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 467eec569..090d0c645 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+2004-12-09 Matthias Clasen <mclasen@redhat.com>
+
+ * glib/goption.c (print_help): Don't print help options
+ if the options of a specific group have been
+ requested. (#160645, Glynn Foster)
+
2004-12-07 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_get_language_names): Update the returned
diff --git a/glib/goption.c b/glib/goption.c
index afafa9bcb..11e867151 100644
--- a/glib/goption.c
+++ b/glib/goption.c
@@ -482,26 +482,29 @@ print_help (GOptionContext *context,
/* Add a bit of padding */
max_length += 4;
-
- list = context->groups;
-
- g_print ("%s\n --%-*s %s\n",
- _("Help Options:"), max_length, "help", _("Show help options"));
- /* We only want --help-all when there are groups */
- if (list)
- g_print (" --%-*s %s\n", max_length, "help-all", _("Show all help options"));
-
- while (list)
+ if (!group)
{
- GOptionGroup *group = list->data;
-
- g_print (" --help-%-*s %s\n", max_length - 5, group->name, TRANSLATE (group, group->help_description));
+ list = context->groups;
- list = list->next;
- }
+ g_print ("%s\n --%-*s %s\n",
+ _("Help Options:"), max_length, "help", _("Show help options"));
+
+ /* We only want --help-all when there are groups */
+ if (list)
+ g_print (" --%-*s %s\n", max_length, "help-all", _("Show all help options"));
- g_print ("\n");
+ while (list)
+ {
+ GOptionGroup *group = list->data;
+
+ g_print (" --help-%-*s %s\n", max_length - 5, group->name, TRANSLATE (group, group->help_description));
+
+ list = list->next;
+ }
+
+ g_print ("\n");
+ }
if (group)
{