From a86de277605e7eb4f4849ade60f390a84a16bab9 Mon Sep 17 00:00:00 2001
From: Benedikt Meurer <benny@xfce.org>
Date: Fri, 2 Sep 2005 01:58:05 +0000
Subject: [PATCH] 2005-09-02	Benedikt Meurer <benny@xfce.org>

	* thunar/thunar-standard-view.c(thunar_standard_view_get_dest_actions):
	  Set the drop-file icon renderer property only if we have a valid
	  drag action.
	* thunar/thunar-local-file.c(thunar_local_file_accepts_uri_drop): Do
	  not accept directory drops if the directory isn't writable.




(Old svn revision: 17269)
---
 ChangeLog                     | 8 ++++++++
 thunar/thunar-local-file.c    | 2 +-
 thunar/thunar-standard-view.c | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 31ddf4910..cf3ee234f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-09-02	Benedikt Meurer <benny@xfce.org>
+
+	* thunar/thunar-standard-view.c(thunar_standard_view_get_dest_actions):
+	  Set the drop-file icon renderer property only if we have a valid
+	  drag action.
+	* thunar/thunar-local-file.c(thunar_local_file_accepts_uri_drop): Do
+	  not accept directory drops if the directory isn't writable.
+
 2005-09-02	Benedikt Meurer <benny@xfce.org>
 
 	* thunar/thunar-icon-renderer.c(thunar_icon_renderer_render): Prelight
diff --git a/thunar/thunar-local-file.c b/thunar/thunar-local-file.c
index dc0f61755..4f9d5844b 100644
--- a/thunar/thunar-local-file.c
+++ b/thunar/thunar-local-file.c
@@ -294,7 +294,7 @@ thunar_local_file_accepts_uri_drop (ThunarFile         *file,
   if (G_LIKELY (thunar_vfs_uri_get_scheme (uri) == THUNAR_VFS_URI_SCHEME_FILE))
     {
       /* check if we have a writable directory here */
-      if (G_LIKELY (local_file->info->type == THUNAR_VFS_FILE_TYPE_DIRECTORY))
+      if (local_file->info->type == THUNAR_VFS_FILE_TYPE_DIRECTORY && thunar_file_is_writable (file))
         return GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK;
 
       /* check if we can execute the file */
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index ed5059153..229f0ca90 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -958,7 +958,7 @@ thunar_standard_view_get_dest_actions (ThunarStandardView *standard_view,
   /* setup the drop-file for the icon renderer, so the user
    * gets good visual feedback for the drop target.
    */
-  g_object_set (G_OBJECT (standard_view->icon_renderer), "drop-file", file, NULL);
+  g_object_set (G_OBJECT (standard_view->icon_renderer), "drop-file", (action != 0) ? file : NULL, NULL);
 
   /* do the view highlighting */
   if (standard_view->priv->drop_highlight != (path == NULL && action != 0))
-- 
GitLab