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




commit 16d20adf1d2b88c9e8ad3ff16e5041a123e5b68d
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 9be53e92..f0b6e5ef 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]