aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2023-05-14 18:11:55 +0200
committerPapoteur <papoteur@mageia.org>2023-05-14 18:12:09 +0200
commit9837284df3bb8310cb9988b8f31ccf7a98dbfa04 (patch)
treef59c66d327d45d361a01022de942ec7bb4754669 /lib
parentd2f8bac794f25536a94d671b41264f336e9e2499 (diff)
downloadisodumper-9837284df3bb8310cb9988b8f31ccf7a98dbfa04.tar
isodumper-9837284df3bb8310cb9988b8f31ccf7a98dbfa04.tar.gz
isodumper-9837284df3bb8310cb9988b8f31ccf7a98dbfa04.tar.bz2
isodumper-9837284df3bb8310cb9988b8f31ccf7a98dbfa04.tar.xz
isodumper-9837284df3bb8310cb9988b8f31ccf7a98dbfa04.zip
Init DBus interface later. This avoid to wait in some cases with GTK interface
Diffstat (limited to 'lib')
-rwxr-xr-xlib/isodumper.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index 0f71d95..da79323 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -452,6 +452,7 @@ class IsoDumper(basedialog.BaseDialog):
return rc
def backup_go(self):
+ self.init_iface()
self.wip_unsensitive()
self.progress.setEnabled()
self.progress.setLabel("Backup")
@@ -505,6 +506,7 @@ class IsoDumper(basedialog.BaseDialog):
return True
def do_write(self):
+ self.init_iface()
self.wip_unsensitive()
self.progress.setEnabled()
self.progress.setLabel("Writing")
@@ -743,6 +745,14 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
if self.ask_OK(info):
return
+ def init_iface(self):
+ # Prepare interface on DBus
+ try:
+ self.iface
+ except:
+ self.bus = SystemBus()
+ self.iface = self.bus.get("org.mageia.Magiback", "Isodumper")
+
def __init__(self, debug=False):
APP = "isodumper"
# Call translation catalog
@@ -774,10 +784,6 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
# Operation running
self.operation = False
- # Prepare interface on DBus
- self.bus = SystemBus()
- self.iface = self.bus.get("org.mageia.Magiback", "Isodumper")
-
self.ChooseImage = _("Choose an image")
self.warning = _("Warning\nThis will destroy all data on the target device,\n\
are you sure you want to proceed?\n\
@@ -786,6 +792,7 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
"""
Init/Constructor for the 'widgets'
"""
+
self.dialog = basedialog.BaseDialog.__init__(self, _("Isodumper {}").format(version.RELEASE), "", basedialog.DialogType.POPUP, 100, 10)
yui.YUI.app().setApplicationIcon("/usr/share/icons/isodumper.png")
@@ -1166,7 +1173,6 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog
pass
def run(self, debug=False):
-
self.backupTitle = yui.YUI.app().applicationTitle()
yui.YUI.app().setApplicationTitle(self._title)
try: