diff options
Diffstat (limited to 'Lib/idlelib/configDialog.py')
| -rw-r--r-- | Lib/idlelib/configDialog.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index efe5c43..72dd6b9 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -13,7 +13,6 @@ from tkinter import * import tkinter.messagebox as tkMessageBox import tkinter.colorchooser as tkColorChooser import tkinter.font as tkFont -import copy from idlelib.configHandler import idleConf from idlelib.dynOptionMenuWidget import DynOptionMenu @@ -25,14 +24,19 @@ from idlelib import macosxSupport class ConfigDialog(Toplevel): - def __init__(self,parent,title): + def __init__(self,parent,title,_htest=False): + """ + _htest - bool, change box location when running htest + """ Toplevel.__init__(self, parent) self.wm_withdraw() self.configure(borderwidth=5) self.title('IDLE Preferences') + if _htest: + parent.instance_dict = {} self.geometry("+%d+%d" % (parent.winfo_rootx()+20, - parent.winfo_rooty()+30)) + parent.winfo_rooty()+(30 if not _htest else 150))) #Theme Elements. Each theme element key is its display name. #The first value of the tuple is the sample area tag name. #The second value is the display name list sort index. @@ -74,7 +78,7 @@ class ConfigDialog(Toplevel): frameActionButtons = Frame(self,pady=2) #action buttons - if macosxSupport.runningAsOSXApp(): + if macosxSupport.isAquaTk(): # Surpress the padx and pady arguments when # running as IDLE.app, otherwise the text # on these buttons will not be readable. @@ -674,7 +678,7 @@ class ConfigDialog(Toplevel): if self.listBindings.curselection(): reselect=1 listIndex=self.listBindings.index(ANCHOR) - keySet=idleConf.GetKeySet(keySetName) + # keySet=idleConf.GetKeySet(keySetName) # unused, delete? bindNames = list(keySet.keys()) bindNames.sort() self.listBindings.delete(0,END) @@ -1140,9 +1144,5 @@ class ConfigDialog(Toplevel): pass if __name__ == '__main__': - #test the dialog - root=Tk() - Button(root,text='Dialog', - command=lambda:ConfigDialog(root,'Settings')).pack() - root.instance_dict={} - root.mainloop() + from idlelib.idle_test.htest import run + run(ConfigDialog) |
