summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@dfupdate.se>2022-05-25 23:05:54 +0200
committerMarcus Lundblad <ml@dfupdate.se>2022-06-08 22:08:34 +0200
commit3fcce1b6c2c17b5f51d9b6506a779253bcae58b1 (patch)
tree41b9352b09abf73c57b687a64bd88a4682345bd5
parent1dd1a160bf6253ccdcc981dfb08fcba1e142d8a8 (diff)
downloadgnome-maps-3fcce1b6c2c17b5f51d9b6506a779253bcae58b1.tar.gz
contextMenu: Stop using imports.mainloop
Replace Mainlopp.idle_add() with GLib.idle_add().
-rw-r--r--src/contextMenu.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/contextMenu.js b/src/contextMenu.js
index 88b93dbe..0b71b08e 100644
--- a/src/contextMenu.js
+++ b/src/contextMenu.js
@@ -22,8 +22,8 @@
import Gdk from 'gi://Gdk';
import GeocodeGlib from 'gi://GeocodeGlib';
import GObject from 'gi://GObject';
+import GLib from 'gi://GLib';
import Gtk from 'gi://Gtk';
-const Mainloop = imports.mainloop;
import {Application} from './application.js';
import * as GeocodeFactory from './geocode.js';
@@ -77,7 +77,7 @@ export class ContextMenu extends Gtk.Menu {
this._latitude = this._mapView.view.y_to_latitude(y);
// Need idle to avoid Clutter dead-lock on re-entrance
- Mainloop.idle_add(() => this.popup_at_pointer(event));
+ GLib.idle_add(null, () => this.popup_at_pointer(event));
}
_routingUpdate() {