[gtk/cherry-pick-0a98817a] Merge branch 'wip/oholy/placesview-default-location' into 'master'
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/cherry-pick-0a98817a] Merge branch 'wip/oholy/placesview-default-location' into 'master'
- Date: Mon, 6 Jan 2020 13:05:58 +0000 (UTC)
commit e0457fd2cd01cff77ddcc0c8947ce1b649b3bcd4
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Dec 24 03:47:15 2019 +0000
Merge branch 'wip/oholy/placesview-default-location' into 'master'
placesview: Always open default location after mounting
See merge request GNOME/gtk!1263
(cherry picked from commit 0a98817a6fb0673e8542fa38b7ab1e922df8d7e5)
267ea755 placesview: Always open default location after mounting
gtk/gtkplacesview.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index dab7f56f0a..62eb5d0914 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -1263,7 +1263,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]