[gnome-maps] Move away from using GtkDialog::run



commit f654384383efac5de127d2b65a54e32bde374e0b
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Sat Jan 30 12:04:16 2016 +0100

    Move away from using GtkDialog::run
    
    Instead we can connect to the response signal and destroy
    the dialog in there. This seems to fix a buglet where
    we could not pan after dismissing dialogs.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760487

 src/contextMenu.js      |    6 ++++--
 src/exportViewDialog.js |    6 ++++--
 src/mapBubble.js        |    6 ++++--
 3 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/contextMenu.js b/src/contextMenu.js
index 39633b1..87f0832 100644
--- a/src/contextMenu.js
+++ b/src/contextMenu.js
@@ -106,8 +106,10 @@ const ContextMenu = new Lang.Class({
             mapView: this._mapView
         });
 
-        dialog.run();
-        dialog.destroy();
+        dialog.connect('response', function() {
+            dialog.destroy();
+        });
+        dialog.show_all();
     },
 
     _onExportActivated: function() {
diff --git a/src/exportViewDialog.js b/src/exportViewDialog.js
index 15e1e54..251b568 100644
--- a/src/exportViewDialog.js
+++ b/src/exportViewDialog.js
@@ -171,8 +171,10 @@ const ExportViewDialog = new Lang.Class({
                 secondary_text: details
             });
 
-            dialog.run();
-            dialog.destroy();
+            dialog.connect('response', function() {
+                dialog.destroy();
+            });
+            dialog.show_all();
         }
     },
 
diff --git a/src/mapBubble.js b/src/mapBubble.js
index 5d44215..74f8b59 100644
--- a/src/mapBubble.js
+++ b/src/mapBubble.js
@@ -142,8 +142,10 @@ const MapBubble = new Lang.Class({
 
         button.visible = true;
         button.connect('clicked', function() {
-            dialog.run();
-            dialog.hide();
+            dialog.connect('response', function() {
+                dialog.hide();
+            });
+            dialog.show_all();
         });
     },
 


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