]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-ft-factory.c
Updated Dutch translation master
[empathy.git] / libempathy / empathy-ft-factory.c
index fa52ce1aae62da835641e52d9dd6b1933d14f2e5..f15f9fb6d7a5442a3d7d97a3dab3b6571e61090e 100644 (file)
 
 /* empathy-ft-factory.c */
 
-#include <glib.h>
+#include "config.h"
+#include "empathy-ft-factory.h"
 
-#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
 
-#include "empathy-ft-factory.h"
-#include "empathy-ft-handler.h"
 #include "empathy-request-util.h"
 #include "empathy-utils.h"
 
@@ -182,7 +181,7 @@ handle_channels_cb (TpSimpleHandler *handler,
       if (tp_proxy_get_invalidated (channel) != NULL)
         continue;
 
-      if (!EMPATHY_IS_TP_FILE (channel))
+      if (!TP_IS_FILE_TRANSFER_CHANNEL (channel))
         continue;
 
       /* We handle only incoming FT */
@@ -206,7 +205,7 @@ empathy_ft_factory_init (EmpathyFTFactory *self)
   am = tp_account_manager_dup ();
 
   priv->handler = tp_simple_handler_new_with_am (am, FALSE, FALSE,
-      EMPATHY_FT_BUS_NAME_SUFFIX, FALSE, handle_channels_cb, self, NULL);
+      EMPATHY_FT_TP_BUS_NAME_SUFFIX, FALSE, handle_channels_cb, self, NULL);
 
   tp_base_client_take_handler_filter (priv->handler, tp_asv_new (
         TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
@@ -225,9 +224,11 @@ ft_handler_outgoing_ready_cb (EmpathyFTHandler *handler,
     GError *error,
     gpointer user_data)
 {
-  EmpathyFTFactory *factory = user_data;
+  EmpathyFTFactory *factory = EMPATHY_FT_FACTORY (user_data);
 
   g_signal_emit (factory, signals[NEW_FT_HANDLER], 0, handler, error);
+
+  g_object_unref (factory);
 }
 
 /* public methods */
@@ -266,7 +267,7 @@ empathy_ft_factory_new_transfer_outgoing (EmpathyFTFactory *factory,
   g_return_if_fail (G_IS_FILE (source));
 
   empathy_ft_handler_new_outgoing (contact, source, action_time,
-      ft_handler_outgoing_ready_cb, factory);
+      ft_handler_outgoing_ready_cb, g_object_ref (factory));
 }
 
 /**