aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-02-03 17:02:51 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-02-03 17:02:51 +0800
commita7630dc453ae60fde8191beca2003b5427743b7d (patch)
treedaf24adc184dfb43149500060d9dea272d6b5d26 /src/empathy.c
parent5f6779c758764d859efe162ecb6fba579cc318f1 (diff)
downloadgsoc2013-empathy-a7630dc453ae60fde8191beca2003b5427743b7d.tar
gsoc2013-empathy-a7630dc453ae60fde8191beca2003b5427743b7d.tar.gz
gsoc2013-empathy-a7630dc453ae60fde8191beca2003b5427743b7d.tar.bz2
gsoc2013-empathy-a7630dc453ae60fde8191beca2003b5427743b7d.tar.lz
gsoc2013-empathy-a7630dc453ae60fde8191beca2003b5427743b7d.tar.xz
gsoc2013-empathy-a7630dc453ae60fde8191beca2003b5427743b7d.tar.zst
gsoc2013-empathy-a7630dc453ae60fde8191beca2003b5427743b7d.zip
Toss out the old EmpathyCallWindow initialise the CallFactory and hook into its signals
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2383
Diffstat (limited to 'src/empathy.c')
-rw-r--r--src/empathy.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/empathy.c b/src/empathy.c
index dce928701..a7311ebec 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -40,6 +40,7 @@
#include <libempathy/empathy-idle.h>
#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-call-factory.h>
#include <libempathy/empathy-chatroom-manager.h>
#include <libempathy/empathy-dispatcher.h>
#include <libempathy/empathy-dispatch-operation.h>
@@ -110,14 +111,10 @@ dispatch_cb (EmpathyDispatcher *dispatcher,
empathy_dispatch_operation_claim (operation);
} else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA) {
- EmpathyTpCall *call;
+ EmpathyCallFactory *factory;
- call = EMPATHY_TP_CALL (
- empathy_dispatch_operation_get_channel_wrapper (operation));
-
- empathy_dispatch_operation_claim (operation);
-
- empathy_call_window_new (call);
+ factory = empathy_call_factory_get ();
+ empathy_call_factory_claim_channel (factory, operation);
} else if (channel_type == EMP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER) {
EmpathyFTManager *ft_manager;
EmpathyTpFile *tp_file;
@@ -397,6 +394,16 @@ show_version_cb (const char *option_name,
return FALSE;
}
+static void
+new_call_handler_cb (EmpathyCallFactory *factory, EmpathyCallHandler *handler,
+ gboolean outgoing, gpointer user_data)
+{
+ EmpathyCallWindow *window;
+
+ window = empathy_call_window_new (handler);
+ gtk_widget_show (GTK_WIDGET (window));
+}
+
int
main (int argc, char *argv[])
{
@@ -404,6 +411,7 @@ main (int argc, char *argv[])
EmpathyStatusIcon *icon;
EmpathyDispatcher *dispatcher;
EmpathyChatroomManager *chatroom_manager;
+ EmpathyCallFactory *call_factory;
GtkWidget *window;
MissionControl *mc;
EmpathyIdle *idle;
@@ -543,6 +551,10 @@ main (int argc, char *argv[])
empathy_chatroom_manager_observe (chatroom_manager, dispatcher);
notify_init (_(PACKAGE_NAME));
+ /* Create the call factory */
+ call_factory = empathy_call_factory_initialise ();
+ g_signal_connect (G_OBJECT (call_factory), "new-call-handler",
+ G_CALLBACK (new_call_handler_cb), NULL);
gtk_main ();