Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a75909

Browse files
author
Just van Rossum
committed
added do_setwindowfont() menu callback: brings up a font selection dialog. (jvr)
1 parent c2dab48 commit 2a75909

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Mac/Tools/IDE/Wapplication.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,19 @@ def getscript(self, filename):
360360
def getprefs(self):
361361
import MacPrefs
362362
return MacPrefs.GetPrefs(self.preffilepath)
363-
363+
364364
def do_editorprefs(self, *args):
365365
import PyEdit
366366
PyEdit.EditorDefaultSettings()
367367

368+
def do_setwindowfont(self, *args):
369+
import FontSettings, W
370+
prefs = self.getprefs()
371+
settings = FontSettings.FontDialog(prefs.defaultfont)
372+
if settings:
373+
prefs.defaultfont, tabsettings = settings
374+
raise W.AlertError, "Note that changes will only affect new windows!"
375+
368376

369377

370378
class MenuBar(FrameWork.MenuBar):

0 commit comments

Comments
 (0)