Stefan Schuermans commited on 2019-08-14 19:15:14
Showing 1 changed files, with 5 additions and 5 deletions.
... | ... |
@@ -12,7 +12,7 @@ import sys |
12 | 12 |
import time |
13 | 13 |
|
14 | 14 |
gi.require_version('Gtk', '3.0') |
15 |
-from gi.repository import GObject |
|
15 |
+from gi.repository import GLib |
|
16 | 16 |
from gi.repository import Gtk |
17 | 17 |
from gi.repository import Pango |
18 | 18 |
|
... | ... |
@@ -83,16 +83,16 @@ class Master(object): |
83 | 83 |
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
84 | 84 |
self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) |
85 | 85 |
self.sock.bind(self.bind) |
86 |
- self.sockInEvId = GObject.io_add_watch(self.sock.makefile(), |
|
87 |
- GObject.IO_IN, self.onRecv) |
|
86 |
+ self.sockInEvId = GLib.io_add_watch(self.sock.makefile(), |
|
87 |
+ GLib.IO_IN, self.onRecv) |
|
88 | 88 |
# start background actions |
89 |
- GObject.timeout_add(100, self.onTimer100ms) |
|
89 |
+ GLib.timeout_add(100, self.onTimer100ms) |
|
90 | 90 |
self.output( |
91 | 91 |
"started (bind=\"{:s}:{:d}\")".format(self.bind[0], self.bind[1])) |
92 | 92 |
|
93 | 93 |
def __del__(self): |
94 | 94 |
"""cleanup""" |
95 |
- GObject.source_remove(self.sockInEvId) |
|
95 |
+ GLib.source_remove(self.sockInEvId) |
|
96 | 96 |
self.sock.close() |
97 | 97 |
|
98 | 98 |
def onCall(self, widget): |
99 | 99 |