[gnome-maps/wip/mlundblad/es6-modules: 9/19] contextMenu: Stop using imports.mainloop
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/es6-modules: 9/19] contextMenu: Stop using imports.mainloop
- Date: Sat, 28 May 2022 08:50:40 +0000 (UTC)
commit 7c64f8fd27449069869326e0c8116ebeacfb28af
Author: Marcus Lundblad <ml dfupdate se>
Date: Wed May 25 23:05:54 2022 +0200
contextMenu: Stop using imports.mainloop
Replace Mainlopp.idle_add() with GLib.idle_add().
src/contextMenu.js | 4 ++--
1 file 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() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]