From 96dad00d94118cb52234b9e486edb5a85a9f8d04 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Wed, 23 Dec 2020 18:38:31 +0100 Subject: Fix merging --- lib/isodumper.py | 21 +++++++++++---------- 1 file 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 != "": -- cgit v1.2.1