mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #27477: Convert IDLE search dialogs to using ttk widgets.
This commit is contained in:
parent
a748032653
commit
6f7b0f577e
6 changed files with 50 additions and 36 deletions
|
@ -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:])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue