controls/VariablePanel.py
changeset 1760 ed2e2afb9573
parent 1758 845ca626db09
child 1762 fcc406143e5b
equal deleted inserted replaced
1759:56e7f4a11046 1760:ed2e2afb9573
    73 def GetFilterChoiceTransfer():
    73 def GetFilterChoiceTransfer():
    74     _ = lambda x: x
    74     _ = lambda x: x
    75     return {_("All"): _("All"), _("Interface"): _("Interface"),
    75     return {_("All"): _("All"), _("Interface"): _("Interface"),
    76             _("   Input"): _("Input"), _("   Output"): _("Output"), _("   InOut"): _("InOut"),
    76             _("   Input"): _("Input"), _("   Output"): _("Output"), _("   InOut"): _("InOut"),
    77             _("   External"): _("External"), _("Variables"): _("Variables"), _("   Local"): _("Local"),
    77             _("   External"): _("External"), _("Variables"): _("Variables"), _("   Local"): _("Local"),
    78             _("   Temp"): _("Temp"), _("Global"): _("Global")}  #, _("Access") : _("Access")}
    78             _("   Temp"): _("Temp"), _("Global"): _("Global")}  # , _("Access") : _("Access")}
    79 
    79 
    80 
    80 
    81 VARIABLE_CHOICES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().iterkeys()])
    81 VARIABLE_CHOICES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().iterkeys()])
    82 VARIABLE_CLASSES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().itervalues()])
    82 VARIABLE_CLASSES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().itervalues()])
    83 
    83 
   503         or element_type in ["program", "transition", "action"]:
   503         or element_type in ["program", "transition", "action"]:
   504             # this is an element that can have located variables
   504             # this is an element that can have located variables
   505             self.Table = VariableTable(self, [], GetVariableTableColnames(True))
   505             self.Table = VariableTable(self, [], GetVariableTableColnames(True))
   506 
   506 
   507             if element_type in ["config", "resource"]:
   507             if element_type in ["config", "resource"]:
   508                 self.FilterChoices = ["All", "Global"]  #,"Access"]
   508                 self.FilterChoices = ["All", "Global"]  # ,"Access"]
   509             else:
   509             else:
   510                 self.FilterChoices = ["All",
   510                 self.FilterChoices = ["All",
   511                                         "Interface", "   Input", "   Output", "   InOut", "   External",
   511                                         "Interface", "   Input", "   Output", "   InOut", "   External",
   512                                         "Variables", "   Local", "   Temp"]  #,"Access"]
   512                                         "Variables", "   Local", "   Temp"]  # ,"Access"]
   513 
   513 
   514             # these condense the ColAlignements list
   514             # these condense the ColAlignements list
   515             left = wx.ALIGN_LEFT
   515             left = wx.ALIGN_LEFT
   516             center = wx.ALIGN_CENTER
   516             center = wx.ALIGN_CENTER
   517 
   517