diff -r fe0fddd6fd21 Lib/idlelib/GrepDialog.py --- a/Lib/idlelib/GrepDialog.py Sun Jan 18 11:17:39 2015 +0200 +++ b/Lib/idlelib/GrepDialog.py Sun Jan 18 20:38:52 2015 +1100 @@ -21,7 +21,7 @@ class GrepDialog(SearchDialogBase): - title = "Find in Files Dialog" + title = "Find in Files" icon = "Grep" needwrapbutton = 0 diff -r fe0fddd6fd21 Lib/idlelib/ReplaceDialog.py --- a/Lib/idlelib/ReplaceDialog.py Sun Jan 18 11:17:39 2015 +0200 +++ b/Lib/idlelib/ReplaceDialog.py Sun Jan 18 20:38:52 2015 +1100 @@ -16,7 +16,7 @@ class ReplaceDialog(SearchDialogBase): - title = "Replace Dialog" + title = "Replace" icon = "Replace" def __init__(self, root, engine): @@ -45,17 +45,12 @@ def create_command_buttons(self): SearchDialogBase.create_command_buttons(self) self.make_button("Find", self.find_it) - self.make_button("Replace", self.replace_it) - self.make_button("Replace+Find", self.default_command, 1) + self.make_button("Replace", self.default_command, 1) self.make_button("Replace All", self.replace_all) def find_it(self, event=None): self.do_find(0) - def replace_it(self, event=None): - if self.do_find(self.ok): - self.do_replace() - def default_command(self, event=None): if self.do_find(self.ok): if self.do_replace(): # Only find next match if replace succeeded. diff -r fe0fddd6fd21 Lib/idlelib/SearchDialogBase.py --- a/Lib/idlelib/SearchDialogBase.py Sun Jan 18 11:17:39 2015 +0200 +++ b/Lib/idlelib/SearchDialogBase.py Sun Jan 18 20:38:52 2015 +1100 @@ -24,7 +24,7 @@ add widgets. ''' - title = "Search Dialog" # replace in subclasses + title = "Find" # replace in subclasses icon = "Search" needwrapbutton = 1 # not in Find in Files @@ -81,8 +81,8 @@ self.top = top self.row = 0 - self.top.grid_columnconfigure(0, pad=2, weight=0) - self.top.grid_columnconfigure(1, pad=2, minsize=100, weight=100) + self.top.grid_columnconfigure(0, pad=4, weight=0) + self.top.grid_columnconfigure(1, pad=4, minsize=100, weight=100) self.create_entries() # row 0 (and maybe 1), cols 0, 1 self.create_option_buttons() # next row, cols 0, 1 @@ -96,10 +96,10 @@ label - Label widget, returned for testing. ''' label = Label(self.top, text=label_text) - label.grid(row=self.row, column=0, sticky="nw") + label.grid(row=self.row, column=0, sticky="ne") entry = Entry(self.top, textvariable=var, exportselection=0) - entry.grid(row=self.row, column=1, sticky="nwe") - self.row = self.row + 1 + entry.grid(row=self.row, column=1, columnspan=2, padx=4, pady=4, sticky="nwe") + self.row += 1 return entry, label def create_entries(self): @@ -114,7 +114,7 @@ ''' if labeltext: label = Label(self.top, text=labeltext) - label.grid(row=self.row, column=0, sticky="nw") + label.grid(row=self.row, column=0, sticky="ne") else: label = '' frame = Frame(self.top) @@ -129,9 +129,9 @@ A gridded frame from make_frame is filled with a Checkbutton for each pair, bound to the var, with the corresponding label. ''' - frame = self.make_frame("Options")[0] + frame = self.make_frame("Options:")[0] engine = self.engine - options = [(engine.revar, "Regular expression"), + options = [(engine.revar, "Regex"), (engine.casevar, "Match case"), (engine.wordvar, "Whole word")] if self.needwrapbutton: @@ -149,7 +149,7 @@ Others is a list of value, label pairs. A gridded frame from make_frame is filled with radio buttons. ''' - frame = self.make_frame("Direction")[0] + frame = self.make_frame("Direction:")[0] var = self.engine.backvar others = [(1, 'Up'), (0, 'Down')] for val, label in others: @@ -173,10 +173,8 @@ def create_command_buttons(self): "Place buttons in vertical command frame gridded on right." f = self.buttonframe = Frame(self.top) - f.grid(row=0,column=2,padx=2,pady=2,ipadx=2,ipady=2) + f.grid(row=2, column=2, padx=4, pady=4) - b = self.make_button("close", self.close) - b.lower() if __name__ == '__main__': import unittest