diff options
author | papoteur-mga <yves.brungard_git@gadz.org> | 2014-07-06 22:27:49 +0200 |
---|---|---|
committer | papoteur-mga <yves.brungard_git@gadz.org> | 2014-07-06 22:27:49 +0200 |
commit | 1ec61204f438b9d2266148a89a27e4b51ae1bedf (patch) | |
tree | 75ab51548c6f507714835e73eb5f7dad576b80a3 /lib/isodumper.py | |
parent | a25125632abccc16aa79f57cce1182b5f1841686 (diff) | |
download | isodumper-1ec61204f438b9d2266148a89a27e4b51ae1bedf.tar isodumper-1ec61204f438b9d2266148a89a27e4b51ae1bedf.tar.gz isodumper-1ec61204f438b9d2266148a89a27e4b51ae1bedf.tar.bz2 isodumper-1ec61204f438b9d2266148a89a27e4b51ae1bedf.tar.xz isodumper-1ec61204f438b9d2266148a89a27e4b51ae1bedf.zip |
Manage the window closing.
Deliver information in tooltips and logview
Diffstat (limited to 'lib/isodumper.py')
-rwxr-xr-x | lib/isodumper.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py index d2a4629..bec50ca 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -73,7 +73,7 @@ class IsoDumper: # get glade tree self.gladefile = "/usr/share/isodumper/isodumper.glade" - self.gladefile = "/documents/isodumper-dev/share/isodumper/isodumper.glade" + #self.gladefile = "/documents/isodumper-dev/share/isodumper/isodumper.glade" self.wTree = gtk.glade.XML(self.gladefile) # get globally needed widgets @@ -109,7 +109,8 @@ class IsoDumper: # set callbacks - dict = { "on_main_dialog_destroy" : self.close, + dict = { "on_main_dialog_destroy_event" : self.confirm_close, + "on_main_dialog_delete_event" : self.confirm_close, "on_cancel_button_clicked" : self.confirm_close, "on_emergency_button_clicked" : self.restore, "on_success_button_clicked" : self.close, @@ -177,8 +178,11 @@ class IsoDumper: # Add .iso if not specified if not exit_dialog.lower().endswith('.iso'): exit_dialog=exit_dialog+".iso" - self.backup_select.set_label(exit_dialog) + head, tail = os.path.split(exit_dialog) + self.backup_select.set_label(tail) self.backup_button.set_sensitive(True) + self.backup_select.set_tooltip_text(exit_dialog) + self.logger(_('Backup in: ')+ exit_dialog) expander = self.wTree.get_widget("detail_expander") expander.set_sensitive(True) self.choose.hide() @@ -285,6 +289,8 @@ class IsoDumper: combo.set_sensitive(False) format_button=self.wTree.get_widget("format_button") format_button.set_sensitive(False) + backup_select=self.wTree.get_widget("backup_select") + backup_select.set_sensitive(False) source = self.chooser.get_filename() target = self.dev.split('(')[1].split(')')[0] dialog = self.wTree.get_widget("confirm_dialog") @@ -427,7 +433,7 @@ class IsoDumper: dialog.hide() - def confirm_close(self, widget): + def confirm_close(self, widget, *args): if self.operation==False: # no writing , backup nor format running self.close('dummy') else: # writing , backup or format running @@ -437,8 +443,10 @@ class IsoDumper: self.close('dummy') else: dialog.hide() + return True def emergency(self): + self.operation=False self.final_unsensitive() dialog = self.wTree.get_widget("emergency_dialog") expander = self.wTree.get_widget("detail_expander") |