[gnome-maps/wip/mlundblad/es6-modules: 14/24] 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: 14/24] contextMenu: Stop using imports.mainloop
- Date: Mon, 30 May 2022 16:22:44 +0000 (UTC)
commit a6d8baf21e3e9269021dcc607e8af198b9f2f426
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]