equal
deleted
inserted
replaced
22 # along with this program; if not, write to the Free Software |
22 # along with this program; if not, write to the Free Software |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 |
24 |
25 |
25 |
26 from __future__ import absolute_import |
26 from __future__ import absolute_import |
27 from types import TupleType |
|
28 |
27 |
29 import wx |
28 import wx |
30 import wx.lib.buttons |
29 import wx.lib.buttons |
31 import wx.lib.agw.customtreectrl as CT |
30 import wx.lib.agw.customtreectrl as CT |
32 |
31 |
322 self.GenerateSearchResultsTreeBranch(item, child) |
321 self.GenerateSearchResultsTreeBranch(item, child) |
323 item, root_cookie = self.SearchResultsTree.GetNextChild(root, root_cookie) |
322 item, root_cookie = self.SearchResultsTree.GetNextChild(root, root_cookie) |
324 |
323 |
325 def ShowSearchResults(self, item): |
324 def ShowSearchResults(self, item): |
326 data = self.SearchResultsTree.GetPyData(item) |
325 data = self.SearchResultsTree.GetPyData(item) |
327 if isinstance(data, TupleType): |
326 if isinstance(data, tuple): |
328 search_results = [data] |
327 search_results = [data] |
329 else: |
328 else: |
330 search_results = self.SearchResults.get(data, []) |
329 search_results = self.SearchResults.get(data, []) |
331 self.ParentWindow.ClearHighlights(SEARCH_RESULT_HIGHLIGHT) |
330 self.ParentWindow.ClearHighlights(SEARCH_RESULT_HIGHLIGHT) |
332 for infos, start, end, _text in search_results: |
331 for infos, start, end, _text in search_results: |