forked from AuroraMiddleware/gtk
Don't allow drops in unmounted volumes
Unmounted volumes don't have a URI yet, so we can use that to distinguish them from within the DnD code. Signed-off-by: Federico Mena Quintero <federico@gnome.org>
This commit is contained in:
parent
dbf98bcfeb
commit
6d94f8a56c
@ -1444,20 +1444,20 @@ drag_motion_callback (GtkTreeView *tree_view,
|
||||
|
||||
if (!drop_as_bookmarks) {
|
||||
char *uri;
|
||||
GFile *dest_file;
|
||||
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (sidebar->store),
|
||||
&iter,
|
||||
PLACES_SIDEBAR_COLUMN_URI, &uri,
|
||||
-1);
|
||||
|
||||
g_assert (uri != NULL);
|
||||
dest_file = g_file_new_for_uri (uri);
|
||||
if (uri != NULL) {
|
||||
GFile *dest_file = g_file_new_for_uri (uri);
|
||||
|
||||
emit_drag_action_requested (sidebar, context, dest_file, sidebar->drag_list, &action);
|
||||
emit_drag_action_requested (sidebar, context, dest_file, sidebar->drag_list, &action);
|
||||
|
||||
g_object_unref (dest_file);
|
||||
g_free (uri);
|
||||
g_object_unref (dest_file);
|
||||
g_free (uri);
|
||||
} /* uri may be NULL for unmounted volumes, for example, so we don't allow drops there */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user