diff options
author | Shaun McCance <Shaun McCance> | 2009-10-06 03:22:32 +0800 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2009-11-25 05:14:51 +0800 |
commit | f167ec2d92a526d19f1faf8320d9ff975ae1e502 (patch) | |
tree | 3c2c3888e3a77efd8d23a9a0a909f7608cacd33e /libempathy-gtk/empathy-contact-list-view.c | |
parent | cfb4283d66005aa2f12b15ce0d5aefde965d815a (diff) | |
download | gsoc2013-empathy-f167ec2d92a526d19f1faf8320d9ff975ae1e502.tar gsoc2013-empathy-f167ec2d92a526d19f1faf8320d9ff975ae1e502.tar.gz gsoc2013-empathy-f167ec2d92a526d19f1faf8320d9ff975ae1e502.tar.bz2 gsoc2013-empathy-f167ec2d92a526d19f1faf8320d9ff975ae1e502.tar.lz gsoc2013-empathy-f167ec2d92a526d19f1faf8320d9ff975ae1e502.tar.xz gsoc2013-empathy-f167ec2d92a526d19f1faf8320d9ff975ae1e502.tar.zst gsoc2013-empathy-f167ec2d92a526d19f1faf8320d9ff975ae1e502.zip |
Utilitiy function to send files from a URI list, for dnd implementations
Diffstat (limited to 'libempathy-gtk/empathy-contact-list-view.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-list-view.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index 24793b457..3e1464654 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -332,9 +332,6 @@ contact_list_view_file_drag_received (GtkWidget *view, { GtkTreeIter iter; const gchar *sel_data; - const gchar *nl; - gchar *uri; - GFile *file; EmpathyContact *contact; sel_data = (const gchar *) gtk_selection_data_get_data (selection); @@ -347,22 +344,9 @@ contact_list_view_file_drag_received (GtkWidget *view, return FALSE; } - nl = strstr (sel_data, "\r\n"); - if (!nl) { - nl = strchr (sel_data, '\n'); - } - if (nl) { - uri = g_strndup (sel_data, nl - sel_data); - file = g_file_new_for_uri (uri); - g_free (uri); - } - else { - file = g_file_new_for_uri (sel_data); - } - - empathy_send_file (contact, file); + empathy_send_file_from_uri_list (contact, sel_data); - g_object_unref (file); + g_object_unref (contact); return TRUE; } |