[nautilus] properties: Use cache nautilus file when opening from sidebar



commit 5d371babaf464db61c1134568a72d4f553680439
Author: Corey Berla <corey berla me>
Date:   Thu Jun 16 08:51:46 2022 -0700

    properties: Use cache nautilus file when opening from sidebar
    
    Now that we have a nautilus file cached for sidebar items,
    use that instead of getting a nautilus file from URI.
    This resolves an issue where properties doesn't show volume
    information unless the volume was previously browsed.

 src/gtk/nautilusgtkplacessidebar.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/gtk/nautilusgtkplacessidebar.c b/src/gtk/nautilusgtkplacessidebar.c
index b9b845180..c772aedef 100644
--- a/src/gtk/nautilusgtkplacessidebar.c
+++ b/src/gtk/nautilusgtkplacessidebar.c
@@ -2461,10 +2461,9 @@ properties_cb (GSimpleAction *action,
   NautilusGtkPlacesSidebar *sidebar = data;
   GList *list;
   NautilusFile *file;
-  g_autofree gchar *uri = NULL;
 
-  g_object_get (sidebar->context_row, "uri", &uri, NULL);
-  file = nautilus_file_get_by_uri (uri);
+  g_object_get (sidebar->context_row, "file", &file, NULL);
+
   list = g_list_append (NULL, file);
   nautilus_properties_window_present (list, GTK_WIDGET (sidebar), NULL, NULL, NULL);
 


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