[gnome-maps] mainWindow: Use GtkFileChooserNative for open dialog



commit 84480af9596d3caa093ff19f10414a101a5e86b3
Author: Marcus Lundblad <ml update uu se>
Date:   Tue Jun 20 22:58:23 2017 +0200

    mainWindow: Use GtkFileChooserNative for open dialog
    
    Use the GtkFileChooseNative dialog for the open shape layer
    dialog. This should enable opening files when running as a Flatpak.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783088

 src/mainWindow.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index fd97733..a45f4e6 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -50,7 +50,7 @@ const _WINDOW_MIN_HEIGHT = 500;
 
 const ShapeLayerFileChooser = new Lang.Class({
     Name: 'ShapeLayerFileChooser',
-    Extends: Gtk.FileChooserDialog,
+    Extends: Gtk.FileChooserNative,
     Template: 'resource:///org/gnome/Maps/ui/shape-layer-file-chooser.ui',
 
     _init: function(params) {
@@ -498,7 +498,7 @@ const MainWindow = new Lang.Class({
         });
 
         fileChooser.connect('response', (function(widget, response) {
-            if (response === Gtk.ResponseType.OK) {
+            if (response === Gtk.ResponseType.ACCEPT) {
                 this._mapView.openShapeLayers(fileChooser.get_files());
                 this.layersPopover.popdown();
             }


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