(self, widget)
Trap and re-emit the clicked signal
Trap and re-emit the clicked signal
Trap and re - emit the clicked signal
def do_search(self, widget):
        """Trap and re-emit the clicked signal"""
        dbg('entered do_search')
        searchtext = self.entry.get_text()
        dbg('searchtext: %s' % searchtext)
        if searchtext == '':
            return

        self.searchre = None
        if regex.FLAGS_PCRE2:
            try:
                self.searchre = Vte.Regex.new_for_search(searchtext, len(searchtext), self.regex_flags_pcre2)
                dbg('search RE: %s' % self.searchre)
                self.vte.search_set_regex(self.searchre, 0)
            except GLib.Error:
                # happens when PCRE2 support is not builtin (Ubuntu < 19.10)
                pass

        if not self.searchre:
            # fall back to old GLib regex
            self.searchre = GLib.Regex(searchtext, self.regex_flags_glib, 0)
            dbg('search RE: %s' % self.searchre)
            self.vte.search_set_gregex(self.searchre, 0)

        self.next.set_sensitive(True)
        self.prev.set_sensitive(True)
        # switch search direction based on the inversion checkbox
        if not self.search_is_inverted:
            self.next_search(None)
        else:
            self.prev_search(None)
def do_search ( self , widget ) : dbg ( 'entered do_search' ) searchtext = self . entry . get_text ( ) dbg ( 'searchtext: %s' % searchtext ) if searchtext == '' : return self . searchre = None if regex . FLAGS_PCRE2 : try : self . searchre = Vte . Regex . new_for_search ( searchtext , len ( searchtext ) , self . regex_flags_pcre2 ) dbg ( 'search RE: %s' % self . searchre ) self . vte . search_set_regex ( self . searchre , 0 ) except GLib . Error : # happens when PCRE2 support is not builtin (Ubuntu < 19.10) pass if not self . searchre : # fall back to old GLib regex self . searchre = GLib . Regex ( searchtext , self . regex_flags_glib , 0 ) dbg ( 'search RE: %s' % self . searchre ) self . vte . search_set_gregex ( self . searchre , 0 ) self . next . set_sensitive ( True ) self . prev . set_sensitive ( True ) # switch search direction based on the inversion checkbox if not self . search_is_inverted : self . next_search ( None ) else : self . prev_search ( None )