[empathy] empathy-debugger: use GtkApplication (#621339)



commit 359fed84d5ee5b0fb82699cb927dbc3293c235cc
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Fri Oct 15 15:31:07 2010 +0200

    empathy-debugger: use GtkApplication (#621339)

 src/empathy-debugger.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-debugger.c b/src/empathy-debugger.c
index 9ff142b..2203041 100644
--- a/src/empathy-debugger.c
+++ b/src/empathy-debugger.c
@@ -27,16 +27,20 @@
 
 #include "empathy-debug-window.h"
 
+#define EMPATHY_DEBUGGER_DBUS_NAME "org.gnome.Empathy.Debugger"
+
 int
 main (int argc,
     char **argv)
 {
   GtkWidget *window;
+  GtkApplication *app;
 
   g_thread_init (NULL);
-  gtk_init (&argc, &argv);
   empathy_gtk_init ();
 
+  app = gtk_application_new (EMPATHY_DEBUGGER_DBUS_NAME, &argc, &argv);
+
   g_set_application_name (_("Empathy Debugger"));
 
   gtk_window_set_default_icon_name ("empathy");
@@ -45,7 +49,8 @@ main (int argc,
   window = empathy_debug_window_new (NULL);
   g_signal_connect (window, "destroy", gtk_main_quit, NULL);
 
-  gtk_main ();
+  gtk_application_run (app);
 
+  g_object_unref (app);
   return EXIT_SUCCESS;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]