[Xfce4-commits] [xfce/thunar] 01/01: Hide Browse Network entry in shortcuts view if not supported
noreply at xfce.org
noreply at xfce.org
Tue Mar 24 21:24:40 CET 2020
This is an automated email from the git hooks/post-receive script.
a l e x p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/thunar.
commit 5739be722473b660166270fdaa13ca9564dd21ac
Author: Theo Linkspfeifer <lastonestanding at tutanota.com>
Date: Tue Mar 24 12:34:35 2020 +0100
Hide Browse Network entry in shortcuts view if not supported
---
thunar/thunar-shortcuts-model.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c
index 82ce548..36021d1 100644
--- a/thunar/thunar-shortcuts-model.c
+++ b/thunar/thunar-shortcuts-model.c
@@ -998,15 +998,18 @@ thunar_shortcuts_model_shortcut_network (ThunarShortcutsModel *model)
shortcut->name = g_strdup (_("NETWORK"));
thunar_shortcuts_model_add_shortcut (model, shortcut);
- /* the browse network entry */
- shortcut = g_slice_new0 (ThunarShortcut);
- shortcut->group = THUNAR_SHORTCUT_GROUP_NETWORK_DEFAULT;
- shortcut->name = g_strdup (_("Browse Network"));
- shortcut->tooltip = g_strdup (_("Browse local network connections"));
- shortcut->location = g_file_new_for_uri ("network://");
- shortcut->gicon = g_themed_icon_new ("network-workgroup");
- shortcut->hidden = thunar_shortcuts_model_get_hidden (model, shortcut);
- thunar_shortcuts_model_add_shortcut (model, shortcut);
+ /* append the browse network entry if it is supported */
+ if (thunar_g_vfs_is_uri_scheme_supported ("network"))
+ {
+ shortcut = g_slice_new0 (ThunarShortcut);
+ shortcut->group = THUNAR_SHORTCUT_GROUP_NETWORK_DEFAULT;
+ shortcut->name = g_strdup (_("Browse Network"));
+ shortcut->tooltip = g_strdup (_("Browse local network connections"));
+ shortcut->location = g_file_new_for_uri ("network://");
+ shortcut->gicon = g_themed_icon_new ("network-workgroup");
+ shortcut->hidden = thunar_shortcuts_model_get_hidden (model, shortcut);
+ thunar_shortcuts_model_add_shortcut (model, shortcut);
+ }
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list