diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:23:54 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:23:54 +0800 |
commit | 5079a9d3de6a37fbf40ce420e051c347dbfa0027 (patch) | |
tree | 00b1d4e606e651b573d70b302ae046412061a428 | |
parent | b108897d4392e2ce0f0baae2a8aea52276e5bc89 (diff) | |
download | gsoc2013-empathy-5079a9d3de6a37fbf40ce420e051c347dbfa0027.tar gsoc2013-empathy-5079a9d3de6a37fbf40ce420e051c347dbfa0027.tar.gz gsoc2013-empathy-5079a9d3de6a37fbf40ce420e051c347dbfa0027.tar.bz2 gsoc2013-empathy-5079a9d3de6a37fbf40ce420e051c347dbfa0027.tar.lz gsoc2013-empathy-5079a9d3de6a37fbf40ce420e051c347dbfa0027.tar.xz gsoc2013-empathy-5079a9d3de6a37fbf40ce420e051c347dbfa0027.tar.zst gsoc2013-empathy-5079a9d3de6a37fbf40ce420e051c347dbfa0027.zip |
Simplify the code to add a FT in the manager.
svn path=/trunk/; revision=1893
-rw-r--r-- | src/empathy.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/src/empathy.c b/src/empathy.c index a5606acbe..c05f005ac 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -61,27 +61,6 @@ static BaconMessageConnection *connection = NULL; static void -file_channel_get_state_cb (TpProxy *proxy, - const GValue *state_value, - const GError *error, - gpointer user_data, - GObject *weak_object) -{ - EmpathyTpFile *tp_file; - EmpathyFTManager *ft_manager; - EmpFileTransferState state; - - state = g_value_get_uint (state_value); - if (state != EMP_FILE_TRANSFER_STATE_PENDING) { - return; - } - - ft_manager = empathy_ft_manager_get_default (); - tp_file = empathy_tp_file_new (TP_CHANNEL (proxy)); - empathy_ft_manager_add_tp_file (ft_manager, tp_file); -} - -static void dispatch_channel_cb (EmpathyDispatcher *dispatcher, TpChannel *channel, gpointer user_data) @@ -127,10 +106,12 @@ dispatch_channel_cb (EmpathyDispatcher *dispatcher, empathy_call_window_new (channel); } else if (!tp_strdiff (channel_type, EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) { - tp_cli_dbus_properties_call_get (channel, -1, - EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, - "State", file_channel_get_state_cb, - NULL, NULL, NULL); + EmpathyFTManager *ft_manager; + EmpathyTpFile *tp_file; + + ft_manager = empathy_ft_manager_get_default (); + tp_file = empathy_tp_file_new (channel); + empathy_ft_manager_add_tp_file (ft_manager, tp_file); } g_free (channel_type); |