[Geany] Dealing with unknown command line options
Enrico Tröger
enrico.troeger at xxxxx
Sun Dec 23 16:46:50 UTC 2007
On Fri, 21 Dec 2007 09:20:02 -0700, Michal Kurgan
<michal.kurgan at moloh.net> wrote:
> On Fri, 21 Dec 2007 11:30:45 +0100
> Enrico Tröger <enrico.troeger at uvena.de> wrote:
>
> > > Better use "gtk_init_check" to not force termination or
> > [ ... ]
> > So the only possibility we have (AFAIK) is to manually parse the
> > commandline options(maybe with popt) but I don't want to add this.
>
> Then use "gtk_get_option_group" and "g_option_context_parse".
> It is used in other gtk and gnome application to connect application
> specific and standard gtk options. Look at the sources for examples
> (ie. evince[1] ).
Thanks for the hint, it's working now.
The trick is to pass FALSE to gtk_get_option_group(). After doing this,
all command line options also work on a plain text console without a
valid X display. This may cause other problems but I don't care. When
an user is using a GUI app on a plain text console, he should expect
problems.
Regards,
Enrico
--
Get my GPG key from http://www.uvena.de/pub.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20071223/2949a9bd/attachment.pgp>
More information about the Users
mailing list