GNOME Bugzilla – Bug 336384
[Patch] Use GOption instead of popt
Last modified: 2008-08-22 20:23:17 UTC
Please describe the problem: http://live.gnome.org/GnomeGoals/PoptGOption Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 62233 [details] [review] Move from popt to GOption Works for me but it should be tested.
It seems that not all arg desciptions are marked for translations. (This was the case even with popt, but it should be easy to update the patch.) Example: { "default", 'd', 0, G_OPTION_ARG_NONE, &gn_defaultmode, "Launch in execution with default settings", NULL }, should be patched with - "Launch in execution with default settings", + N_("Launch in execution with default settings"), Then the code which generates --help text, will automatically call gettext for parameter descriptions and --help message will be localised fully.
Created attachment 62248 [details] [review] Updated patch I have added N_() to the args descriptions.
Comment on attachment 62248 [details] [review] Updated patch Patch applied on cvs head.
The patch doesn't compile.
It compiles for me, but it requires libgnome 2.14, so this needs to be added also: diff -u -r1.195 configure.in --- configure.in 6 Apr 2006 13:28:20 -0000 1.195 +++ configure.in 6 Apr 2006 14:15:21 -0000 @@ -420,7 +412,7 @@ GTK_REQUIRED=2.4.1 GCONF_REQUIRED=2.6.1 LIBGLADE_REQUIRED=2.3.6 -LIBGNOME_REQUIRED=2.6.0 +LIBGNOME_REQUIRED=2.14.0 LIBGNOMEUI_REQUIRED=2.6.1 BONOBO_REQUIRED=2.6.1 GNOME_SPEECH_REQUIRED=0.3.5
I tried to run gnopernicus with this patch with latest glib (2.10.1), libbonobo (2.14.0) and libgnome (2.14.0) without success. This because gnopernicus adds by program some command line parameters. For example it adds "--gtk-module=gail:atk-bridge". Those are not options for gnopernicus itself, but for other modules used (gtk in this case). Those are not recognized by the new implementation with GOption. Is this a limitation of GOption?
Remus, you just need to add the gtk option group (wherever it is needed) like this: GOptionGroup *gtk_group = gtk_get_option_group (TRUE|FALSE); g_option_context_add_group (context, gtk_group); Go Go Go!
No, gnome_program_init automatically adds the gtk option group, you must not do it yourself. If there's a problem with --gtk-module=a:b:c which is an option from the gtk option group, then it's either a gtk+ problem or a goption problem. Is there anything left to do in this bug?
Any news about it?
Remus, can you please answer christian's question?
Can this patch be applied, please?
patch does no longer apply cleanly. I merged in the rejects manually and i am going to attach the patch again.
Created attachment 103104 [details] [review] Use GOption instead of popt just a 'manual rediff'
I've moded the GOption structs into seperate functions for command line parsing (trick from behdad). This means the structs don't linger in memory all the time the program runs. attaching updated patch. note that we are in code freeze.
Created attachment 104146 [details] [review] port from popt to glib command line parsing improved version not toroughly tested since I don't posses assistive technologies ;)
applies to current dev version
So, what's the status on this? Let it rot further?
Who ships/includes/uses gnopernicus instead of Orca? This project just seems to be dead. Latest non-translation commit I see in svn is Date: Mon Aug 21 13:16:19 2006 UTC (22 months ago) Maybe we should just close all existing bugs as WONTFIX.
There have not been any code commits to Gnopernicus for more than two years, and Gnopernicus has been superseded by Orca in GNOME. Gnopernicus has been moved to the SVN archives today, and the developers did not respond to any emails. Hence I'm closing all remaining 25 open bug reports as WONTFIX.