GNOME Bugzilla – Bug 335967
Evolution should use the GOption API
Last modified: 2013-09-10 14:00:30 UTC
Please describe the problem: Will attach a patch in a few seconds Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 61986 [details] [review] Might not even compile. I'm still testing this one This is just a tracking patch. It might not even compile. Working on it.
Created attachment 61987 [details] [review] Fixes some compilation problems This new version fixes some compilation problems. Going to test the functionality in a few minutes.
Other than a difference in output for "--help" this patch seems to work. Does the "--help" output difference matter? I'm not sure if it's possible to get the exact same output for "--help" using the GOption API. Little silly test: pvanhoof@lort:/opt/evo-test/bin$ ./evolution-2.6 --online --offline ./evolution-2.6: --online and --offline cannot be used together. Use ./evolution-2.6 --help for more information. pvanhoof@lort:/opt/evo-test/bin$ --help? pvanhoof@lort:/opt/evo-test/bin$ ./evolution-2.6 --help Usage: evolution-2.6 [OPTION...] - Evolution Help Options: -?, --help Show help options --help-all Show all help 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 Application Options: -c, --component Start Evolution activating the specified component --offline Start in offline mode --online Start in online mode --force-shutdown Forcibly shut down all Evolution components --force-migrate Forcibly re-migrate from Evolution 1.4 --debug Send the debugging output of all components to a file. --disable-eplugin Disable loading of any plugins. --display=DISPLAY X display to use pvanhoof@lort:/opt/evo-test/bin$ evolution --help Usage: evolution [OPTION...] --load-modules=MODULE1,MODULE2,... Dynamic modules to load Help options -?, --help Show this help message --usage Display brief usage message Application options -c, --component=STRING Start Evolution activating the specified component --offline Start in offline mode --online Start in online mode --force-shutdown Forcibly shut down all Evolution components --debug=STRING Send the debugging output of all components to a file. --disable-eplugin Disable loading of any plugins. GTK+ --gdk-debug=FLAGS Gdk debugging flags to set --gdk-no-debug=FLAGS Gdk debugging flags to unset --display=DISPLAY X display to use --screen=SCREEN X screen to use --sync Make X calls synchronous --name=NAME Program name as used by the window manager --class=CLASS Program class as used by the window manager --gtk-debug=FLAGS Gtk+ debugging flags to set --gtk-no-debug=FLAGS Gtk+ debugging flags to unset --g-fatal-warnings Make all warnings fatal --gtk-module=MODULE Load an additional Gtk module Bonobo activation Support --oaf-ior-fd=FD File descriptor to print IOR on --oaf-activate-iid=IID IID to activate --oaf-private Prevent registering of server with OAF GNOME GConf Support 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 Session management --sm-client-id=ID Specify session management ID --sm-config-prefix=PREFIX Specify prefix of saved configuration --sm-disable Disable connection to session manager GNOME GUI Library --disable-crash-dialog Disable Crash Dialog pvanhoof@lort:/opt/evo-test/bin$
FYI pvanhoof@lort:/opt/evo-test/bin$ ./evolution-2.6 --help-all Usage: evolution-2.6 [OPTION...] - Evolution Help Options: -?, --help Show help options --help-all Show all help 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 GTK+ Options --class=CLASS Program class as used by the window manager --name=NAME Program name as used by the window manager --screen=SCREEN X screen to use --sync Make X calls synchronous --gtk-module=MODULES Load additional GTK+ modules --g-fatal-warnings Make all warnings fatal Bonobo Activation --oaf-ior-fd=FD File descriptor to print IOR on --oaf-activate-iid=IID IID to activate --oaf-private Prevent registering of server with OAF 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 r unning --version 2.14.0 Session management --sm-client-id=ID Specify session management ID --sm-config-prefix=PREFIX Specify prefix of saved configuration --sm-disable Disable connection to session manager GNOME GUI Library --disable-crash-dialog Disable Crash Dialog Application Options: -c, --component Start Evolution activating the specified compon ent --offline Start in offline mode --online Start in online mode --force-shutdown Forcibly shut down all Evolution components --force-migrate Forcibly re-migrate from Evolution 1.4 --debug Send the debugging output of all components to a file. --disable-eplugin Disable loading of any plugins. --display=DISPLAY X display to use pvanhoof@lort:/opt/evo-test/bin$
Created attachment 61990 [details] [review] Final version Added ChangeLog entry and fixed some very minor indentation problems. Please let me know if I may commit this one.
for the records: http://live.gnome.org/GnomeGoals/PoptGOption
what the... gar... i'm running into firefox' reload bug again. sorry for the noise.
Adding a depends. Claudio raises an interesting question in that Bug #336085.
The patch looks good. Adding harish in the CC list for the final approval. Thanks for patch philip
Hey Partha and Harish. I'm going to keep this patch on hold as I need a little answer on this question: According to the new documentation of the function, is "context = g_option_context_new (_("- Evolution"))" incorrect. It should be something like " - A emailer and groupware client". Please let me know what string I should use here. Please take a look at Bug #336085 for more information.
"A groupware client" should suffice. what say??
no. :-) i already fixed this in /data/evolution.desktop.in.in (see bug 329744 on this), now it says: _GenericName=Groupware Suite _Comment=The Evolution PIM and Email Client so either use desktop.in.in's generic name or the comment, whatever comes nearest to the goption doc (i don't know the doc and I'm too lazy to take a look myself).
erm, is there a way to parse this out of that file? Not sure if that would be the best solution. Not doing so will of course add a translatable string. Perhaps is this something we want to avoid?
erm, sorry, my comment was vague. my intention was not to say "parse desktop.in.in", but "go ahead and add a translatable string which is quite similar to the string in desktop.in.in". i just want to avoid having one string stating "Groupware Suite" and one string stating "groupware client", that's why i commented on this.
Ok. Waiting for the final approvement of Harish. ps. I'm going to use the Comment string of Andre's desktop.in.in file.
Is there a conclusion for this patch? I'm still waiting for the final approvement of Harish.
Changing status to NEEDINFO. I need confirmation from the maintainer of Evolution and about the string that should be used.
Increasing priority field as the bug is solved but I need confirmation and info.
sorry for the delay in getting to this. The patch looks OK to me. I prefer using the Comment string too - manages to convey much more than an abstract 'GroupWare Suite'. Approved for commit.
not fixed, see bug 428328.
Oh, I think you can simply remove the -lpopt from the configure.ac