From c524708b1e398a1f81ce430f765ef825ca780f37 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 26 Feb 2008 13:31:16 +0000 Subject: [PATCH] It's now safe to call emp_cli_init multiple times. Move that call to empathy_tp_call_class_init. svn path=/trunk/; revision=665 --- extensions/extensions-cli.c | 12 +++++++++--- libempathy/empathy-tp-call.c | 2 ++ src/empathy-call-chandler.c | 2 -- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/extensions/extensions-cli.c b/extensions/extensions-cli.c index 98a17447..c75633c3 100644 --- a/extensions/extensions-cli.c +++ b/extensions/extensions-cli.c @@ -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; + } } diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c index 6dd24a51..c44ffe27 100644 --- a/libempathy/empathy-tp-call.c +++ b/libempathy/empathy-tp-call.c @@ -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; diff --git a/src/empathy-call-chandler.c b/src/empathy-call-chandler.c index 2b359ec2..e1568c18 100644 --- a/src/empathy-call-chandler.c +++ b/src/empathy-call-chandler.c @@ -22,7 +22,6 @@ #include -#include #include #include #include @@ -69,7 +68,6 @@ main (int argc, char *argv[]) EmpathyChandler *chandler; gtk_init (&argc, &argv); - emp_cli_init (); mc = empathy_mission_control_new (); -- 2.39.2