[Geany] Dealing with unknown command line options
Jeff Pohlmeyer
yetanothergeek at xxxxx
Fri Dec 21 11:33:13 UTC 2007
On Dec 21, 2007 4:30 AM, Enrico Tröger <enrico.troeger at uvena.de> wrote:
> Yes, I also thought about this but then we have to add
> code to manually parse these command line options.
I am just thinking to leave everything as-is, but just do something
simple like this, before any of the glib/gtk stuff:
for (i=1; i<argc; i++){
if (g_str_equal(argv[i],"--ft-names")) {
print_ft_names();
exit(0);
} else {
if (g_str_equal(argv[i],"--print-prefix")) {
print_prefix();
exit(0);
} else {
if (g_str_equal(argv[i],"--version") ||
g_str_equal(argv[i],"-v")) {
print_version();
exit(0);
}
}
> It is a just another bunch of code for very low use, probably.
I agree, there's really no reason why anybody would need this.
For what it's worth, I tested some other GTK apps from console:
gimp --version # works
wireshark --version # works
sylpheed --version # works
gftp-gtk # works
bluefish -v # can't open display!
( But I didn't check to see how they do it. )
> Maybe I'm missing something.
Or maybe I'm missing something. :-)
- Jeff
More information about the Users
mailing list