]> git.0d.be Git - empathy.git/commitdiff
It's now safe to call emp_cli_init multiple times. Move that call to empathy_tp_call_...
authorXavier Claessens <xclaesse@src.gnome.org>
Tue, 26 Feb 2008 13:31:16 +0000 (13:31 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 26 Feb 2008 13:31:16 +0000 (13:31 +0000)
svn path=/trunk/; revision=665

extensions/extensions-cli.c
libempathy/empathy-tp-call.c
src/empathy-call-chandler.c

index 98a17447885152c4b9ac094542b19570d2eb1b53..c75633c33cc2839890dc9994096cda50af505cae 100644 (file)
@@ -12,8 +12,14 @@ static void _emp_ext_register_dbus_glib_marshallers (void);
 void
 emp_cli_init (void)
 {
-  _emp_ext_register_dbus_glib_marshallers ();
+  static gboolean initilized = FALSE;
 
-  tp_proxy_or_subclass_hook_on_interface_add (TP_TYPE_PROXY,
-      emp_cli_misc_add_signals);
+  if (!initialized)
+    {
+      _emp_ext_register_dbus_glib_marshallers ();
+
+      tp_proxy_or_subclass_hook_on_interface_add (TP_TYPE_PROXY,
+          emp_cli_misc_add_signals);
+      initialized = TRUE;
+    }
 }
index 6dd24a51a34c193baa8bb303a4697b8d76034dcf..c44ffe27eb19bb6ef94f20d8ad8ef9e7b1ae0432 100644 (file)
@@ -678,6 +678,8 @@ empathy_tp_call_class_init (EmpathyTpCallClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
+  emp_cli_init ();
+
   object_class->constructor = tp_call_constructor;
   object_class->finalize = tp_call_finalize;
   object_class->set_property = tp_call_set_property;
index 2b359ec24bcf42819fc803eec151dc7ec4c17a5b..e1568c18cf2cb21b2d3c71b37c1b594b7fd1bbd5 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <libmissioncontrol/mission-control.h>
 
-#include <extensions/extensions.h>
 #include <libempathy/empathy-tp-call.h>
 #include <libempathy/empathy-chandler.h>
 #include <libempathy/empathy-debug.h>
@@ -69,7 +68,6 @@ main (int argc, char *argv[])
   EmpathyChandler *chandler;
 
   gtk_init (&argc, &argv);
-  emp_cli_init ();
 
   mc = empathy_mission_control_new ();