GNOME Bugzilla – Bug 336084
Use GOption instead of popt
Last modified: 2006-06-13 16:36:47 UTC
Port to GOption API for command line parsing. See also http://live.gnome.org/GnomeGoals/PoptGOption. I can't test my own patch since I'm still on 2.12 and my libgnome is too old, sorry.
Created attachment 62041 [details] [review] bug-buddy-goption.patch
Created attachment 62210 [details] [review] bug-buddy-goption-2.patch Removed the unnecessary g_option_context_free().
I think these two lines + { "appname", '\0', 0, G_OPTION_ARG_STRING, &goption_data.app_file, N_("File name of crashed program"), N_("FILE") }, [...] + { "core", '\0', 0, G_OPTION_ARG_STRING, &goption_data.core_file, N_("Core file from program"), N_("FILE") }, should ideally use G_OPTION_ARG_FILENAME instead... however that'll require more code changes (use as-is, convert to UTF-8 for display), and the current popt code makes no distinction either, so I think that can be done in a follow-up bug.
Thanks Christian. If I will have time I will update the patch in the next few days, otherwise we can file another bug after (if) committing.
Created attachment 62333 [details] [review] bug-buddy-goption-3.patch I have upgraded the patch. Now 'appname', 'core' and 'include' options are of G_OPTION_ARG_FILENAME type. It was easier than I thought it was, since all strings are displayed from buddy_set_text_widget(), so I convert the string to utf-8 there.
Fixed in 2.15.0 (although done by smitten.. because of a branch merge).