GNOME Bugzilla – Bug 335874
[PATCH] Port to goption
Last modified: 2006-03-30 12:42:38 UTC
Please describe the problem: Since all the cool kids are doing it... Attached (in a second) is a patch to move yelp to the goption framework. Comments? Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 61936 [details] [review] Move to goption framework
You should add a g_object_unref (program) right before the end of main(), as to not leak the program.
The example 2 at http://developer.gnome.org/doc/API/2.0/libgnome/libgnome-gnome-program.html#gnome-program-init should then be changed, as this comportment is not highlighted. There's no g_object_unref call in the example.
DonS: I've tested here, and it seems to work fine. Can we make the changes chpe mentions in comment 2 and commit to HEAD?
Patch committed with chpes modification. Closing.
I just noticed another thing: "with-cache-dir" should be G_OPTION_ARG_FILENAME, not STRING. But it seems unused, maybe it should just be removed.