Example #1
0
    def on_entry_changed(self, entry):

        txt = entry.get_text()

        is_sensitive = txt != ""
        if self.find_forward is None:
            self.forward_button.set_sensitive(is_sensitive)
            self.backward_button.set_sensitive(is_sensitive)
        else:
            self.find_forward.set_sensitive(is_sensitive)
            self.find_backward.set_sensitive(is_sensitive)

        if txt != escape_text(txt):
            # Escaped text is different from provided text, which means
            # the user inserted a \n or a \t, update the text and try again
            entry.set_text(escape_text(txt))
            return

        # XXX: the only reason this is here is because the action group
        # XXX: is set when the buffer is None, when the action group is set
        # XXX: it calls on_entry_changed
        try:
            search = self.search
            search.set_text(unescape_text(txt))
        except AttributeError:
            pass
Example #2
0
    def on_entry_changed(self, entry):

        txt = entry.get_text()
        
        is_sensitive = txt != ""
        if self.find_forward is None:
            self.forward_button.set_sensitive(is_sensitive)
            self.backward_button.set_sensitive(is_sensitive)
        else:
            self.find_forward.set_sensitive(is_sensitive)
            self.find_backward.set_sensitive(is_sensitive)
        
        if txt != escape_text(txt):
            # Escaped text is different from provided text, which means
            # the user inserted a \n or a \t, update the text and try again
            entry.set_text(escape_text(txt))
            return
        
        # XXX: the only reason this is here is because the action group
        # XXX: is set when the buffer is None, when the action group is set
        # XXX: it calls on_entry_changed
        try:
            search = self.search
            search.set_text(unescape_text(txt))
        except AttributeError:
            pass
Example #3
0
    def on_entry_changed(self, entry):
        txt = entry.get_text()
        if txt != escape_text(txt):
            # Escaped text is different from provided text, which means
            # the user inserted a \n or a \t, update the text and try again
            entry.set_text(escape_text(txt))
            return

        is_sensitive = txt != ""
        self.find_forward.set_sensitive(is_sensitive)
        self.find_backwards.set_sensitive(is_sensitive)
        self.buffer.search_text = unescape_text(txt)
Example #4
0
 def on_entry_changed(self, entry):
     self.buffer.replace_text = unescape_text(entry.get_text())
Example #5
0
 def on_entry_changed(self, entry):
     self.replace.set_text(unescape_text(entry.get_text()))
Example #6
0
 def on_entry_changed(self, entry):
     self.replace.set_text(unescape_text(entry.get_text()))