33 from graphics.GraphicCommons import REFRESH_HIGHLIGHT_PERIOD |
33 from graphics.GraphicCommons import REFRESH_HIGHLIGHT_PERIOD |
34 from controls import CustomEditableListBox, CustomGrid, CustomTable |
34 from controls import CustomEditableListBox, CustomGrid, CustomTable |
35 from dialogs import ArrayTypeDialog |
35 from dialogs import ArrayTypeDialog |
36 from EditorPanel import EditorPanel |
36 from EditorPanel import EditorPanel |
37 from util.BitmapLibrary import GetBitmap |
37 from util.BitmapLibrary import GetBitmap |
|
38 from util.TranslationCatalogs import NoTranslate |
38 |
39 |
39 #------------------------------------------------------------------------------- |
40 #------------------------------------------------------------------------------- |
40 # Helpers |
41 # Helpers |
41 #------------------------------------------------------------------------------- |
42 #------------------------------------------------------------------------------- |
42 |
43 |
46 def AppendMenu(parent, help, id, kind, text): |
47 def AppendMenu(parent, help, id, kind, text): |
47 parent.Append(help=help, id=id, kind=kind, text=text) |
48 parent.Append(help=help, id=id, kind=kind, text=text) |
48 |
49 |
49 |
50 |
50 def GetElementsTableColnames(): |
51 def GetElementsTableColnames(): |
51 _ = lambda x: x |
52 _ = NoTranslate |
52 return ["#", _("Name"), _("Type"), _("Initial Value")] |
53 return ["#", _("Name"), _("Type"), _("Initial Value")] |
53 |
54 |
54 |
55 |
55 def GetDatatypeTypes(): |
56 def GetDatatypeTypes(): |
56 _ = lambda x: x |
57 _ = NoTranslate |
57 return [_("Directly"), _("Subrange"), _("Enumerated"), _("Array"), _("Structure")] |
58 return [_("Directly"), _("Subrange"), _("Enumerated"), _("Array"), _("Structure")] |
58 |
59 |
59 |
60 |
60 DATATYPE_TYPES_DICT = dict([(_(datatype), datatype) for datatype in GetDatatypeTypes()]) |
61 DATATYPE_TYPES_DICT = dict([(_(datatype), datatype) for datatype in GetDatatypeTypes()]) |
61 |
62 |