[gnome-maps/wip/mlundblad/remove-dark-street-and-hybrid-aerial: 3/6] layersPopover: Remove dark and hybrid thumbnails




commit c33d82c6eb655d86de8fdcea7bde32338410876f
Author: Marcus Lundblad <ml dfupdate se>
Date:   Sun Jun 26 21:57:31 2022 +0200

    layersPopover: Remove dark and hybrid thumbnails
    
    Remove support for setting preview thumbnails
    for dark street and hybrid aerial tiles.

 src/layersPopover.js | 42 ++----------------------------------------
 1 file changed, 2 insertions(+), 40 deletions(-)
---
diff --git a/src/layersPopover.js b/src/layersPopover.js
index 7e95bd32..9297b152 100644
--- a/src/layersPopover.js
+++ b/src/layersPopover.js
@@ -96,13 +96,6 @@ export class LayersPopover extends Gtk.Popover {
             }
         };
 
-        if (Service.getService().tiles.streetDark) {
-            this._layerPreviews.streetDark = {
-                source: MapSource.createStreetDarkSource(),
-                widget: this._streetLayerImage,
-                lastLocation: { x: -1, y: -1, z: -1 }
-            };
-        }
         if (Service.getService().tiles.aerial) {
             this._layerPreviews.aerial = {
                 source: MapSource.createAerialSource(),
@@ -110,13 +103,6 @@ export class LayersPopover extends Gtk.Popover {
                 lastLocation: { x: -1, y: -1, z: -1 }
             };
         }
-        if (Service.getService().tiles.hybridAerial) {
-            this._layerPreviews.hybridAerial = {
-                source: MapSource.createHybridAerialSource(),
-                widget: this._aerialLayerImage,
-                lastLocation: { x: -1, y: -1, z: -1 }
-            };
-        }
 
         // disable the map type switch buttons if aerial is unavailable
         if (Service.getService().tiles.aerial) {
@@ -138,11 +124,6 @@ export class LayersPopover extends Gtk.Popover {
                                        this._setLayerPreviews.bind(this));
             this._mapView.view.connect("notify::longitude",
                                        this._setLayerPreviews.bind(this));
-            Handy.StyleManager.get_default().connect("notify::dark",
-                                                    this._onDarkChanged.bind(this));
-            Application.settings.connect("changed::hybrid-aerial",
-                                         this._onHybridAerialChanged.bind(this));
-
         } else {
             this._streetLayerButton.visible = false;
             this._aerialLayerButton.visible = false;
@@ -154,28 +135,9 @@ export class LayersPopover extends Gtk.Popover {
         });
     }
 
-    _onDarkChanged() {
-        if (Service.getService().tiles.streetDark &&
-            Handy.StyleManager.get_default().dark) {
-            this._setLayerPreviewImage('streetDark', true);
-        } else {
-            this._setLayerPreviewImage('street', true);
-        }
-    }
-
     _setLayerPreviews() {
-        if (Service.getService().tiles.streetDark &&
-            Handy.StyleManager.get_default().dark) {
-            this._setLayerPreviewImage('streetDark');
-        } else {
-            this._setLayerPreviewImage('street');
-        }
-        if (Service.getService().tiles.hybridAerial &&
-            Application.settings.get('hybrid-aerial')) {
-            this._setLayerPreviewImage('hybridAerial');
-        } else {
-            this._setLayerPreviewImage('aerial');
-        }
+        this._setLayerPreviewImage('street');
+        this._setLayerPreviewImage('aerial');
     }
 
     _setLayerPreviewImage(layer, forceUpdate = false) {


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