diff options
Diffstat (limited to 'lib/isodumper.py')
-rwxr-xr-x | lib/isodumper.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py index 4770837..eba86c2 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -529,9 +529,10 @@ class IsoDumper(object): self.write_logfile() self.dialog.destroy() self.dialog = None - #TODO REMOVE if it works as it seems - #self.glib_loop.quit() - #self.glib_thread.join() + if yui.YUI.app().isTextMode(): + self.glib_loop.quit() + if yui.YUI.app().isTextMode(): + self.glib_thread.join() def write_logfile(self): logpath = os.path.join(os.path.expanduser('~'), '.isodumper') @@ -722,21 +723,20 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog self.dialog.recalcLayout() self.ancrage.showChild() self.uEventQueue = SimpleQueue() + if yui.YUI.app().isTextMode(): + self.glib_loop = GLib.MainLoop() + self.glib_thread = threading.Thread(target=self.glib_mainloop, args=(self.glib_loop,)) + self.glib_thread.start() + self.u.iface["org.freedesktop.DBus.ObjectManager"].InterfacesAdded.connect(self.device_changed) - #TODO REMOVE if it works as it seems - #self.glib_loop = GLib.MainLoop() - #self.glib_thread = threading.Thread(target=self.glib_mainloop, args=(self.glib_loop,)) - #self.glib_thread.start() - - #TODO REMOVE if it works as it seems - #def glib_mainloop(self, loop): - #''' - #thread function for glib main loop - #listen to signal from udisks - #''' - #self.u.iface["org.freedesktop.DBus.ObjectManager"].InterfacesAdded.connect(self.device_changed) - - #loop.run() + + + def glib_mainloop(self, loop): + ''' + thread function for glib main loop + ''' + loop.run() + def device_changed(self, a, b): self.uEventQueue.put({'event': "device-changed", 'value': True}) |