equal
deleted
inserted
replaced
21 # You should have received a copy of the GNU General Public License |
21 # You should have received a copy of the GNU General Public License |
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 |
27 from __future__ import division |
27 |
28 import re |
28 import re |
29 from builtins import str as text |
29 from builtins import str as text |
30 |
30 |
31 import wx |
31 import wx |
32 import wx.grid |
32 import wx.grid |
44 from util.TranslationCatalogs import NoTranslate |
44 from util.TranslationCatalogs import NoTranslate |
45 from graphics.GraphicCommons import ERROR_HIGHLIGHT, SEARCH_RESULT_HIGHLIGHT, REFRESH_HIGHLIGHT_PERIOD |
45 from graphics.GraphicCommons import ERROR_HIGHLIGHT, SEARCH_RESULT_HIGHLIGHT, REFRESH_HIGHLIGHT_PERIOD |
46 |
46 |
47 |
47 |
48 [STC_CODE_ERROR, STC_CODE_SEARCH_RESULT, |
48 [STC_CODE_ERROR, STC_CODE_SEARCH_RESULT, |
49 STC_CODE_SECTION] = range(15, 18) |
49 STC_CODE_SECTION] = list(range(15, 18)) |
50 |
50 |
51 HIGHLIGHT_TYPES = { |
51 HIGHLIGHT_TYPES = { |
52 ERROR_HIGHLIGHT: STC_CODE_ERROR, |
52 ERROR_HIGHLIGHT: STC_CODE_ERROR, |
53 SEARCH_RESULT_HIGHLIGHT: STC_CODE_SEARCH_RESULT, |
53 SEARCH_RESULT_HIGHLIGHT: STC_CODE_SEARCH_RESULT, |
54 } |
54 } |
283 self.ShowHighlights() |
283 self.ShowHighlights() |
284 |
284 |
285 def RefreshSectionStyling(self): |
285 def RefreshSectionStyling(self): |
286 self.Colourise(0, -1) |
286 self.Colourise(0, -1) |
287 |
287 |
288 for line in xrange(self.GetLineCount()): |
288 for line in range(self.GetLineCount()): |
289 self.SetLineState(line, 0) |
289 self.SetLineState(line, 0) |
290 |
290 |
291 doc_end_pos = self.GetLength() |
291 doc_end_pos = self.GetLength() |
292 for section in self.Controler.SECTIONS_NAMES: |
292 for section in self.Controler.SECTIONS_NAMES: |
293 section_comments = self.SectionsComments[section] |
293 section_comments = self.SectionsComments[section] |
625 def __init__(self, *args, **kwargs): |
625 def __init__(self, *args, **kwargs): |
626 my_columns = kwargs.pop("additional_columns") |
626 my_columns = kwargs.pop("additional_columns") |
627 super(VariablesTable, self).__init__(*args, **kwargs) |
627 super(VariablesTable, self).__init__(*args, **kwargs) |
628 self.columnTypes = dict(self.__defaultColumnType) |
628 self.columnTypes = dict(self.__defaultColumnType) |
629 if my_columns is not None: |
629 if my_columns is not None: |
630 for key in my_columns.keys(): |
630 for key in list(my_columns.keys()): |
631 if key in self.columnTypes.keys(): |
631 if key in list(self.columnTypes.keys()): |
632 self.columnTypes[key] = my_columns[key] |
632 self.columnTypes[key] = my_columns[key] |
633 |
633 |
634 def GetValue(self, row, col): |
634 def GetValue(self, row, col): |
635 if row < self.GetNumberRows(): |
635 if row < self.GetNumberRows(): |
636 if col == 0: |
636 if col == 0: |