Re: [gtk-vnc-devel] [patch] debug messages revisited
- From: Anthony Liguori <anthony codemonkey ws>
- To: Jonh Wendell <jwendell gnome org>
- Cc: gtk-vnc-devel List <gtk-vnc-devel lists sourceforge net>
- Subject: Re: [gtk-vnc-devel] [patch] debug messages revisited
- Date: Fri, 28 Mar 2008 22:53:57 -0500
Jonh Wendell wrote:
Ok, guys.
Here it's another approach:
- I dropped --enable-debug stuff in configure stage. We always build
with debug framework.
- There's a new function, vnc_display_get_option_group() which returns a
GOptionGroup, and should be used by apps if they want debug (and future
other stuff from gtk-vnc) support.
Example of usage in a client (vinagre):
context = g_option_context_new (_("- VNC Client for GNOME"));
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
g_option_context_add_group (context, gtk_get_option_group (TRUE));
g_option_context_add_group (context, vnc_display_get_option_group ());
g_option_context_parse (context, &argc, &argv, &error);
And that will appear like that:
LANG=C ./vinagre --help
Usage:
vinagre [OPTION...] [server:port] - VNC Client for GNOME
Help Options:
-?, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
--help-gtk-vnc Show GTK-VNC Options
Application Options:
-f, --file=filename Opens a .vnc file
--display=DISPLAY X display to use
LANG=C ./vinagre --help-gtk-vnc
Usage:
vinagre [OPTION...] [server:port] - VNC Client for GNOME
GTK-VNC Options
--gtk-vnc-debug Enables debug output
Very easy, all dirty job is done by GLib.
About the initialization of gtkglext:
I took a look at its source code, and all it does with the arguments is
to check for debug. I don't care about this. I think we don't need to
change anything. If it uses GOptions, we could easily add them into
gtk-vnc. One day, when it get merged into gtk+ that initialization will
be no longer necessary.
About the patch itself... comments?
Looks good to me!
Could just add add the necessary plumbing to examples/gvncviewer.c?
That's what I tend to use for debugging so it would be very helpful.
Regards,
Anthony Liguori
Cheers,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]