On Wed, 19 Dec 2007 16:22:49 -0700, Michal Kurgan michal.kurgan@moloh.net wrote:
On Wed, 19 Dec 2007 15:59:12 -0600 "Jeff Pohlmeyer" yetanothergeek@gmail.com wrote:
On Dec 19, 2007 7:55 AM, Enrico Tröger enrico.troeger@uvena.de wrote:
I didn't find a way to get geany --version running on a text console.
Ooops, I had not thought of that one...
What if you first do a simple loop through the command line options, and if you find one of these:
--ft-names --print-prefix -v --version
Just print the requested information and exit, so glib/gtk will never "see" the option.
Yes, I also thought about this but then we have to add code to manually parse these command line options. I'd like to keep the GLib command line parsing API but it seems it doesn't work without a display.
Better use "gtk_init_check" to not force termination or
I did some testing with all these functions. gtk_init_check and gtk_init_with_args return FALSE if there is no display present. If they would parse the given command line options it would be ideally. Then we know there is no display and though we know which command line options were given. Unfortunately, all these functions doesn't parse the command line options in case there is no display found. The docs doesn't mention this clearly, IMO. 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. It is a just another bunch of code for very low use, probably. Especially because the code actually exists already in GLib.
Maybe I'm missing something.
Regards, Enrico