aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-11-22 00:14:25 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:14:25 +0800
commit1ff7c439e8442d51024fbfcde2b1c11b8b17cf4f (patch)
treeaeaa721b0c0bfddb757ed379120545f3332832e6 /libempathy-gtk
parent053f35ec510afa2cdac63fac584bc7f339e65405 (diff)
downloadgsoc2013-empathy-1ff7c439e8442d51024fbfcde2b1c11b8b17cf4f.tar
gsoc2013-empathy-1ff7c439e8442d51024fbfcde2b1c11b8b17cf4f.tar.gz
gsoc2013-empathy-1ff7c439e8442d51024fbfcde2b1c11b8b17cf4f.tar.bz2
gsoc2013-empathy-1ff7c439e8442d51024fbfcde2b1c11b8b17cf4f.tar.lz
gsoc2013-empathy-1ff7c439e8442d51024fbfcde2b1c11b8b17cf4f.tar.xz
gsoc2013-empathy-1ff7c439e8442d51024fbfcde2b1c11b8b17cf4f.tar.zst
gsoc2013-empathy-1ff7c439e8442d51024fbfcde2b1c11b8b17cf4f.zip
Added empathy_send_file_with_file_chooser_and_manager to make use of the file transfer manager. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=1747
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-menu.c2
-rw-r--r--libempathy-gtk/empathy-ui-utils.c14
-rw-r--r--libempathy-gtk/empathy-ui-utils.h2
3 files changed, 17 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index a167a1798..dc004bea3 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -195,7 +195,7 @@ empathy_contact_log_menu_item_new (EmpathyContact *contact)
static void
contact_file_transfer_menu_item_activate_cb (EmpathyContact *contact)
{
- empathy_send_file_with_file_chooser (contact, NULL, NULL);
+ empathy_send_file_with_file_chooser_and_manager (contact);
}
GtkWidget *
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index a794232c9..19bc078f2 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1570,3 +1570,17 @@ empathy_send_file_with_file_chooser (EmpathyContact *contact,
gtk_widget_show (widget);
}
+static void
+add_file_to_manager (EmpathyFile *file,
+ EmpathyFTManager *ft_manager)
+{
+ empathy_ft_manager_add_file (ft_manager, file);
+}
+
+void
+empathy_send_file_with_file_chooser_and_manager (EmpathyContact *contact)
+{
+ empathy_send_file_with_file_chooser (contact,
+ (EmpathyFileChooserCallback) add_file_to_manager,
+ empathy_ft_manager_get_default ());
+}
diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h
index 1bce31baa..bb1d45f92 100644
--- a/libempathy-gtk/empathy-ui-utils.h
+++ b/libempathy-gtk/empathy-ui-utils.h
@@ -41,6 +41,7 @@
#include <libempathy/empathy-file.h>
#include "empathy-chat-view.h"
+#include "empathy-ft-manager.h"
G_BEGIN_DECLS
@@ -120,6 +121,7 @@ typedef gboolean (*EmpathyFileChooserCallback) (EmpathyFile *file,
void empathy_send_file_with_file_chooser (EmpathyContact *contact,
EmpathyFileChooserCallback callback,
gpointer user_data);
+void empathy_send_file_with_file_chooser_and_manager (EmpathyContact *contact);
G_END_DECLS