]> granicus.if.org Git - python/commitdiff
added do_setwindowfont() menu callback: brings up a font selection dialog. (jvr)
authorJust van Rossum <just@lettererror.com>
Sun, 26 Sep 1999 12:18:19 +0000 (12:18 +0000)
committerJust van Rossum <just@lettererror.com>
Sun, 26 Sep 1999 12:18:19 +0000 (12:18 +0000)
Mac/Tools/IDE/Wapplication.py

index 3cfeb5621401098bfbf7eb1c2e1a69eac9139e93..ed639fa0cb0ec86481f9503e0bcde97a36badf4e 100644 (file)
@@ -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):