Re: Bug 307312: gnome_program_init () should support GOption



Almost forgot, these patches are depends on the patch from Bug 302632:
no way to have a no-arg G_OPTION_ARG_CALLBACK; which has been committed.
So you need update glib.

Pawel Sliwowski

On Sun, 2005-06-19 at 14:17 +0000, Pawel Sliwowski wrote:
> Here is a patch set, which enables the use of goption to libgnome. This
> should help move away from libgnome and popt for gnome apps. I used
> expansion1 in GnomeModuleInfo to get GOptionGroup from all the modules.
> 
> There are 4 new GNOME PARMS
> - PARM_GOPTION_CONTEXT (readonly) - GOption Context
> - PARM_GOPTION_TABLE - The Applications GOptionEntry
> - PARM_GOPTION_NAME - The name to add to help
> - PARM_GOPTION_ENABLE - tell libgnome to use goption (default is FALSE)
> 
> I needed to patch libgnome,libgnomeui,libbonobo and libbonobui.
> 
> I also added a test case for people that want to try it out.
> 
> The help output look like this with goption enable:
> 
> Usage:
>   test [OPTION...] - Test
> 
> Help Options:
>   -?, --help                       Show help options
>   --help-all                       Show all help options
>   --help-gtk                       Show GTK+ Options
>   --help-bonbo_activation          Show Bonobo Activation Options
>   --help-libgnome                  Show Gnome Library Options
>   --help-gnome-client              Show Session management Options
>   --help-libgnomeui                Show GNOME GUI Library Options
> 
> Application Options:
>   --encoding                       Set the character encoding to be used to open  the files listed on the command line
>   --quit                           Quit an existing instance of gedit
>   --new-window                     Create a new toplevel window in an existing i nstance of gedit
>   --new-document                   Create a new document in an existing instance  of gedit
>   --display=DISPLAY                X display to use
> 
> 
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]