[Xfce4-commits] <thunar:nick/gtk3> Simpler extraction of uri list.
Nick Schermer
noreply at xfce.org
Sat May 5 13:46:01 CEST 2012
Updating branch refs/heads/nick/gtk3
to 69b1ff421a5d348cff60967482a0d9d9a6d6f953 (commit)
from c0e3e85dadd1930f2c3339b6d0a6d05805790795 (commit)
commit 69b1ff421a5d348cff60967482a0d9d9a6d6f953
Author: Nick Schermer <nick at xfce.org>
Date: Sat May 5 13:43:45 2012 +0200
Simpler extraction of uri list.
Gtk validates the selection data, so don't do that twice.
plugins/thunar-tpa/thunar-tpa.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/plugins/thunar-tpa/thunar-tpa.c b/plugins/thunar-tpa/thunar-tpa.c
index 5905dfc..afb02c1 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);
}
More information about the Xfce4-commits
mailing list