示例#1
0
 def search(self, event):
     query = self._searchbox.get_text()
     if not query:
         return True
     self._message.set_text('Loading...')
     self._spinner.show()
     self._spinner.start()
     gtk.gdk.window_process_all_updates()
     self._path = filebrowser_root()
     if not query in self._searched:
         self._history.set(self._history.append(), 0, query)
         self._searched.append(query)
     parser = FindInProjectParser(query, url2pathname(self._path)[7:], context=self._show_context.get_active(), regex=self._use_regex.get_active(), ignorecase=self._ignore_case.get_active(), filetype=self._extbox.get_text())
     self._browser.load_string(style_str + parser.html(), "text/html", "utf-8", "about:")
     self._message.set_text('%d line(s) matched in %d file(s)' % parser.status())
     self._spinner.stop()
     self._spinner.hide()
 def search(self, event):
     self._path = filebrowser_root()
     query = self._searchbox.get_text()
     self._history.set(self._history.append(), 0, query)
     html = FindInProjectParser(query, url2pathname(self._path)[7:]).html()
     self._browser.load_string(style_str + html, "text/html", "utf-8", "about:")