diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-23 17:44:55 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-23 17:44:59 +0800 |
commit | 13b07c1ae1c92c9b0a431576f6c78c95a46060fb (patch) | |
tree | 30221c224bea09819df07650001f9b2e86d7cf7e /src/empathy-av.c | |
parent | 141c0caa3b8e132466a0472caabce59549151f46 (diff) | |
download | gsoc2013-empathy-13b07c1ae1c92c9b0a431576f6c78c95a46060fb.tar gsoc2013-empathy-13b07c1ae1c92c9b0a431576f6c78c95a46060fb.tar.gz gsoc2013-empathy-13b07c1ae1c92c9b0a431576f6c78c95a46060fb.tar.bz2 gsoc2013-empathy-13b07c1ae1c92c9b0a431576f6c78c95a46060fb.tar.lz gsoc2013-empathy-13b07c1ae1c92c9b0a431576f6c78c95a46060fb.tar.xz gsoc2013-empathy-13b07c1ae1c92c9b0a431576f6c78c95a46060fb.tar.zst gsoc2013-empathy-13b07c1ae1c92c9b0a431576f6c78c95a46060fb.zip |
empathy-av: early return if already activated
Purely esthetic change to look more like empathy-chat.c
Diffstat (limited to 'src/empathy-av.c')
-rw-r--r-- | src/empathy-av.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/empathy-av.c b/src/empathy-av.c index 5b46307cc..2313b22fc 100644 --- a/src/empathy-av.c +++ b/src/empathy-av.c @@ -72,29 +72,29 @@ new_call_handler_cb (EmpathyCallFactory *factory, static void activate_cb (GApplication *application) { - if (!activated) - { - GError *error = NULL; + GError *error = NULL; + + if (activated) + return; - if (!use_timer) - { - /* keep a 'ref' to the application */ - g_application_hold (G_APPLICATION (app)); - } + activated = TRUE; - g_assert (call_factory == NULL); - call_factory = empathy_call_factory_initialise (); + if (!use_timer) + { + /* keep a 'ref' to the application */ + g_application_hold (G_APPLICATION (app)); + } - g_signal_connect (G_OBJECT (call_factory), "new-call-handler", - G_CALLBACK (new_call_handler_cb), NULL); + g_assert (call_factory == NULL); + call_factory = empathy_call_factory_initialise (); - if (!empathy_call_factory_register (call_factory, &error)) - { - g_critical ("Failed to register Handler: %s", error->message); - g_error_free (error); - } + g_signal_connect (G_OBJECT (call_factory), "new-call-handler", + G_CALLBACK (new_call_handler_cb), NULL); - activated = TRUE; + if (!empathy_call_factory_register (call_factory, &error)) + { + g_critical ("Failed to register Handler: %s", error->message); + g_error_free (error); } } |