jp: updated main loop to gobject 3
This commit is contained in:
parent
97b8554124
commit
f0676dfa52
1 changed files with 3 additions and 3 deletions
|
|
@ -33,7 +33,7 @@ import sys
|
||||||
import locale
|
import locale
|
||||||
import os.path
|
import os.path
|
||||||
import argparse
|
import argparse
|
||||||
import gobject
|
from gi.repository import GLib
|
||||||
from glob import iglob
|
from glob import iglob
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
from sat.tools.jid import JID
|
from sat.tools.jid import JID
|
||||||
|
|
@ -154,7 +154,7 @@ class Jp(object):
|
||||||
self._start_loop()
|
self._start_loop()
|
||||||
|
|
||||||
def _start_loop(self):
|
def _start_loop(self):
|
||||||
self.loop = gobject.MainLoop()
|
self.loop = GLib.MainLoop()
|
||||||
try:
|
try:
|
||||||
self.loop.run()
|
self.loop.run()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|
@ -255,7 +255,7 @@ class Jp(object):
|
||||||
|
|
||||||
def watch_progress(self):
|
def watch_progress(self):
|
||||||
self.pbar = None
|
self.pbar = None
|
||||||
gobject.timeout_add(10, self._progress_cb)
|
GObject.timeout_add(10, self._progress_cb)
|
||||||
|
|
||||||
def _progress_cb(self):
|
def _progress_cb(self):
|
||||||
if self.progress_id:
|
if self.progress_id:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue