diff options
| author | Terry Jan Reedy <tjreedy@udel.edu> | 2014-05-29 05:46:16 (GMT) |
|---|---|---|
| committer | Terry Jan Reedy <tjreedy@udel.edu> | 2014-05-29 05:46:16 (GMT) |
| commit | 76916e8404923b1c81217bfeb71df8d7f4f772c8 (patch) | |
| tree | 383579ea1cce3343017dc45dafb81c9f591ea774 /Lib/idlelib/configDialog.py | |
| parent | edb6428e43a1d5ccd0cbb9554182ed91afb0b60f (diff) | |
| download | cpython-76916e8404923b1c81217bfeb71df8d7f4f772c8.zip cpython-76916e8404923b1c81217bfeb71df8d7f4f772c8.tar.gz cpython-76916e8404923b1c81217bfeb71df8d7f4f772c8.tar.bz2 | |
Issue #21477: Add htests for GrepDialog, UndoDelegator, and configDialog.
Put instructions in a fixed size scrollable Text. Patch by Saimadhav Heblikar.
Diffstat (limited to 'Lib/idlelib/configDialog.py')
| -rw-r--r-- | Lib/idlelib/configDialog.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index ace749b7..56c1bb8 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -23,14 +23,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. @@ -1151,9 +1156,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) |
