[Xfce4-commits] [xfce/thunar] 01/01: Remove top level desktop entry from tree view (bug #16474)
noreply at xfce.org
noreply at xfce.org
Wed Mar 4 21:23:55 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 ab36334d5a553da07f53b2791b05fd999184946c
Author: Yousuf Philips <philipz85 at hotmail.com>
Date: Wed Mar 4 17:02:25 2020 +0400
Remove top level desktop entry from tree view (bug #16474)
---
thunar/thunar-tree-model.c | 8 --------
thunar/thunar-tree-view.c | 15 ++++-----------
2 files changed, 4 insertions(+), 19 deletions(-)
diff --git a/thunar/thunar-tree-model.c b/thunar/thunar-tree-model.c
index 9a431d7..2835aeb 100644
--- a/thunar/thunar-tree-model.c
+++ b/thunar/thunar-tree-model.c
@@ -281,7 +281,6 @@ thunar_tree_model_init (ThunarTreeModel *model)
{
ThunarTreeModelItem *item;
ThunarFile *file;
- GFile *desktop;
GFile *home;
GFile *computer;
GList *system_paths = NULL;
@@ -322,13 +321,6 @@ thunar_tree_model_init (ThunarTreeModel *model)
home = thunar_g_file_new_for_home ();
system_paths = g_list_append (system_paths, g_object_ref (home));
- /* append the user's desktop folder */
- desktop = thunar_g_file_new_for_desktop ();
- if (!g_file_equal (desktop, home))
- system_paths = g_list_append (system_paths, desktop);
- else
- g_object_unref (desktop);
-
/* append the trash icon if the trash is supported */
if (thunar_g_vfs_is_uri_scheme_supported ("trash"))
system_paths = g_list_append (system_paths, thunar_g_file_new_for_trash ());
diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
index d5d5294..46098bf 100644
--- a/thunar/thunar-tree-view.c
+++ b/thunar/thunar-tree-view.c
@@ -2867,9 +2867,8 @@ thunar_tree_view_set_show_hidden (ThunarTreeView *view,
* Searches for the best-matching toplevel path in the
* following order:
* 1) any mounted device or network resource
- * 2) the user's desktop directory
- * 3) the user's home directory
- * 4) the root filesystem
+ * 2) the user's home directory
+ * 3) the root filesystem
*
* Returns the #GtkTreePath for the matching toplevel item,
* or %NULL if not found. The path should be freed with gtk_tree_path_free().
@@ -2882,7 +2881,6 @@ thunar_tree_view_get_preferred_toplevel_path (ThunarTreeView *view,
GtkTreePath *path = NULL;
GtkTreeIter iter;
ThunarFile *toplevel_file;
- GFile *desktop;
GFile *home;
GFile *root;
GFile *best_match;
@@ -2894,14 +2892,11 @@ thunar_tree_view_get_preferred_toplevel_path (ThunarTreeView *view,
return NULL;
/* get GFiles for special toplevel items */
- desktop = thunar_g_file_new_for_desktop ();
home = thunar_g_file_new_for_home ();
root = thunar_g_file_new_for_root ();
/* we prefer certain toplevel items to others */
- if (thunar_file_is_gfile_ancestor (file, desktop))
- best_match = desktop;
- else if (thunar_file_is_gfile_ancestor (file, home))
+ if (thunar_file_is_gfile_ancestor (file, home))
best_match = home;
else if (thunar_file_is_gfile_ancestor (file, root))
best_match = root;
@@ -2930,8 +2925,7 @@ thunar_tree_view_get_preferred_toplevel_path (ThunarTreeView *view,
{
/* the toplevel item could be a mounted device or network
* and we prefer this to everything else */
- if (!g_file_equal (thunar_file_get_file (toplevel_file), desktop) &&
- !g_file_equal (thunar_file_get_file (toplevel_file), home) &&
+ if (!g_file_equal (thunar_file_get_file (toplevel_file), home) &&
!g_file_equal (thunar_file_get_file (toplevel_file), root))
{
gtk_tree_path_free (path);
@@ -2964,7 +2958,6 @@ thunar_tree_view_get_preferred_toplevel_path (ThunarTreeView *view,
/* cleanup */
g_object_unref (root);
g_object_unref (home);
- g_object_unref (desktop);
return path;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list