diff --git a/glade/tilp-2.glade b/glade/tilp-2.glade
index df825a4..64b4e81 100644
--- a/glade/tilp-2.glade
+++ b/glade/tilp-2.glade
@@ -762,7 +762,6 @@
                             <property name="rubber_banding">True</property>
                             <signal name="button_press_event" handler="on_treeview2_button_press_event"/>
                             <signal name="key_press_event" handler="on_treeview2_key_press_event"/>
-                            <signal name="drag_begin" handler="on_treeview2_drag_begin"/>
                             <signal name="drag_data_get" handler="on_treeview2_drag_data_get"/>
                             <signal name="drag_data_received" handler="on_treeview2_drag_data_received"/>
                           </widget>
diff --git a/src/dnd.c b/src/dnd.c
index a353269..4e3c4ce 100644
--- a/src/dnd.c
+++ b/src/dnd.c
@@ -44,7 +44,8 @@ enum
 
 enum 
 { 
-	TARGET_STRING, TARGET_ROOTWIN, TARGET_LEFT, TARGET_RIGHT,
+	TARGET_STRING, TARGET_ROOTWIN, TARGET_TEXT_URI_LIST,
+	TARGET_LEFT, TARGET_RIGHT,
 };
 
 /*static GtkTargetEntry target_table[] = {
@@ -56,6 +57,7 @@ enum
 static GtkTargetEntry target_table_1[] = 
 {
 	{(char *)"clist", 0, TARGET_STRING},
+	{(char *)"text/uri-list", 0, TARGET_TEXT_URI_LIST, },
 	{(char *)"application/x-rootwin-drop", 0, TARGET_ROOTWIN}
 };
 
@@ -74,7 +76,7 @@ void dnd_init(void)
 			    target_table_1, n_targets,
 			    GDK_ACTION_COPY | GDK_ACTION_MOVE);
 	gtk_drag_dest_set(ctree_wnd, GTK_DEST_DEFAULT_ALL,
-			  target_table_1, n_targets,
+			  target_table_1, n_targets+1,
 			  GDK_ACTION_COPY | GDK_ACTION_MOVE);
 
 	// from tree to list
@@ -88,12 +90,6 @@ void dnd_init(void)
 
 /* CList -> CTree */
 
-GLADE_CB void
-on_treeview2_drag_begin(GtkWidget * widget,
-			GdkDragContext * drag_context, gpointer user_data)
-{
-}
-
 // pass data
 GLADE_CB void
 on_treeview2_drag_data_get(GtkWidget * widget,
@@ -123,58 +119,61 @@ on_treeview1_drag_data_received(GtkWidget * widget,
 	GtkTreeViewDropPosition pos;
 	GtkTreeIter iter;
 	VarEntry *ve;
-	gchar *name;
+	gchar *name, *target;
+	gboolean success = FALSE;
 
-	if ((data->length >= 0) && (data->format == 8)) 
+	if ((data->length >= 0) && (data->format == 8))
 	{
-		gtk_tree_view_get_dest_row_at_pos(view, x, y, &path, &pos);
-		if (path == NULL) 
+		if (drag_context->action == GDK_ACTION_ASK)
 		{
-			gtk_drag_finish(drag_context, FALSE, FALSE, _time);
-			return;
+			drag_context->action = GDK_ACTION_COPY;
 		}
-		gtk_tree_model_get_iter(model, &iter, path);
 
+		if (info == TARGET_TEXT_URI_LIST)
+		{
+			int i;
+			gchar **list;
+			tilp_debug("I got an uri_list\n");
+			list = g_uri_list_extract_uris(gtk_selection_data_get_data(data));
+			tilp_local_selection_destroy();
+			for (i = 0;list[i] != NULL; i++)
+			{
+				name = g_filename_from_uri(list[i], NULL, NULL);
+				tilp_debug("File %s is tifile: %x\n", name ,tifiles_file_is_ti(name));
+				tilp_local_selection_add(name);
+			}
+			g_strfreev(list);
+		}
+
+		gtk_tree_view_get_dest_row_at_pos(view, x, y, &path, &pos);
+		if (path == NULL)
+			goto end;
+		gtk_tree_model_get_iter(model, &iter, path);
 		gtk_tree_model_get(model, &iter, COLUMN_DATA, &ve, -1);
 		gtk_tree_model_get(model, &iter, COLUMN_NAME, &name, -1);
-
+		
 		//g_print("Received \"%s\" as selection information.\n", name);
 
 		if(strchr(name, '#'))			// Calc
 		{
-			//on_tilp_button8_clicked(NULL, NULL);
-			gtk_drag_finish(drag_context, TRUE, FALSE, _time);
-			return;
 		}
 		else if(!strcmp(name, NODE4))	// Applications
 		{
 			// send to flash
-			on_tilp_send("<FLASH>");
-			gtk_drag_finish(drag_context, TRUE, FALSE, _time);
-			return;
+			target="<FLASH>";
 		}
-
 		else if (ve && tifiles_has_folder(options.calc_model))
 		{
 			// send to folder
-			char *target;
-
 			if(!strcmp(ve->folder, ""))
 				target = ve->name;
 			else
 				target = ve->folder;
-			on_tilp_send(target);
-			gtk_drag_finish(drag_context, TRUE, FALSE, _time);
-			return;
 		}
-
 		else if(!strcmp(name, NODE2))	// Operating System
 		{
-			on_tilp_send("");
-			gtk_drag_finish(drag_context, TRUE, FALSE, _time);
-			return;
+			target="";
 		}
-
 		else
 		{
 			if(options.calc_model == CALC_NSPIRE)
@@ -185,14 +184,18 @@ on_treeview1_drag_data_received(GtkWidget * widget,
 			else
 			{
 				// send standard
-				on_tilp_send("");
-				gtk_drag_finish(drag_context, TRUE, FALSE, _time);
-				return;
+				target="";
 			}
 		}
-	}
 
-	gtk_drag_finish(drag_context, FALSE, FALSE, _time);
+		if (target!=NULL)
+			on_tilp_send(target);
+
+		tilp_local_selection_destroy();
+		success = TRUE;
+	}
+end:
+	gtk_drag_finish(drag_context, success, FALSE, _time);
 	return;
 }
 
