vinagre r273 - in branches/unstable: . src
- From: jwendell svn gnome org
- To: svn-commits-list gnome org
- Subject: vinagre r273 - in branches/unstable: . src
- Date: Sat, 29 Mar 2008 21:19:19 +0000 (GMT)
Author: jwendell
Date: Sat Mar 29 21:19:19 2008
New Revision: 273
URL: http://svn.gnome.org/viewvc/vinagre?rev=273&view=rev
Log:
2008-03-29 Jonh Wendell <jwendell gnome org>
* src/vinagre-utils.[ch],
* src/vinagre-main.c: Use the new debug stuff from gtk-vnc
Modified:
branches/unstable/ChangeLog
branches/unstable/src/vinagre-main.c
branches/unstable/src/vinagre-utils.c
branches/unstable/src/vinagre-utils.h
Modified: branches/unstable/src/vinagre-main.c
==============================================================================
--- branches/unstable/src/vinagre-main.c (original)
+++ branches/unstable/src/vinagre-main.c Sat Mar 29 21:19:19 2008
@@ -30,6 +30,7 @@
#include "vinagre-bookmarks.h"
#include "vinagre-window.h"
#include "vinagre-utils.h"
+#include <vncdisplay.h>
/* command line */
static gchar **files = NULL;
@@ -121,6 +122,7 @@
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);
if (error)
{
@@ -141,6 +143,8 @@
main_window = vinagre_window_new ();
gtk_widget_show (GTK_WIDGET(main_window));
+ vinagre_utils_handle_debug ();
+
vinagre_main_process_command_line (main_window);
for (l = servers; l; l = next)
{
Modified: branches/unstable/src/vinagre-utils.c
==============================================================================
--- branches/unstable/src/vinagre-utils.c (original)
+++ branches/unstable/src/vinagre-utils.c Sat Mar 29 21:19:19 2008
@@ -156,4 +156,29 @@
vinagre_utils_show_error (msg->str, parent);
g_string_free (msg, TRUE);
}
+
+
+static void _default_log (const gchar *log_domain G_GNUC_UNUSED,
+ GLogLevelFlags log_level G_GNUC_UNUSED,
+ const gchar *message,
+ gpointer user_data G_GNUC_UNUSED)
+{
+ printf ("gtk-vnc: %s", message);
+}
+
+void
+vinagre_utils_handle_debug (void)
+{
+ static gboolean initialized = FALSE;
+
+ if (initialized)
+ return;
+
+ g_log_set_handler ("gtk-vnc",
+ G_LOG_LEVEL_DEBUG,
+ _default_log,
+ NULL);
+
+ initialized = TRUE;
+}
/* vim: ts=8 */
Modified: branches/unstable/src/vinagre-utils.h
==============================================================================
--- branches/unstable/src/vinagre-utils.h (original)
+++ branches/unstable/src/vinagre-utils.h Sat Mar 29 21:19:19 2008
@@ -41,5 +41,6 @@
gchar *vinagre_utils_escape_underscores (const gchar *text,
gssize length);
+void vinagre_utils_handle_debug (void);
#endif /* __VINAGRE_UTILS_H__ */
/* vim: ts=8 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]