aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTravis Reitter <travis.reitter@collabora.co.uk>2010-10-23 04:05:54 +0800
committerTravis Reitter <travis.reitter@collabora.co.uk>2010-10-30 00:35:09 +0800
commitad19fb0668dcd21c0ac82e3c0fc81f6fa03dd92a (patch)
tree9a43ee61d2d5b0435e16812bd6c449ef5e9df1a6
parent8857f63fb88c5b6cc3fed75143a9b58da439f583 (diff)
downloadgsoc2013-empathy-ad19fb0668dcd21c0ac82e3c0fc81f6fa03dd92a.tar
gsoc2013-empathy-ad19fb0668dcd21c0ac82e3c0fc81f6fa03dd92a.tar.gz
gsoc2013-empathy-ad19fb0668dcd21c0ac82e3c0fc81f6fa03dd92a.tar.bz2
gsoc2013-empathy-ad19fb0668dcd21c0ac82e3c0fc81f6fa03dd92a.tar.lz
gsoc2013-empathy-ad19fb0668dcd21c0ac82e3c0fc81f6fa03dd92a.tar.xz
gsoc2013-empathy-ad19fb0668dcd21c0ac82e3c0fc81f6fa03dd92a.tar.zst
gsoc2013-empathy-ad19fb0668dcd21c0ac82e3c0fc81f6fa03dd92a.zip
Don't try to register for unique bus names in remote instances of empathy-av.
-rw-r--r--src/empathy-av.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/empathy-av.c b/src/empathy-av.c
index ee6d4414f..374b947a7 100644
--- a/src/empathy-av.c
+++ b/src/empathy-av.c
@@ -58,10 +58,26 @@ activate_cb (GApplication *application)
{
if (!use_timer && !activated)
{
+ EmpathyCallFactory *call_factory;
+ GError *error = NULL;
+
/* keep a 'ref' to the application */
g_application_hold (G_APPLICATION (app));
+ call_factory = empathy_call_factory_initialise ();
+
+ g_signal_connect (G_OBJECT (call_factory), "new-call-handler",
+ G_CALLBACK (new_call_handler_cb), NULL);
+
+ if (!empathy_call_factory_register (call_factory, &error))
+ {
+ g_critical ("Failed to register Handler: %s", error->message);
+ g_error_free (error);
+ }
+
activated = TRUE;
+
+ g_object_unref (call_factory);
}
}
@@ -96,7 +112,6 @@ main (int argc,
#ifdef ENABLE_DEBUG
TpDebugSender *debug_sender;
#endif
- EmpathyCallFactory *call_factory;
GError *error = NULL;
/* Init */
@@ -133,19 +148,6 @@ main (int argc,
g_log_set_default_handler (tp_debug_sender_log_handler, G_LOG_DOMAIN);
#endif
- call_factory = empathy_call_factory_initialise ();
-
- g_signal_connect (G_OBJECT (call_factory), "new-call-handler",
- G_CALLBACK (new_call_handler_cb), NULL);
-
- if (!empathy_call_factory_register (call_factory, &error))
- {
- g_critical ("Failed to register Handler: %s", error->message);
- g_error_free (error);
- }
-
- g_object_unref (call_factory);
-
if (g_getenv ("EMPATHY_PERSIST") != NULL)
{
DEBUG ("Disable timer");
@@ -161,7 +163,6 @@ main (int argc,
g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
- g_object_unref (call_factory);
#ifdef ENABLE_DEBUG
g_object_unref (debug_sender);