[Python-checkins] python/dist/src/Mac/IDE scripts/Widget demos ActivateWindowDemo.py, 1.1, 1.2 KeyTester.py, 1.2, 1.3 ListWindow.py, 1.1, 1.2 TwoLists.py, 1.1, 1.2 WidgetTest.py, 1.3, 1.4

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Sun Jul 18 07:58:40 CEST 2004


Update of /cvsroot/python/python/dist/src/Mac/IDE scripts/Widget demos
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29056/IDE scripts/Widget demos
Modified Files:
	ActivateWindowDemo.py KeyTester.py ListWindow.py TwoLists.py 
	WidgetTest.py 
Log Message:
Whitespace normalization, via reindent.py.
Index: KeyTester.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/IDE scripts/Widget demos/KeyTester.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** KeyTester.py	12 Feb 2004 17:35:13 -0000	1.2
--- KeyTester.py	18 Jul 2004 05:58:07 -0000	1.3
***************
*** 5,14 ****
 # key callback function
 def tester(char, event):
! 	text = "%r\r%d\r%s\r%s" % (char, ord(char), hex(ord(chart)), oct(ord(char)))
! 	window.keys.set(text)
 
 # close callback
 def close():
! 	window.close()
 
 # new window
--- 5,14 ----
 # key callback function
 def tester(char, event):
! text = "%r\r%d\r%s\r%s" % (char, ord(char), hex(ord(chart)), oct(ord(char)))
! window.keys.set(text)
 
 # close callback
 def close():
! window.close()
 
 # new window
Index: ListWindow.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/IDE scripts/Widget demos/ListWindow.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ListWindow.py	26 Sep 1999 12:24:57 -0000	1.1
--- ListWindow.py	18 Jul 2004 05:58:07 -0000	1.2
***************
*** 2,9 ****
 
 def listhit(isdbl):
! 	if isdbl:
! 		print "double-click in list!"
! 	else:
! 		print "click in list."
 
 window = W.Window((200, 400), "Window with List", minsize = (150, 200))
--- 2,9 ----
 
 def listhit(isdbl):
! if isdbl:
! print "double-click in list!"
! else:
! print "click in list."
 
 window = W.Window((200, 400), "Window with List", minsize = (150, 200))
Index: TwoLists.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/IDE scripts/Widget demos/TwoLists.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TwoLists.py	26 Sep 1999 12:24:57 -0000	1.1
--- TwoLists.py	18 Jul 2004 05:58:07 -0000	1.2
***************
*** 2,15 ****
 
 def twothird(width, height):
! 	return (8, 8, width - 8, 2*height/3 - 4)
 
 def onethird(width, height):
! 	return (8, 2*height/3 + 4, width - 8, height - 22)
 
 def halfbounds1(width, height):
! 	return (0, 0, width/2 - 4, height)
 
 def halfbounds2(width, height):
! 	return (width/2 + 4, 0, width, height)
 
 window = W.Window((400, 400), "Sizable window with two lists", minsize = (200, 200))
--- 2,15 ----
 
 def twothird(width, height):
! return (8, 8, width - 8, 2*height/3 - 4)
 
 def onethird(width, height):
! return (8, 2*height/3 + 4, width - 8, height - 22)
 
 def halfbounds1(width, height):
! return (0, 0, width/2 - 4, height)
 
 def halfbounds2(width, height):
! return (width/2 + 4, 0, width, height)
 
 window = W.Window((400, 400), "Sizable window with two lists", minsize = (200, 200))
Index: WidgetTest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/IDE scripts/Widget demos/WidgetTest.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WidgetTest.py	12 Feb 2004 17:35:13 -0000	1.3
--- WidgetTest.py	18 Jul 2004 05:58:07 -0000	1.4
***************
*** 3,34 ****
 # define some callbacks
 def callback():
! 	window.close()
 
 def checkcallback(value):
! 	print "hit the checkbox", value
 
 def radiocallback(value):
! 	print "hit radiobutton #3", value
 
 def scrollcallback(value):
! 	widget = window.hbar
! 	if value == "+":
! 		widget.set(widget.get() - 1)
! 	elif value == "-":
! 		widget.set(widget.get() + 1)
! 	elif value == "++":
! 		widget.set(widget.get() - 10)
! 	elif value == "--":
! 		widget.set(widget.get() + 10)
! 	else: # in thumb
! 		widget.set(value)
! 	print "scroll...", widget.get()
 
 def textcallback():
! 	window.et3.set(window.et1.get())
 
 def cancel():
! 	import EasyDialogs
! 	EasyDialogs.Message("Cancel!")
 
 # make a non-sizable window
--- 3,34 ----
 # define some callbacks
 def callback():
! window.close()
 
 def checkcallback(value):
! print "hit the checkbox", value
 
 def radiocallback(value):
! print "hit radiobutton #3", value
 
 def scrollcallback(value):
! widget = window.hbar
! if value == "+":
! widget.set(widget.get() - 1)
! elif value == "-":
! widget.set(widget.get() + 1)
! elif value == "++":
! widget.set(widget.get() - 10)
! elif value == "--":
! widget.set(widget.get() + 10)
! else: # in thumb
! widget.set(value)
! print "scroll...", widget.get()
 
 def textcallback():
! window.et3.set(window.et1.get())
 
 def cancel():
! import EasyDialogs
! EasyDialogs.Message("Cancel!")
 
 # make a non-sizable window
***************
*** 78,85 ****
 
 if 0:
! 	import time
! 	for i in range(20):
! 		window.et2.set(repr(i))
! 		#window.et2.SetPort()
! 		#window.et2.draw()
! 		time.sleep(0.1)
--- 78,85 ----
 
 if 0:
! import time
! for i in range(20):
! window.et2.set(repr(i))
! #window.et2.SetPort()
! #window.et2.draw()
! time.sleep(0.1)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /