]> granicus.if.org Git - python/commitdiff
Issue #15853: Prevent IDLE crash on OS X when opening Preferences menu
authorNed Deily <nad@acm.org>
Mon, 22 Oct 2012 22:13:01 +0000 (15:13 -0700)
committerNed Deily <nad@acm.org>
Mon, 22 Oct 2012 22:13:01 +0000 (15:13 -0700)
with certain versions of Tk 8.5.  Initial patch by Kevin Walzer.

Lib/idlelib/NEWS.txt
Lib/idlelib/configDialog.py

index 818ff14f62a5c15c9508b49e7c018450af61edcb..080f98e0f3b232f0046a47554521ed962b116e52 100644 (file)
@@ -15,6 +15,9 @@ What's New in IDLE 2.7.4?
 - Issue #14018: Update checks for unstable system Tcl/Tk versions on OS X
   to include versions shipped with OS X 10.7 and 10.8 in addition to 10.6.
 
+- Issue #15853: Prevent IDLE crash on OS X when opening Preferences menu
+  with certain versions of Tk 8.5.  Initial patch by Kevin Walzer.
+
 
 What's New in IDLE 2.7.3?
 =========================
index 11aac9ebcf0d18a7eeebe90d603f2701a59dbbb3..9884d5e5a2e0fc930e528516f952db009c71c165 100644 (file)
@@ -832,10 +832,9 @@ class ConfigDialog(Toplevel):
             fontWeight=tkFont.BOLD
         else:
             fontWeight=tkFont.NORMAL
-        size=self.fontSize.get()
-        self.editFont.config(size=size,
-                weight=fontWeight,family=fontName)
-        self.textHighlightSample.configure(font=(fontName, size, fontWeight))
+        newFont = (fontName, self.fontSize.get(), fontWeight)
+        self.labelFontSample.config(font=newFont)
+        self.textHighlightSample.configure(font=newFont)
 
     def SetHighlightTarget(self):
         if self.highlightTarget.get()=='Cursor': #bg not possible