[gnome-session] [capplet] Use gtk_selection_data_get_uris() to simplify code



commit 6d88b68e6e242795d6073eddcc520483599b38ad
Author: Vincent Untz <vuntz gnome org>
Date:   Tue Jun 23 14:50:51 2009 +0200

    [capplet] Use gtk_selection_data_get_uris() to simplify code

 capplet/gsm-properties-dialog.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c
index d51d903..8987794 100644
--- a/capplet/gsm-properties-dialog.c
+++ b/capplet/gsm-properties-dialog.c
@@ -286,11 +286,12 @@ on_drag_data (GtkWidget           *widget,
 
         dnd_success = FALSE;
 
-        if ((data != NULL) && (data->length >= 0)) {
+        if (data != NULL) {
                 char **filenames;
                 int    i;
 
-                filenames = g_strsplit ((char *)data->data, "\r\n", 0);
+                filenames = gtk_selection_data_get_uris (data);
+
                 for (i = 0; filenames[i] && filenames[i][0]; i++) {
                         /* Return success if at least one file succeeded */
                         gboolean file_success;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]