]> git.0d.be Git - empathy.git/commitdiff
empathy-av: use GtkApplication (#621339)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 15 Oct 2010 13:36:41 +0000 (15:36 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 18 Oct 2010 08:11:46 +0000 (10:11 +0200)
src/empathy-av.c

index 9ef0fbf295f14824d481523f6a4f570a32dbf2e7..c937c2a44938df0e264653e3631528bc475e9279 100644 (file)
@@ -41,6 +41,8 @@
 /* Exit after $TIMEOUT seconds if not displaying any call window */
 #define TIMEOUT 60
 
+#define EMPATHY_AV_DBUS_NAME "org.gnome.Empathy.AudioVideo"
+
 static guint nb_windows = 0;
 static guint timeout_id = 0;
 static gboolean use_timer = TRUE;
@@ -126,6 +128,7 @@ main (int argc,
 #endif
   EmpathyCallFactory *call_factory;
   GError *error = NULL;
+  GtkApplication *app;
 
   /* Init */
   g_thread_init (NULL);
@@ -152,6 +155,8 @@ main (int argc,
   gtk_window_set_default_icon_name ("empathy");
   textdomain (GETTEXT_PACKAGE);
 
+  app = gtk_application_new (EMPATHY_AV_DBUS_NAME, &argc, &argv);
+
 #ifdef ENABLE_DEBUG
   /* Set up debug sender */
   debug_sender = tp_debug_sender_dup ();
@@ -179,8 +184,9 @@ main (int argc,
 
   start_timer ();
 
-  gtk_main ();
+  gtk_application_run (app);
 
+  g_object_unref (app);
   g_object_unref (call_factory);
 
 #ifdef ENABLE_DEBUG