summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2022-07-14 16:18:57 -0700
committerCorey Berla <corey@berla.me>2022-07-14 18:51:14 -0700
commit0aa1b66ffa07060bb7c2dae14978a7f71e156626 (patch)
tree859e211f0524b52def9572c25cf587d0a4e84d21
parentc92e98c4bb904b5746ab88efdb5d6f05473e6221 (diff)
downloadnautilus-0aa1b66ffa07060bb7c2dae14978a7f71e156626.tar.gz
window-slot: Show special-directory info bar for Public folder
Check for schema org.gnome.desktop.file-sharing to verify gnome-user-share is installed.
-rw-r--r--src/nautilus-window-slot.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 7e94ffcab..664754e63 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -65,6 +65,8 @@ enum
NUM_PROPERTIES
};
+#define FILE_SHARING_SCHEMA_ID "org.gnome.desktop.file-sharing"
+
struct _NautilusWindowSlot
{
GtkBox parent_instance;
@@ -2741,6 +2743,11 @@ nautilus_window_slot_setup_extra_location_widgets (NautilusWindowSlot *self)
{
nautilus_window_slot_show_special_location_bar (self, NAUTILUS_SPECIAL_LOCATION_SCRIPTS);
}
+ else if (check_schema_available (FILE_SHARING_SCHEMA_ID) &&
+ nautilus_file_is_user_special_directory (file, G_USER_DIRECTORY_PUBLIC_SHARE))
+ {
+ nautilus_window_slot_show_special_location_bar (self, NAUTILUS_SPECIAL_LOCATION_SHARING);
+ }
g_object_unref (scripts_file);
nautilus_file_unref (file);