]> git.0d.be Git - empathy.git/blobdiff - src/empathy-ft-manager.c
Merge branch 'gnome-3-8'
[empathy.git] / src / empathy-ft-manager.c
index e23b0b45a31c69840b69faffde2a84d5cec57e80..18e05dc1989d7188410294ba5bc7c1c1545fd720 100644 (file)
 /* The original file transfer manager code was copied from Epiphany */
 
 #include "config.h"
-
-#include <string.h>
+#include "empathy-ft-manager.h"
 
 #include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include <gdk/gdkkeysyms.h>
-
-#define DEBUG_FLAG EMPATHY_DEBUG_FT
-#include <libempathy/empathy-debug.h>
-#include <libempathy/empathy-tp-file.h>
-#include <libempathy/empathy-utils.h>
 
-#include <libempathy-gtk/empathy-ui-utils.h>
-#include <libempathy-gtk/empathy-geometry.h>
-#include <libempathy-gtk/empathy-images.h>
+#include "empathy-geometry.h"
+#include "empathy-ui-utils.h"
+#include "empathy-utils.h"
 
-#include "empathy-ft-manager.h"
+#define DEBUG_FLAG EMPATHY_DEBUG_FT
+#include "empathy-debug.h"
 
 enum
 {
@@ -262,11 +255,11 @@ ft_manager_format_progress_bytes_and_percentage (guint64 current,
   char *total_str, *current_str, *retval;
   char *speed_str = NULL;
 
-  total_str = g_format_size_for_display (total);
-  current_str = g_format_size_for_display (current);
+  total_str = g_format_size (total);
+  current_str = g_format_size (current);
 
   if (speed > 0)
-    speed_str = g_format_size_for_display ((goffset) speed);
+    speed_str = g_format_size ((goffset) speed);
 
   /* translators: first %s is the currently processed size, second %s is
    * the total file size */
@@ -518,7 +511,7 @@ do_real_transfer_done (EmpathyFTManager *manager,
 
 static void
 ft_handler_transfer_done_cb (EmpathyFTHandler *handler,
-                             EmpathyTpFile *tp_file,
+                             TpFileTransferChannel *channel,
                              EmpathyFTManager *manager)
 {
   if (empathy_ft_handler_is_incoming (handler) &&
@@ -574,7 +567,7 @@ ft_handler_transfer_progress_cb (EmpathyFTHandler *handler,
 
 static void
 ft_handler_transfer_started_cb (EmpathyFTHandler *handler,
-                                EmpathyTpFile *tp_file,
+                                TpFileTransferChannel *channel,
                                 EmpathyFTManager *manager)
 {
   guint64 transferred_bytes, total_bytes;
@@ -1082,7 +1075,7 @@ empathy_ft_manager_finalize (GObject *object)
 
   DEBUG ("FT Manager %p", object);
 
-  g_hash_table_destroy (priv->ft_handler_to_row_ref);
+  g_hash_table_unref (priv->ft_handler_to_row_ref);
 
   G_OBJECT_CLASS (empathy_ft_manager_parent_class)->finalize (object);
 }