Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable drop onto parent folder #2348

Closed
wants to merge 3 commits into from
Closed

Disable drop onto parent folder #2348

wants to merge 3 commits into from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Oct 23, 2023

Fixes #1759

Simplest possible fix. As DND will have to be completely rewritten for Gtk4 there is no point in doing more.

@@ -828,7 +828,7 @@ namespace Files.FileUtils {
var parent = drop_file.get_parent ();

if (parent != null && parent.equal (target_location)) {
valid_actions &= Gdk.DragAction.LINK; // Only LINK is valid
valid_actions = Gdk.DragAction.DEFAULT; // Ignore (GitHub bug #1759)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to docs:

DEFAULT - Means nothing, and should not be used.

Also I'm getting the replace dialog here now for files which seems even less desirable than the symlink behavior

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to use for "Do Nothing" then, I guess use 0? I'll just drop this and revisit in Gtk4.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Feb 2, 2024

Closing - will revisit in Gtk4.

@jeremypw jeremypw closed this Feb 2, 2024
@jeremypw jeremypw deleted the fix-drop-samefolder branch February 26, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dragging and dropping file in same folder should not create link
2 participants