summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2012-05-05 13:43:45 +0200
committerNick Schermer <nick@xfce.org>2012-05-05 13:43:45 +0200
commit69b1ff421a5d348cff60967482a0d9d9a6d6f953 (patch)
tree5a7f33caadb6eb1062dac710efd82070f081a0f7
parentc0e3e85dadd1930f2c3339b6d0a6d05805790795 (diff)
downloadthunar-69b1ff421a5d348cff60967482a0d9d9a6d6f953.tar.gz
Simpler extraction of uri list.
Gtk validates the selection data, so don't do that twice.
-rw-r--r--plugins/thunar-tpa/thunar-tpa.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/thunar-tpa/thunar-tpa.c b/plugins/thunar-tpa/thunar-tpa.c
index 5905dfc9..afb02c1e 100644
--- a/plugins/thunar-tpa/thunar-tpa.c
+++ b/plugins/thunar-tpa/thunar-tpa.c
@@ -441,11 +441,9 @@ thunar_tpa_drag_data_received (GtkWidget *button,
if (G_LIKELY (info == TARGET_TEXT_URI_LIST))
{
/* check if the data is valid for text/uri-list */
- if (G_LIKELY (gtk_selection_data_get_length (selection_data) >= 0
- && gtk_selection_data_get_format (selection_data) == 8))
+ uri_list = gtk_selection_data_get_uris (selection_data);
+ if (G_LIKELY (uri_list != NULL))
{
- /* parse the URI list according to RFC 2483 */
- uri_list = gtk_selection_data_get_uris (selection_data);
succeed = thunar_tpa_move_to_trash (plugin, (const gchar **) uri_list);
g_strfreev (uri_list);
}