Exemplo n.º 1
0
 def open(self, text, searchphrase, io = None):
     SearchDialogBase.open(self, text, searchphrase)
     if io:
         path = io.filename or ''
     else:
         path = ''
     dir, base = os.path.split(path)
     head, tail = os.path.splitext(base)
     if not tail:
         tail = '.py'
     self.globvar.set(os.path.join(dir, '*' + tail))
Exemplo n.º 2
0
 def open(self, text, searchphrase, io=None):
     SearchDialogBase.open(self, text, searchphrase)
     if io:
         path = io.filename or ""
     else:
         path = ""
     dir, base = os.path.split(path)
     head, tail = os.path.splitext(base)
     if not tail:
         tail = ".py"
     self.globvar.set(os.path.join(dir, "*" + tail))
Exemplo n.º 3
0
 def open(self, text):
     SearchDialogBase.open(self, text)
     try:
         first = text.index("sel.first")
     except TclError:
         first = None
     try:
         last = text.index("sel.last")
     except TclError:
         last = None
     first = first or text.index("insert")
     last = last or first
     self.show_hit(first, last)
     self.ok = 1
Exemplo n.º 4
0
 def create_widgets(self):
     f = SearchDialogBase.create_widgets(self)
     self.make_button("Find", self.default_command, 1)
Exemplo n.º 5
0
 def create_widgets(self):
     f = SearchDialogBase.create_widgets(self)
     self.make_button('Find Next', self.default_command, 1)
Exemplo n.º 6
0
 def create_entries(self):
     """Create label and text entry widgets"""
     SearchDialogBase.create_entries(self)
     self.replent = self.make_entry("Replace with:", self.replvar)[0]
Exemplo n.º 7
0
 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 All", self.replace_all)
Exemplo n.º 8
0
 def close(self, event=None):
     SearchDialogBase.close(self, event)
     self.text.tag_remove("hit", "1.0", "end")
Exemplo n.º 9
0
 def __init__(self, root, engine):
     SearchDialogBase.__init__(self, root, engine)
     self.replvar = StringVar(root)
Exemplo n.º 10
0
 def create_entries(self):
     SearchDialogBase.create_entries(self)
     self.globent = self.make_entry("In files:", self.globvar)
Exemplo n.º 11
0
 def __init__(self, root, engine):
     SearchDialogBase.__init__(self, root, engine)
     self.replvar = StringVar(root)
 def create_entries(self):
     SearchDialogBase.create_entries(self)
     self.globent = self.make_entry("In files:", self.globvar)[0]
Exemplo n.º 13
0
 def close(self, event = None):
     SearchDialogBase.close(self, event)
     self.text.tag_remove('hit', '1.0', 'end')
 def __init__(self, root, engine, flist):
     SearchDialogBase.__init__(self, root, engine)
     self.flist = flist
     self.globvar = StringVar(root)
     self.recvar = BooleanVar(root)
Exemplo n.º 15
0
 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 All', self.replace_all)
Exemplo n.º 16
0
 def create_entries(self):
     SearchDialogBase.create_entries(self)
     self.replent = self.make_entry('Replace with:', self.replvar)
Exemplo n.º 17
0
 def __init__(self, root, engine, flist):
     SearchDialogBase.__init__(self, root, engine)
     self.flist = flist
     self.globvar = StringVar(root)
     self.recvar = BooleanVar(root)
Exemplo n.º 18
0
 def create_command_buttons(self):
     SearchDialogBase.create_command_buttons(self)
     self.make_button('Search Files', self.default_command, 1)
Exemplo n.º 19
0
 def create_entries(self):
     SearchDialogBase.create_entries(self)
     self.replent = self.make_entry("Replace with:", self.replvar)
Exemplo n.º 20
0
 def close(self, event=None):
     SearchDialogBase.close(self, event)
     self.text.tag_remove('hit', '1.0', 'end')
Exemplo n.º 21
0
 def create_command_buttons(self):
     SearchDialogBase.create_command_buttons(self)
     self.make_button("Search Files", self.default_command, 1)
Exemplo n.º 22
0
 def close(self, event=None):
     SearchDialogBase.close(self, event)
     self.text.tag_remove("hit", "1.0", "end")