[gnome-games] ui: Fix accessing files outside the sandbox



commit 0184a5d35a38a9b58d667b7f3694ec68bcee4836
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Nov 17 12:08:46 2017 +0100

    ui: Fix accessing files outside the sandbox
    
    Use a filechooser that can break out of the sandbox to go and look for
    games to add to the library.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788228

 src/ui/application.vala |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/ui/application.vala b/src/ui/application.vala
index 218e3b7..502bde7 100644
--- a/src/ui/application.vala
+++ b/src/ui/application.vala
@@ -132,10 +132,9 @@ public class Games.Application : Gtk.Application {
        }
 
        public async void add_game_files_async () {
-               var chooser = new Gtk.FileChooserDialog (
+               var chooser = new Gtk.FileChooserNative (
                        _("Select game files"), window, Gtk.FileChooserAction.OPEN,
-                       _("_Cancel"), Gtk.ResponseType.CANCEL,
-                       _("_Add"), Gtk.ResponseType.ACCEPT);
+                       _("_Add"), _("_Cancel"));
 
                chooser.select_multiple = true;
 
@@ -149,8 +148,6 @@ public class Games.Application : Gtk.Application {
                                var uri = new Uri (uri_string);
                                yield add_cached_uri (uri);
                        }
-
-               chooser.close ();
        }
 
        protected override void open (File[] files, string hint) {


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