mirror of
https://github.com/gryf/pygtkworldclock.git
synced 2025-12-17 03:20:23 +01:00
Use GLib.timeout instead of GObject.timeout
This commit is contained in:
@@ -8,7 +8,7 @@ Requirement
|
||||
|
||||
- Python3
|
||||
- PyCairo
|
||||
- PyGObject
|
||||
- PyGObject (GTK3)
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
@@ -68,7 +68,7 @@ and the result:
|
||||
.. image:: /images/vertical.png
|
||||
:alt: single clock
|
||||
|
||||
Same in horizontal arragement:
|
||||
Same in horizontal arrangement:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ import sys
|
||||
import cairo
|
||||
import gi
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import GLib
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import GObject
|
||||
import pytz
|
||||
import yaml
|
||||
|
||||
@@ -197,7 +197,7 @@ class Clocks(Gtk.DrawingArea):
|
||||
|
||||
def run(self):
|
||||
self.connect('draw', self._draw)
|
||||
GObject.timeout_add(100, self.on_timeout)
|
||||
GLib.timeout_add(100, self.on_timeout)
|
||||
win = Gtk.Window()
|
||||
win.set_title('World Clock')
|
||||
win.set_resizable(not self.disable_resize)
|
||||
|
||||
Reference in New Issue
Block a user