aboutsummaryrefslogtreecommitdiffstats
path: root/lib/isodumper.py
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2021-01-17 18:41:06 +0100
committerAngelo Naselli <anaselli@linux.it>2021-01-17 18:41:06 +0100
commit32ada7135cf4e7789046e73424e19325ebf830e8 (patch)
tree1d05d3cd3dfa039ed229cdbc337d15a20da36e42 /lib/isodumper.py
parentb3ef1d16d1e3fbe6c438421d6728be06d2b9d468 (diff)
downloadisodumper-32ada7135cf4e7789046e73424e19325ebf830e8.tar
isodumper-32ada7135cf4e7789046e73424e19325ebf830e8.tar.gz
isodumper-32ada7135cf4e7789046e73424e19325ebf830e8.tar.bz2
isodumper-32ada7135cf4e7789046e73424e19325ebf830e8.tar.xz
isodumper-32ada7135cf4e7789046e73424e19325ebf830e8.zip
Fixing gtk hang caused by glib loop used by yui-gtk too
Diffstat (limited to 'lib/isodumper.py')
-rwxr-xr-xlib/isodumper.py35
1 files changed, 19 insertions, 16 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index 9bde522..4770837 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -1,6 +1,6 @@
# coding:utf-8
-# !/usr/bin/python3
+# !/usr/bin/env python3
#
# Copyright (c) 2007-2009 Canonical Ltd.
#
@@ -33,8 +33,7 @@ try:
except:
import version
-sys.path.insert(0, '../../../build/swig/python3')
-importlib.reload(sys)
+
###########
# imports #
###########
@@ -530,8 +529,9 @@ class IsoDumper(object):
self.write_logfile()
self.dialog.destroy()
self.dialog = None
- self.glib_loop.quit()
- self.glib_thread.join()
+ #TODO REMOVE if it works as it seems
+ #self.glib_loop.quit()
+ #self.glib_thread.join()
def write_logfile(self):
logpath = os.path.join(os.path.expanduser('~'), '.isodumper')
@@ -722,18 +722,21 @@ 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()
- self.glib_loop = GLib.MainLoop()
- self.glib_thread = threading.Thread(target=self.glib_mainloop, args=(self.glib_loop,))
- self.glib_thread.start()
-
-
- 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()
+ #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 device_changed(self, a, b):
self.uEventQueue.put({'event': "device-changed", 'value': True})