[gtk/matthiasc/for-master: 6/9] placessidebar: Remove a pointless restriction




commit 22257b124ad18491fef5ebd7c7c1771dee9df546
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 13 01:14:00 2020 -0400

    placessidebar: Remove a pointless restriction
    
    The sidebar was refusing to show shortcuts for
    things that don't have a local path, for no
    good reason.

 gtk/gtkplacessidebar.c | 19 -------------------
 1 file changed, 19 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index eb49757eef..a6124cc800 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -660,22 +660,6 @@ get_desktop_directory_uri (void)
   return g_filename_to_uri (name, NULL, NULL);
 }
 
-static gboolean
-should_show_file (GtkPlacesSidebar *sidebar,
-                  GFile            *file)
-{
-  char *path;
-
-  path = g_file_get_path (file);
-  if (path)
-    {
-      g_free (path);
-      return TRUE;
-    }
-
-  return FALSE;
-}
-
 static gboolean
 file_is_shown (GtkPlacesSidebar *sidebar,
                GFile            *file)
@@ -765,9 +749,6 @@ add_application_shortcuts (GtkPlacesSidebar *sidebar)
 
       g_object_unref (file);
 
-      if (!should_show_file (sidebar, file))
-        continue;
-
       if (file_is_shown (sidebar, file))
         continue;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]