[nautilus/wip/oholy/pathbar-default-locaton: 114/114] gtkplacesview: Update to latest code




commit 5b0301b0d65fb30513c63b4511cc207b4f64c602
Author: Ondrej Holy <oholy redhat com>
Date:   Thu Dec 19 17:37:52 2019 +0100

    gtkplacesview: Update to latest code
    
    Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/1319

 src/gtk/nautilusgtkplacesview.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
index af05540f2..ae35daa60 100644
--- a/src/gtk/nautilusgtkplacesview.c
+++ b/src/gtk/nautilusgtkplacesview.c
@@ -1262,7 +1262,21 @@ server_mount_ready_cb (GObject      *source_file,
       gtk_entry_set_text (GTK_ENTRY (priv->address_entry), "");
 
       if (priv->should_open_location)
-        emit_open_location (view, location, priv->open_flags);
+        {
+          GMount *mount;
+          GFile *root;
+
+          mount = g_file_find_enclosing_mount (location, priv->cancellable, NULL);
+          if (mount)
+            {
+              root = g_mount_get_default_location (mount);
+
+              emit_open_location (view, root, priv->open_flags);
+
+              g_object_unref (root);
+              g_object_unref (mount);
+            }
+        }
     }
 
   update_places (view);


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