aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2016-04-09 18:13:41 +0200
committerPapoteur <papoteur@mageialinux-online.org>2016-04-09 18:13:41 +0200
commit0bda425130032af3d068bbaeb9637ada3f4d363f (patch)
tree5f7c29c2289e9805233c92a7ea5dd26cfbf6eb09 /lib
parentc35fbca16a6ab534ba523da9dd3c704dbc802ef8 (diff)
downloadisodumper-0bda425130032af3d068bbaeb9637ada3f4d363f.tar
isodumper-0bda425130032af3d068bbaeb9637ada3f4d363f.tar.gz
isodumper-0bda425130032af3d068bbaeb9637ada3f4d363f.tar.bz2
isodumper-0bda425130032af3d068bbaeb9637ada3f4d363f.tar.xz
isodumper-0bda425130032af3d068bbaeb9637ada3f4d363f.zip
Change Maindialog to PopupDialog, to have a smaller window, nicer.
Clean code Add comments Update some strings for better language Correction for closing application, without segfault.
Diffstat (limited to 'lib')
-rw-r--r--lib/isodumper.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index dfb1990..df780d9 100644
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -487,7 +487,7 @@ class IsoDumper(object):
def success(self):
self.operation=False
self.final_unsensitive()
- info = Info(_("Success"),True,_("The operation was successfully performed.\n\
+ info = Info(_("Success"),True,_("The operation completed successfully.\n\
You are free to unplug it now, a log isodumper.log\n\
of the operation will be saved in your homedir/.isodumper/ when\n\
you close the application."))
@@ -500,7 +500,7 @@ class IsoDumper(object):
self.close()
else: # writing , backup or format running
info = Info(_("Warning"),True,_("Writing is in progress. Exiting during writing \n\
- will occur that the device or the backup will be unusable.\n\
+ will make the device or the backup unusable.\n\
Are you sure you want to quit during writing?"))
if self.ask_YesOrNo(info) :
return True
@@ -523,7 +523,7 @@ class IsoDumper(object):
def close(self):
self.write_logfile()
- self.dialog.destroy
+ self.dialog.destroy()
#exit(0)
def write_logfile(self):
@@ -598,7 +598,7 @@ The fields of the main window are as follows:\n\
yui.YUI.app().setApplicationTitle(_("IsoDumper")+" "+self.RELEASE)
yui.YUI.app().setApplicationIcon("/usr/share/icons/isodumper.png")
self.atelier = yui.YUI.widgetFactory()
- self.dialog = self.atelier.createMainDialog()
+ self.dialog = self.atelier.createPopupDialog()
# create the main gui
# +---+-----------------+
# + banner +
@@ -620,32 +620,28 @@ The fields of the main window are as follows:\n\
self.ancrage = self.atelier.createReplacePoint(self.dialog)
self.box = self.atelier.createVBox(self.ancrage)
self.bannerbox = self.atelier.createHBox(self.box)
-# self.bannerbox.setWeight(1,15)
self.banner=self.atelier.createImage(self.bannerbox,"/usr/share/isodumper/header.png")
self.devicebox = self.atelier.createHBox(self.box)
self.devicebox.setWeight(1,10)
self.devicelist=self.atelier.createComboBox(self.devicebox,_("Device to work on:"),False)
self.devicelist.setStretchable(0,True)
self.writebox = self.atelier.createHBox(self.box)
- #self.writebox.setWeight(1,10)
self.atelier.createLabel(self.writebox,_("Write Image:"))
- # add file picker
+ # add file picker for image file
self.ima=self.atelier.createPushButton(self.writebox,"Choose an image")
self.ima.setStretchable(0,True)
self.ima.setDisabled()
self.atelier.createHStretch(self.writebox)
self.writebt = self.atelier.createPushButton(self.writebox, _("&Write to device" ))
- #self.writebt.setStretchable(0,True)
self.writebt.setDisabled()
self.backupbox = self.atelier.createHBox(self.box)
- #self.backupbox.setWeight(1,10)
self.atelier.createLabel(self.backupbox,_("Backup to:"))
+ # add file picker for backup file name
self.backup_select=self.atelier.createPushButton(self.backupbox,_("Choose an image"))
self.backup_select.setStretchable(0,True)
self.backup_select.setDisabled()
self.atelier.createHStretch(self.backupbox)
self.backupbt = self.atelier.createPushButton(self.backupbox, _("&Backup the device" ))
- #self.backupbt.setStretchable(0,True)
self.backupbt.setDisabled()
self.formatbox = self.atelier.createHBox(self.box)
#self.formatbox.setWeight(1,10)
@@ -656,9 +652,11 @@ The fields of the main window are as follows:\n\
self.progressbox = self.atelier.createHBox(self.box)
self.progressbox.setWeight(1,10)
self.progress = self.atelier.createProgressBar(self.progressbox,"Progression",100)
+ self.progress.setStretchable(0,True)
self.reportbox = self.atelier.createHBox(self.box)
#self.reportbox.setWeight(1,10)
self.logview = self.atelier.createLogView(self.reportbox,"Report", 10)
+ self.logview.setStretchable(0,True)
#self.reportbox.setWeight(1,20)
self.buttonsbox = self.atelier.createHBox(self.box)
#self.buttonsbox.setWeight(1,10)
@@ -670,7 +668,6 @@ The fields of the main window are as follows:\n\
self.helpbt.setStretchable(0,True)
self.quitbt = self.atelier.createPushButton(self.buttonsbox, _("&Quit" ))
self.quitbt.setStretchable(0,True)
-
self.u = None
try:
self.u = UDisks2()
@@ -771,7 +768,7 @@ The fields of the main window are as follows:\n\
dlg = mgafactory.createDialogBox(yui.YMGAMessageBox.B_TWO)
dlg.setTitle("IsoDumper")
dlg.setText(_("Warning\nNo target devices were found.\nYou need to plug in a USB Key to which the image can be written."))
- dlg.setButtonLabel(_("Refresh"), yui.YMGAMessageBox.B_ONE)
+ dlg.setButtonLabel(_("&Refresh"), yui.YMGAMessageBox.B_ONE)
dlg.setButtonLabel(_("Cancel"), yui.YMGAMessageBox.B_TWO)
dlg.setMinSize(70, 8);
return dlg.show() == yui.YMGAMessageBox.B_ONE