summaryrefslogtreecommitdiff
path: root/src/nautilus-window.h
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2015-10-03 23:41:04 +0200
committerCarlos Soriano <csoriano@gnome.org>2015-10-06 23:36:30 +0200
commit749a86440541b6fe622084c2e553784b34cbe51c (patch)
tree880d3be531794cb2a2127d567341899a7956199a /src/nautilus-window.h
parent02af0763c53a77c23f7dac6ca8e9121ed4f293dd (diff)
downloadnautilus-749a86440541b6fe622084c2e553784b34cbe51c.tar.gz
dnd: use GtkPlacesSidebar drop targets hints
Currently the dnd on the sidebar is only triggered when hovering above the sidebar itself. However we would like to give some feedback all along on the dnd operation. For that GtkPlacesSidebar has set_drop_targets_visible public API, which was implemented a few months ago and the GtkFileChooser is already using. I just forgot to implement the support for it on Nautilus... even if the original work was done for Nautilus, since users will probably use dnd more on nautilus than on the file chooser. I'm not entirely happy with the implementation, since it uses custom functions to access the drag data, given that we need them at drag-begin time and in random places on the code, since nautilus is doing all the dnd work manually and on different places. The final result is that drag and drop is still managed mostly on its own widgets, in this case list-view and canvas-view, and nautilus-dnd manages a central accessor for dnd in nautilus, in this case requesting depending on the widget that is the owner of the data, its data through the custom functions of that particula widget. All other ways I tried to do it entirely with only gtk_drag_* or gdk_drag_* functions were in vanish if no a complete refactoring is done, and probably it doesn't worth the effort. Also I actually separated the list view dnd code as well, so now at least the pattern to handling dnd on nautilus is more or less consistent.
Diffstat (limited to 'src/nautilus-window.h')
-rw-r--r--src/nautilus-window.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index d9b0b2409..8ba877b40 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -145,4 +145,8 @@ void nautilus_window_sync_title (NautilusWindow *window,
void nautilus_window_show_operation_notification (NautilusWindow *window,
gchar *main_label,
GFile *folder_to_open);
+void nautilus_window_start_dnd (NautilusWindow *window,
+ GdkDragContext *context);
+void nautilus_window_end_dnd (NautilusWindow *window,
+ GdkDragContext *context);
#endif