[gnome-maps/wip/mlundblad/es6-modules: 26/29] mapView: Stop using imports.mainloop




commit 9e85ee9308b6b145ee4a3b9e8a3577f1fe44481a
Author: Marcus Lundblad <ml dfupdate se>
Date:   Thu May 26 18:09:05 2022 +0200

    mapView: Stop using imports.mainloop
    
    Replace Mainloop.timeout_add() with GLib.timeout_add().

 src/mapView.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/mapView.js b/src/mapView.js
index 1f868d72..77dde247 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -24,10 +24,10 @@ import Clutter from 'gi://Clutter';
 import GObject from 'gi://GObject';
 import GeocodeGlib from 'gi://GeocodeGlib';
 import Gio from 'gi://Gio';
+import GLib from 'gi://GLib';
 import Gtk from 'gi://Gtk';
 import GtkChamplain from 'gi://GtkChamplain';
 import Handy from 'gi://Handy';
-const Mainloop = imports.mainloop;
 
 import GnomeMaps from 'gi://GnomeMaps';
 
@@ -873,7 +873,7 @@ export class MapView extends GtkChamplain.Embed {
         if (this._storeId !== 0)
             return;
 
-        this._storeId = Mainloop.timeout_add(_LOCATION_STORE_TIMEOUT, () => {
+        this._storeId = GLib.timeout_add(null, _LOCATION_STORE_TIMEOUT, () => {
             this._storeId = 0;
             this._storeLocation();
         });


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