[gnome-maps/wip/mlundblad/toggle-scale-button: 1/3] mainWindow: Change action for showing the scale




commit ede5238b8a5c31945a341bc1dc589331ea29a67f
Author: Marcus Lundblad <ml dfupdate se>
Date:   Thu Apr 28 22:21:17 2022 +0200

    mainWindow: Change action for showing the scale
    
    Make the action for showing/hiding the scale
    boolean-valued and bind it directly to the
    gsetting.

 src/mainWindow.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 1811de04..bb4fc69e 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -227,9 +227,10 @@ var MainWindow = GObject.registerClass({
                 accels: ['minus', '<Primary>minus', 'KP_Subtract', '<Primary>KP_Subtract'],
                 onActivate:  () => this._mapView.view.zoom_out()
             },
-            'toggle-scale': {
+            'show-scale': {
                 accels: ['<Primary>S'],
-                onActivate:  () => this._mapView.toggleScale()
+                paramType: 'b',
+                setting: 'show-scale'
             },
             'find': {
                 accels: ['<Primary>F'],


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