summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/grep.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-07-11 00:21:31 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-07-11 00:21:31 (GMT)
commit6f7b0f577ea16df0b9bc3ee2a66fd668e83414eb (patch)
tree872fbd1843abbdbd257b310cf094d7c489e21ca2 /Lib/idlelib/grep.py
parenta748032653aec69596257f59f27d8e1945fece9d (diff)
downloadcpython-6f7b0f577ea16df0b9bc3ee2a66fd668e83414eb.zip
cpython-6f7b0f577ea16df0b9bc3ee2a66fd668e83414eb.tar.gz
cpython-6f7b0f577ea16df0b9bc3ee2a66fd668e83414eb.tar.bz2
Issue #27477: Convert IDLE search dialogs to using ttk widgets.
Diffstat (limited to 'Lib/idlelib/grep.py')
-rw-r--r--Lib/idlelib/grep.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/Lib/idlelib/grep.py b/Lib/idlelib/grep.py
index f1382c9..cfb0ea0 100644
--- a/Lib/idlelib/grep.py
+++ b/Lib/idlelib/grep.py
@@ -1,7 +1,8 @@
import os
import fnmatch
import sys
-from tkinter import StringVar, BooleanVar, Checkbutton # for GrepDialog
+from tkinter import StringVar, BooleanVar
+from tkinter.ttk import Checkbutton
from idlelib import searchengine
from idlelib.searchbase import SearchDialogBase
# Importing OutputWindow fails due to import loop
@@ -45,13 +46,10 @@ class GrepDialog(SearchDialogBase):
self.globent = self.make_entry("In files:", self.globvar)[0]
def create_other_buttons(self):
- f = self.make_frame()[0]
-
- btn = Checkbutton(f, anchor="w",
- variable=self.recvar,
+ btn = Checkbutton(
+ self.make_frame()[0], variable=self.recvar,
text="Recurse down subdirectories")
btn.pack(side="top", fill="both")
- btn.select()
def create_command_buttons(self):
SearchDialogBase.create_command_buttons(self)
@@ -130,7 +128,8 @@ class GrepDialog(SearchDialogBase):
def _grep_dialog(parent): # htest #
from idlelib.pyshell import PyShellFileList
- from tkinter import Toplevel, Text, Button, SEL, END
+ from tkinter import Toplevel, Text, SEL, END
+ from tkinter.ttk import Button
top = Toplevel(parent)
top.title("Test GrepDialog")
x, y = map(int, parent.geometry().split('+')[1:])