[Python-checkins] CVS: python/dist/src/Tools/idle EditorWindow.py,1.29,1.30

Guido van Rossum guido@cnri.reston.va.us
Thu, 17 Feb 2000 11:14:19 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Tools/idle
In directory eric:/projects/python/develop/guido/src/Tools/idle

Modified Files:
	EditorWindow.py 
Log Message:
Add primitive customization of window size and font.
A few alternative selections can be made by changing "if 0" to "if 1".


Index: EditorWindow.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Tools/idle/EditorWindow.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** EditorWindow.py	2000/02/15 18:05:15	1.29
--- EditorWindow.py	2000/02/17 16:14:16	1.30
***************
*** 10,13 ****
--- 10,30 ----
  import WindowList
  
+ # Customization of default window size and font
+ # standard
+ WIDTH = 80
+ HEIGHT = 24
+ if sys.platform[:3] == 'win':
+     FONT = ("courier new", 10)
+ else:
+     FONT = ("courier", 10)
+ if 0:
+     # for demos (on Windows)
+     WIDTH = 70
+     HEIGHT = 16
+     FONT = ("lucida console", 14)
+ if 0:
+     # for Windows 98
+     FONT = ("lucida console", 8)
+ 
  # The default tab setting for a Text widget, in average-width characters.
  TK_TABWIDTH_DEFAULT = 8
***************
*** 110,113 ****
--- 127,131 ----
                                  highlightbackground=cprefs.CHilite[1],
                                  insertbackground=cprefs.CCursor[1],
+                                 width=WIDTH, height=HEIGHT,
                                  wrap="none")
  
***************
*** 139,145 ****
  
          text['yscrollcommand'] = vbar.set
!         if sys.platform[:3] == 'win':
!             text['font'] = ("lucida console", 8)
! #            text['font'] = ("courier new", 10)
          text_frame.pack(side=LEFT, fill=BOTH, expand=1)
          text.pack(side=TOP, fill=BOTH, expand=1)
--- 157,161 ----
  
          text['yscrollcommand'] = vbar.set
!         text['font'] = FONT
          text_frame.pack(side=LEFT, fill=BOTH, expand=1)
          text.pack(side=TOP, fill=BOTH, expand=1)