aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/isodumper.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index 2f58d6b..bea003a 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -217,19 +217,9 @@ class IsoDumper(basedialog.BaseDialog):
self.dialog.recalcLayout()
self.restore()
-<<<<<<< HEAD
def refresh_signal(self, device, params):
- print("Refresh ", device)
self.devicelist.deleteAllItems()
self.get_devices()
-=======
- def update_list_on_event(self):
- selitem = self.devicelist.selectedItem().label()
- self.devicelist.deleteAllItems()
- self.get_devices(selected = selitem)
- if self.devicelist.selectedItem().label() != selitem:
- self.restore()
->>>>>>> master
self.dialog.recalcLayout()
def device_selected(self):
@@ -775,6 +765,17 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
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()
+
+ def device_changed(self, a, b):
+ self.uEventQueue.put({'event': "device-changed", 'value': True})
+
def ask_image(self):
self.img_name = yui.YUI.app().askForExistingFile("", "*.iso *.img", self.ChooseImage)
if self.img_name != "":