[gnome-maps/wip/mlundblad/es6-modules: 23/25] printOperation: Stop using imports.mainloop




commit 90e6aaaa0295dddd881788222e9196b10032a13b
Author: Marcus Lundblad <ml dfupdate se>
Date:   Thu May 26 18:11:17 2022 +0200

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

 src/printOperation.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/printOperation.js b/src/printOperation.js
index 33dcc9c3..78c02c3f 100644
--- a/src/printOperation.js
+++ b/src/printOperation.js
@@ -17,8 +17,8 @@
  * Author: Amisha Singla <amishas157 gmail com>
  */
 
+import GLib from 'gi://GLib';
 import Gtk from 'gi://Gtk';
-const Mainloop = imports.mainloop;
 
 import {Application} from './application.js';
 import {LongPrintLayout} from './longPrintLayout.js';
@@ -65,7 +65,7 @@ export class PrintOperation {
         let width = context.get_width();
         let height = context.get_height();
 
-        Mainloop.timeout_add(_MIN_TIME_TO_ABORT, () => {
+        GLib.timeout_add(null, _MIN_TIME_TO_ABORT, () => {
             if (!this._layout.renderFinished) {
                 this._abortDialog.show();
             }


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