1
0
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:
2023-03-21 08:08:39 +01:00
parent 5d129e54c4
commit 4527b518b6
2 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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)