[mousetrap/gnome3-wip: 234/240] Py3 compat: change from GObject.timeout_add to GLib.timeout_add.



commit 2d2c10b05db2d6c5022838e46762844a811dd772
Author: Stoney Jackson <dr stoney gmail com>
Date:   Tue Jul 1 19:01:39 2014 -0400

    Py3 compat: change from GObject.timeout_add to GLib.timeout_add.
    
    `python -3` told me to.

 src/mousetrap/core.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/mousetrap/core.py b/src/mousetrap/core.py
index 8a229cc..65b1721 100644
--- a/src/mousetrap/core.py
+++ b/src/mousetrap/core.py
@@ -1,7 +1,7 @@
 import logging
 LOGGER = logging.getLogger(__name__)
 
-from gi.repository import GObject
+from gi.repository import GLib
 
 from mousetrap.i18n import _
 from mousetrap.gui import Gui, Pointer
@@ -88,7 +88,7 @@ class Loop(Observable):
             self.MILLISECONDS_PER_SECOND / self._loops_per_second))
 
     def start(self):
-        self._timeout_id = GObject.timeout_add(self._interval, self._run)
+        self._timeout_id = GLib.timeout_add(self._interval, self._run)
 
     def _run(self):
         self._fire(self.CALLBACK_RUN)


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