mirror of
https://github.com/python/cpython.git
synced 2024-12-24 01:05:10 +08:00
added do_setwindowfont() menu callback: brings up a font selection dialog. (jvr)
This commit is contained in:
parent
c2dab4866e
commit
2a75909980
@ -360,11 +360,19 @@ class Application(FrameWork.Application):
|
||||
def getprefs(self):
|
||||
import MacPrefs
|
||||
return MacPrefs.GetPrefs(self.preffilepath)
|
||||
|
||||
|
||||
def do_editorprefs(self, *args):
|
||||
import PyEdit
|
||||
PyEdit.EditorDefaultSettings()
|
||||
|
||||
def do_setwindowfont(self, *args):
|
||||
import FontSettings, W
|
||||
prefs = self.getprefs()
|
||||
settings = FontSettings.FontDialog(prefs.defaultfont)
|
||||
if settings:
|
||||
prefs.defaultfont, tabsettings = settings
|
||||
raise W.AlertError, "Note that changes will only affect new windows!"
|
||||
|
||||
|
||||
|
||||
class MenuBar(FrameWork.MenuBar):
|
||||
|
Loading…
Reference in New Issue
Block a user