[elghinn] ask confirmation when we close the ad hoc window in the middle of a command

This commit is contained in:
Yann Leboulanger 2007-06-03 13:54:13 +00:00
parent 274f8742bb
commit 83a5805c97
1 changed files with 3 additions and 1 deletions

View File

@ -53,6 +53,7 @@ class CommandWindow:
# retrieving widgets from xml
self.xml = gtkgui_helpers.get_glade('adhoc_commands_window.glade')
self.window = self.xml.get_widget('adhoc_commands_window')
self.window.connect('delete-event', self.on_adhoc_commands_window_delete_event)
for name in ('back_button', 'forward_button',
'execute_button','close_button','stages_notebook',
'retrieving_commands_stage_vbox',
@ -101,7 +102,7 @@ class CommandWindow:
self.remove_pulsing()
def on_adhoc_commands_window_delete_event(self, *anything):
return self.stage_adhoc_commands_window_delete_event(self, *anything)
return self.stage_adhoc_commands_window_delete_event(self.window)
def __del__(self):
print "Object has been deleted."
@ -252,6 +253,7 @@ class CommandWindow:
else:
self.window.destroy()
return False
return True
def stage3_back_button_clicked(self, widget):
self.stage3_submit_form('prev')