[gnome-maps/wip/mlundblad/es6-modules: 11/19] geoJSONSource: Stop using imports.mainloop




commit 532de4a33845020bcf3d9757d9eb8b07c5fc9803
Author: Marcus Lundblad <ml dfupdate se>
Date:   Wed May 25 23:12:14 2022 +0200

    geoJSONSource: Stop using imports.mainloop
    
    Replace Mainlopp.idle_add() with GLib.idle_add().

 src/geoJSONSource.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/geoJSONSource.js b/src/geoJSONSource.js
index 29b5e80d..b379f931 100644
--- a/src/geoJSONSource.js
+++ b/src/geoJSONSource.js
@@ -21,8 +21,8 @@
 import Cairo from 'cairo';
 import Champlain from 'gi://Champlain';
 import Clutter from 'gi://Clutter';
+import GLib from 'gi://GLib';
 import GObject from 'gi://GObject';
-const Mainloop = imports.mainloop;
 
 import {BoundingBox} from './boundingBox.js';
 import * as Geojsonvt from './geojsonvt/geojsonvt.js';
@@ -85,7 +85,7 @@ export class GeoJSONSource extends Champlain.TileSource {
                 this.next_source.fill_tile(tile);
         });
 
-        Mainloop.idle_add(() => this._renderTile(tile), tile);
+        GLib.idle_add(tile, () => this._renderTile(tile));
     }
 
     _validate([lon, lat]) {


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