diff options
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-menu.c | 2 | ||||
-rw-r--r-- | libempathy-gtk/empathy-ui-utils.c | 14 | ||||
-rw-r--r-- | libempathy-gtk/empathy-ui-utils.h | 2 |
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 |