diff -Nru gtk+3.0-3.18.9/debian/changelog gtk+3.0-3.18.9/debian/changelog --- gtk+3.0-3.18.9/debian/changelog 2017-03-23 20:45:45.000000000 +0100 +++ gtk+3.0-3.18.9/debian/changelog 2017-09-07 09:39:19.000000000 +0200 @@ -1,3 +1,11 @@ +gtk+3.0 (3.18.9-1ubuntu3.4) xenial; urgency=medium + + * d/p/075-fix-fuse-mounts-in-file-chooser.patch: + add patch to show network shares in file selector. + (Closes: LP: #1714518) + + -- Colin Leroy Thu, 07 Sep 2017 09:26:00 +0200 + gtk+3.0 (3.18.9-1ubuntu3.3) xenial; urgency=medium * Backport upstream patch to fix lagging and visual issues in Nautilus diff -Nru gtk+3.0-3.18.9/debian/patches/075-fix-fuse-mounts-in-file-chooser.patch gtk+3.0-3.18.9/debian/patches/075-fix-fuse-mounts-in-file-chooser.patch --- gtk+3.0-3.18.9/debian/patches/075-fix-fuse-mounts-in-file-chooser.patch 1970-01-01 01:00:00.000000000 +0100 +++ gtk+3.0-3.18.9/debian/patches/075-fix-fuse-mounts-in-file-chooser.patch 2017-09-07 09:38:57.000000000 +0200 @@ -0,0 +1,107 @@ +Descrption: Re-add locally accessible FUSE mounts to filechooser + The attached patch re-adds the network mounts that are accessible + locally (via FUSE) to GtkFileChooser when in local-only mode. + A lot of people miss this a lot while major applications + (Firefox, Chromium, etc) gradually switch to GTK+3. + . + gtk+3.0 (3.18.9-1ubuntu3.4) xenial; urgency=medium + . + * add patch to show network shares in file selector. + (075-fix-fuse-mounts-in-file-chooser.patch, LP: #1714518). +Author: Colin Leroy +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1714518 + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: other, https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1714518 +Bug: https://bugzilla.gnome.org/show_bug.cgi?id=787128 +Bug-Ubuntu: https://launchpad.net/bugs/1714518 +Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=787128 +Last-Update: 2017-09-07 + +--- gtk+3.0-3.18.9.orig/gtk/gtkplacessidebar.c ++++ gtk+3.0-3.18.9/gtk/gtkplacessidebar.c +@@ -845,6 +845,31 @@ is_external_volume (GVolume *volume) + return is_external; + } + ++static gboolean ++is_mount_locally_accessible (GMount *mount) ++{ ++ GFile *base_file; ++ ++ if (mount == NULL) ++ return FALSE; ++ ++ base_file = g_mount_get_root (mount); ++ ++ if (base_file != NULL) ++ { ++ char *path = g_file_get_path (base_file); ++ g_object_unref (base_file); ++ ++ if (path != NULL) ++ { ++ g_free(path); ++ return TRUE; ++ } ++ } ++ ++ return FALSE; ++} ++ + static void + update_places (GtkPlacesSidebar *sidebar) + { +@@ -853,6 +878,7 @@ update_places (GtkPlacesSidebar *sidebar + GList *drives; + GDrive *drive; + GList *volumes; ++ gboolean locally_accessible_network_volumes = FALSE; + GVolume *volume; + GSList *bookmarks, *sl; + gint index; +@@ -1227,7 +1253,28 @@ update_places (GtkPlacesSidebar *sidebar + g_object_unref (new_bookmark_icon); + + /* network */ +- if (!sidebar->local_only) ++ ++ /* network */ ++ ++ /* See if some network mounts are locally accessible (FUSE) */ ++ if (sidebar->local_only) ++ { ++ for (l = network_mounts; l != NULL; l = l->next) ++ { ++ mount = l->data; ++ ++ if (is_mount_locally_accessible(mount)) ++ { ++ locally_accessible_network_volumes = TRUE; ++ break; ++ } ++ } ++ } ++ ++ /* Only show network section if !local_only or some mounts are ++ * locally accessible ++ */ ++ if (!sidebar->local_only || locally_accessible_network_volumes) + { + if (sidebar->show_connect_to_server) + { +@@ -1271,6 +1318,10 @@ update_places (GtkPlacesSidebar *sidebar + for (l = network_mounts; l != NULL; l = l->next) + { + mount = l->data; ++ ++ if (sidebar->local_only && !is_mount_locally_accessible(mount)) ++ continue; ++ + root = g_mount_get_default_location (mount); + icon = g_mount_get_symbolic_icon (mount); + mount_uri = g_file_get_uri (root); diff -Nru gtk+3.0-3.18.9/debian/patches/series gtk+3.0-3.18.9/debian/patches/series --- gtk+3.0-3.18.9/debian/patches/series 2017-03-23 20:42:42.000000000 +0100 +++ gtk+3.0-3.18.9/debian/patches/series 2017-09-07 09:34:55.000000000 +0200 @@ -28,3 +28,4 @@ unity-headerbar-maximized-mode.patch gdk-x11-Check-if-we-have-access-to-GL-before-using-G.patch toggled-not-clicked.patch +075-fix-fuse-mounts-in-file-chooser.patch