[nautilus] Enable GDK_ACTION_MOVE when from icon search view
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Enable GDK_ACTION_MOVE when from icon search view
- Date: Mon, 22 Dec 2014 08:30:28 +0000 (UTC)
commit 72482c8987bbd50c87f1fd104121cdf05af7c0b1
Author: Jakub Srba <kuba srba gmail com>
Date: Thu Jul 31 14:59:05 2014 +0200
Enable GDK_ACTION_MOVE when from icon search view
Currently, GDK_ACTION_MOVE is possible from search view
only if it is in list view. This commit allows the move
even when the search view is in icon view.
https://bugzilla.gnome.org/show_bug.cgi?id=657637
libnautilus-private/nautilus-canvas-container.c | 22 +---------------------
libnautilus-private/nautilus-canvas-container.h | 3 ---
libnautilus-private/nautilus-canvas-private.h | 1 -
src/nautilus-canvas-view.c | 4 ----
4 files changed, 1 insertions(+), 29 deletions(-)
---
diff --git a/libnautilus-private/nautilus-canvas-container.c b/libnautilus-private/nautilus-canvas-container.c
index 03c8e7d..03e8890 100644
--- a/libnautilus-private/nautilus-canvas-container.c
+++ b/libnautilus-private/nautilus-canvas-container.c
@@ -4457,13 +4457,10 @@ motion_notify_event (GtkWidget *widget,
&canvas_y);
actions = GDK_ACTION_COPY
+ | GDK_ACTION_MOVE
| GDK_ACTION_LINK
| GDK_ACTION_ASK;
- if (container->details->drag_allow_moves) {
- actions |= GDK_ACTION_MOVE;
- }
-
nautilus_canvas_dnd_begin_drag (container,
actions,
details->drag_button,
@@ -7485,23 +7482,6 @@ nautilus_canvas_container_get_icon_description (NautilusCanvasContainer *contain
}
}
-gboolean
-nautilus_canvas_container_get_allow_moves (NautilusCanvasContainer *container)
-{
- g_return_val_if_fail (NAUTILUS_IS_CANVAS_CONTAINER (container), FALSE);
-
- return container->details->drag_allow_moves;
-}
-
-void
-nautilus_canvas_container_set_allow_moves (NautilusCanvasContainer *container,
- gboolean allow_moves)
-{
- g_return_if_fail (NAUTILUS_IS_CANVAS_CONTAINER (container));
-
- container->details->drag_allow_moves = allow_moves;
-}
-
/**
* nautilus_canvas_container_set_highlighted_for_clipboard
* @container: An canvas container widget.
diff --git a/libnautilus-private/nautilus-canvas-container.h b/libnautilus-private/nautilus-canvas-container.h
index b6cfe4d..ff16a4e 100644
--- a/libnautilus-private/nautilus-canvas-container.h
+++ b/libnautilus-private/nautilus-canvas-container.h
@@ -315,9 +315,6 @@ void nautilus_canvas_container_set_margins (Nauti
int
bottom_margin);
char* nautilus_canvas_container_get_icon_description (NautilusCanvasContainer
*container,
NautilusCanvasIconData
*data);
-gboolean nautilus_canvas_container_get_allow_moves (NautilusCanvasContainer
*container);
-void nautilus_canvas_container_set_allow_moves (NautilusCanvasContainer
*container,
- gboolean
allow_moves);
gboolean nautilus_canvas_container_is_layout_rtl (NautilusCanvasContainer
*container);
gboolean nautilus_canvas_container_is_layout_vertical (NautilusCanvasContainer *container);
diff --git a/libnautilus-private/nautilus-canvas-private.h b/libnautilus-private/nautilus-canvas-private.h
index 77679d1..0efaa9e 100644
--- a/libnautilus-private/nautilus-canvas-private.h
+++ b/libnautilus-private/nautilus-canvas-private.h
@@ -168,7 +168,6 @@ struct NautilusCanvasContainerDetails {
DragState drag_state;
gboolean drag_started;
StretchState stretch_start;
- gboolean drag_allow_moves;
gboolean icon_selected_on_button_down;
NautilusCanvasIcon *double_click_icon[2]; /* Both clicks in a double click need to be on the same
icon */
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index c3dad37..ae1d364 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -32,7 +32,6 @@
#include "nautilus-view-dnd.h"
#include <stdlib.h>
-#include <eel/eel-vfs-extensions.h>
#include <errno.h>
#include <fcntl.h>
#include <gtk/gtk.h>
@@ -804,9 +803,6 @@ nautilus_canvas_view_begin_loading (NautilusView *view)
nautilus_canvas_container_begin_loading (NAUTILUS_CANVAS_CONTAINER (canvas_container));
- nautilus_canvas_container_set_allow_moves (NAUTILUS_CANVAS_CONTAINER (canvas_container),
- !eel_uri_is_search (uri));
-
g_free (uri);
/* Set the sort mode.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]