[nautilus] sidebar: Allow symbolic link as bookmark drop
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] sidebar: Allow symbolic link as bookmark drop
- Date: Sat, 2 Jul 2022 17:27:52 +0000 (UTC)
commit e7198965c9a31809ef4d3add4976526853eced0f
Author: Corey Berla <corey berla me>
Date: Wed Jun 22 21:35:59 2022 -0700
sidebar: Allow symbolic link as bookmark drop
The gtk sidebar code currently only allows G_FILE_TYPE_DIRECTORY,
G_FILE_TYPE_SHORTCUT, and G_FILE_TYPE_MOUNTABLE as acceptable drops
to create a new bookmark. Control+D successfully creates a bookmark
for a sym link because it uses nautilus code. Since sym links are
acceptable bookmarks, allow G_FILE_TYPE_SYMBOLIC_LINK as an allowed
drop for bookmarks.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1665
src/gtk/nautilusgtkplacessidebar.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/gtk/nautilusgtkplacessidebar.c b/src/gtk/nautilusgtkplacessidebar.c
index c772aedef..5a54c2460 100644
--- a/src/gtk/nautilusgtkplacessidebar.c
+++ b/src/gtk/nautilusgtkplacessidebar.c
@@ -1789,7 +1789,10 @@ drop_files_as_bookmarks (NautilusGtkPlacesSidebar *sidebar,
if (info)
{
- if ((g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY || g_file_info_get_file_type (info)
== G_FILE_TYPE_MOUNTABLE || g_file_info_get_file_type (info) == G_FILE_TYPE_SHORTCUT))
+ if ((g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY ||
+ g_file_info_get_file_type (info) == G_FILE_TYPE_MOUNTABLE ||
+ g_file_info_get_file_type (info) == G_FILE_TYPE_SHORTCUT ||
+ g_file_info_get_file_type (info) == G_FILE_TYPE_SYMBOLIC_LINK))
_nautilus_gtk_bookmarks_manager_insert_bookmark (sidebar->bookmarks_manager, f, position++,
NULL);
g_object_unref (info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]