summaryrefslogtreecommitdiffstats
path: root/Mac/IDE scripts/Widget demos/ActivateWindowDemo.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-07-18 06:16:08 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-07-18 06:16:08 (GMT)
commit182b5aca27d376b08a2904bed42b751496f932f3 (patch)
treedf13115820dbc879c0fe2eae488c9f8c0215a7da /Mac/IDE scripts/Widget demos/ActivateWindowDemo.py
parente6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff)
downloadcpython-182b5aca27d376b08a2904bed42b751496f932f3.zip
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz
cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Mac/IDE scripts/Widget demos/ActivateWindowDemo.py')
-rw-r--r--Mac/IDE scripts/Widget demos/ActivateWindowDemo.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/Mac/IDE scripts/Widget demos/ActivateWindowDemo.py b/Mac/IDE scripts/Widget demos/ActivateWindowDemo.py
index 3cd832b..d8fc946 100644
--- a/Mac/IDE scripts/Widget demos/ActivateWindowDemo.py
+++ b/Mac/IDE scripts/Widget demos/ActivateWindowDemo.py
@@ -4,18 +4,18 @@ import W
# evb 22 4 99
class ActivateDemo:
-
- def __init__(self):
- self.w = W.Window((200, 200), 'Activate demo')
- self.w.bind("<activate>", self.my_activate_callback)
- self.w.open()
-
- def my_activate_callback(self, onoff):
- '''the callback gets 1 parameter which indicates whether the window
- has been activated (1) or clicked to the back (0)'''
- if onoff == 1:
- print "I'm in the front now!"
- else:
- print "I've been clicked away, Oh No!"
+
+ def __init__(self):
+ self.w = W.Window((200, 200), 'Activate demo')
+ self.w.bind("<activate>", self.my_activate_callback)
+ self.w.open()
+
+ def my_activate_callback(self, onoff):
+ '''the callback gets 1 parameter which indicates whether the window
+ has been activated (1) or clicked to the back (0)'''
+ if onoff == 1:
+ print "I'm in the front now!"
+ else:
+ print "I've been clicked away, Oh No!"
ad = ActivateDemo()