Skip to content
Snippets Groups Projects
Commit 83a5805c authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

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

parent 274f8742
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment