[gtk/ebassi/filechooser-no-trash] Never show the Trash in the FileChooserWidget side bar




commit 889709213e80e1f6ccb5d231da1e0aedb8f4640a
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sun Jun 20 15:39:41 2021 +0100

    Never show the Trash in the FileChooserWidget side bar
    
    The Trash is a special location: files cannot be copied or moved, there,
    and the file selection dialog is not able to restore files from the
    Trash.
    
    Fixes: #674

 gtk/gtkfilechooserwidget.c     | 1 -
 gtk/ui/gtkfilechooserwidget.ui | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index d03c796540..918206ac26 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -2834,7 +2834,6 @@ update_appearance (GtkFileChooserWidget *impl)
     {
       save_widgets_create (impl);
       gtk_places_sidebar_set_show_recent (GTK_PLACES_SIDEBAR (impl->places_sidebar), FALSE);
-      gtk_places_sidebar_set_show_trash (GTK_PLACES_SIDEBAR (impl->places_sidebar), FALSE);
 
       if (impl->select_multiple)
         {
diff --git a/gtk/ui/gtkfilechooserwidget.ui b/gtk/ui/gtkfilechooserwidget.ui
index 876c67f332..9346afd767 100644
--- a/gtk/ui/gtkfilechooserwidget.ui
+++ b/gtk/ui/gtkfilechooserwidget.ui
@@ -17,6 +17,7 @@
                 <child>
                   <object class="GtkPlacesSidebar" id="places_sidebar">
                     <property name="show-other-locations">1</property>
+                    <property name="show-trash">0</property>
                     <style>
                       <class name="sidebar"/>
                     </style>


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