[gnome-maps] layersPopover: Remove the old thumbnails



commit e3ffa15d7b58dbce2f1f938e2893628550aea972
Author: James Westman <flyingpimonster flyingpimonster net>
Date:   Mon Oct 22 16:13:32 2018 -0500

    layersPopover: Remove the old thumbnails
    
    Also improve error checking in the last commit

 data/media/maptype-aerial.png          | Bin 30531 -> 0 bytes
 data/media/maptype-street.png          | Bin 32933 -> 0 bytes
 data/org.gnome.Maps.data.gresource.xml |   2 --
 data/ui/layers-popover.ui              |   2 --
 src/layersPopover.js                   |   5 ++++-
 5 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/data/org.gnome.Maps.data.gresource.xml b/data/org.gnome.Maps.data.gresource.xml
index 0bc61f7..9ed746a 100644
--- a/data/org.gnome.Maps.data.gresource.xml
+++ b/data/org.gnome.Maps.data.gresource.xml
@@ -38,8 +38,6 @@
     <file preprocess="xml-stripblanks">ui/user-location-bubble.ui</file>
     <file preprocess="xml-stripblanks">ui/zoom-in-dialog.ui</file>
     <file alias="application.css">gnome-maps.css</file>
-    <file alias="ui/maptype-aerial.png">media/maptype-aerial.png</file>
-    <file alias="ui/maptype-street.png">media/maptype-street.png</file>
     <file alias="osm-types.json" compressed="true">osm-types.json</file>
   </gresource>
   <gresource prefix="/org/gnome/Maps/gtk">
diff --git a/data/ui/layers-popover.ui b/data/ui/layers-popover.ui
index 5fde141..22ec9c8 100644
--- a/data/ui/layers-popover.ui
+++ b/data/ui/layers-popover.ui
@@ -20,7 +20,6 @@
             <child>
               <object class="GtkImage" id="streetLayerImage">
                 <property name="visible">True</property>
-                <property name="resource">/org/gnome/Maps/ui/maptype-street.png</property>
               </object>
             </child>
           </object>
@@ -40,7 +39,6 @@
             <child>
               <object class="GtkImage" id="aerialLayerImage">
                 <property name="visible">True</property>
-                <property name="resource">/org/gnome/Maps/ui/maptype-aerial.png</property>
               </object>
             </child>
           </object>
diff --git a/src/layersPopover.js b/src/layersPopover.js
index e31906c..0d79748 100644
--- a/src/layersPopover.js
+++ b/src/layersPopover.js
@@ -156,7 +156,10 @@ var LayersPopover = GObject.registerClass({
 
         let tile = Champlain.Tile.new_full(x, y, size, z);
 
-        tile.connect("render-complete", () => {
+        tile.connect("render-complete", (a, b, c, error) => {
+            if (error)
+                return; // oh well
+
             // Make sure we're still at the same location
             // This is especially important on slow connections
             if (previewInfo.lastLocation.x == x &&


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