aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2023-02-23 08:52:48 +0100
committerPapoteur <papoteur@mageia.org>2023-02-23 09:04:20 +0100
commit6144e41bf9a709e78dc571067c12791643819bba (patch)
treeaa64c2b1989ee2b66c266158b7303d39a052a9ad
parent530588a1d62c241ee9ffe1dfc9fd53d750444e5d (diff)
downloadisodumper-6144e41bf9a709e78dc571067c12791643819bba.tar
isodumper-6144e41bf9a709e78dc571067c12791643819bba.tar.gz
isodumper-6144e41bf9a709e78dc571067c12791643819bba.tar.bz2
isodumper-6144e41bf9a709e78dc571067c12791643819bba.tar.xz
isodumper-6144e41bf9a709e78dc571067c12791643819bba.zip
Display nodev dialog only after the main windows (mga#31586)
-rwxr-xr-xlib/isodumper.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index fe5d49a..56eb3d6 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -204,6 +204,7 @@ class IsoDumper(basedialog.BaseDialog):
if self.nodevDialog():
self.list = self.u.find_devices()
else:
+ self._running = False
return False
self.devicelist.addItem("", False)
if len(self.list) > 0:
@@ -897,20 +898,8 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
self.eventManager.addWidgetEvent(self.refreshbt, self.update_list)
self.eventManager.addWidgetEvent(self.helpbt, self.help_dialog)
self.eventManager.addWidgetEvent(self.aboutbt, self.aboutDialog)
- self.u = None
- try:
- self.u = UDisks2()
- except:
- message = _('UDisks2 is not available on your system')
- logging.error(message)
- self.emergency(message)
- if not self.get_devices():
- self.dialog.destroy()
- yui.YUILoader.deleteUI()
- self._running = False
- return
# Set the initial state, active, disabled
- self.initial_state()
+ #self.initial_state()
self.dialog.recalcLayout()
self.uEventQueue = SimpleQueue()
@@ -1165,6 +1154,9 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
#if event.eventType() == yui.YEvent.CancelEvent:
#self.confirm_close()
#break
+ if self._start:
+ self._start = False
+ self.initial_state()
try:
item = self.uEventQueue.get_nowait()
logging.debug(f"Dealing with {item['event']}")
@@ -1177,11 +1169,22 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
self.backupTitle = yui.YUI.app().applicationTitle()
yui.YUI.app().setApplicationTitle(self._title)
+ try:
+ self.u = UDisks2()
+ print("UDisks2 OK")
+ except:
+ message = _('UDisks2 is not available on your system')
+ logging.error(message)
+ self.emergency(message)
+ self._running = False
+ return
self._setupUI()
# setting to False will break the event loop
self._running = True
+ self._start = False
self.timeout = 100
+ self._start = True
try:
self._handleEvents()