This is a bit safer, but I don't think the kill button is needed
because of the normal ways to exit being always accessible. A proper
cancel would be nicer.
Regards,
Edwrad
On 12 April 2010 06:47, <michael.bieri@xxxxxxxxxxxxx> wrote:
Author: michaelbieri
Date: Mon Apr 12 06:47:17 2010
New Revision: 11068
URL: http://svn.gna.org/viewcvs/relax?rev=11068&view=rev
Log:
Popup appears after pushing relaxGUI controller kill button to make sure
users would like to kill current session.
Modified:
branches/bieri_gui/gui_bieri/controller.py
Modified: branches/bieri_gui/gui_bieri/controller.py
URL:
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/controller.py?rev=11068&r1=11067&r2=11068&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/controller.py (original)
+++ branches/bieri_gui/gui_bieri/controller.py Mon Apr 12 06:47:17 2010
@@ -39,6 +39,7 @@
from gui_bieri.execution.calc_noe import make_noe
from gui_bieri.execution.calc_rx import make_rx
from gui_bieri.paths import IMAGE_PATH
+from message import question
class Controller(wx.Dialog):
@@ -118,7 +119,12 @@
@type event: wx event
"""
- sys.exit(0)
+ # Ask if the user is sure they would like to exit.
+ doexit = question('Are you sure you would like to kill your current
relax session? All unsaved data will be lost.', default=True)
+
+ # Kill session.
+ if doexit:
+ sys.exit(0)
# Terminate the event.
event.Skip()
_______________________________________________
relax (http://nmr-relax.com)
This is the relax-commits mailing list
relax-commits@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits
_______________________________________________
relax (http://nmr-relax.com)
This is the relax-devel mailing list
relax-devel@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel