After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 350227 - GOption groups added by gnome_program_init lack ":"
GOption groups added by gnome_program_init lack ":"
Status: RESOLVED FIXED
Product: libgnome
Classification: Deprecated
Component: general
HEAD
Other Linux
: Normal trivial
: ---
Assigned To: libgnome maintainer
libgnome maintainer
Depends on:
Blocks:
 
 
Reported: 2006-08-07 06:39 UTC by Danielle Madeley
Modified: 2006-12-04 15:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Danielle Madeley 2006-08-07 06:39:50 UTC
Using GOption directly from GLib puts a ":" after the group name in each group.

eg.
Help Options:
  -?, --help                     Show help options
  --help-all                     Show all help options
  --help-processing              Show processing options
  --help-plotting                Show plotting options
  --help-gtk                     Show GTK+ Options
  --help-bonobo-activation       Show Bonobo Activation options
  --help-gnome                   Show GNOME options
  --help-gnome-session           Show session management options
  --help-gnome-ui                Show GNOME GUI options

Groups added by gnome_program_init do not do this.
eg.
GNOME Library
  --disable-sound                Disable sound server usage
  --enable-sound                 Enable sound server usage
  --espeaker=HOSTNAME:PORT       Host:port on which the sound server to use is running
  --version                      2.14.0

This is a trivial piece of consistancy.
Comment 1 Christian Persch 2006-08-07 18:17:09 UTC
Are you sure this has anything to do with libgnome?

From glib/glib/goption.c::print_help():

          g_print ("%s\n", group->description);

is printing just the group description, while it adds ":" for the standard ones:

      g_print ("%s\n  -%c, --%-*s %s\n",
               _("Help Options:"), '?', max_length - 4, "help",[...]
      g_print ("%s\n", _("Application Options:"));

Comment 2 Danielle Madeley 2006-08-08 02:42:54 UTC
Well, I would have originally had it put in GOption, but I'm not sure people will appreciate us changing the expected behaviour (going from not adding a ':' to adding a ':'), of course, they may not even notice.
Comment 3 Christian Persch 2006-08-08 10:31:03 UTC
I don't follow you... the help output is exactly the group name. Do you want to have libgnome add a ":" to it? Why not just fix glib to add a ":" just in the help output?
Comment 4 Danielle Madeley 2006-08-08 15:53:23 UTC
Well in order to make it consistant, either libgnome needs to add a ":" or GLib needs to add a ":". At the moment, since GLib is not adding a ":", changing GLib would change the expected behaviour.
Comment 5 Christian Persch 2006-12-03 21:58:38 UTC
Ok, I've though this over and I now think Davyd is right.
The 2nd param we use in g_option_group_new should end with ":".
Comment 6 Kjartan Maraas 2006-12-04 15:07:47 UTC
Fixed in gnome-ui-init.c and gnome-client.c