Run update-copyright.py.
[hooke.git] / hooke / ui / gui / dialog / selection.py
index ff7fbb70b059558c26668b6bd4445efe339a0e42..5421e29968f938199a0d58c34ee635bf5b35a3f8 100644 (file)
@@ -1,21 +1,19 @@
-# Copyright (C) 2010 Massimo Sandal <devicerandom@gmail.com>
-#                    W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2010-2012 W. Trevor King <wking@drexel.edu>
 #
 # This file is part of Hooke.
 #
-# Hooke is free software: you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
+# Hooke is free software: you can redistribute it and/or modify it under the
+# terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
 #
-# Hooke is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
-# Public License for more details.
+# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+# details.
 #
-# You should have received a copy of the GNU Lesser General Public
-# License along with Hooke.  If not, see
-# <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with Hooke.  If not, see <http://www.gnu.org/licenses/>.
 
 """Selection dialog.
 """
@@ -49,6 +47,7 @@ class Selection (wx.Dialog):
             callbacks = {}
         self._callbacks = callbacks
         self._selection_style = selection_style
+        self.canceled = False
 
         self._c = {
             'text': wx.StaticText(
@@ -97,6 +96,7 @@ class Selection (wx.Dialog):
     def cancel(self, event):
         """Close the dialog.
         """
+        self.canceled = True
         self.EndModal(wx.ID_CANCEL)
 
     def button(self, event):