dialogs/BrowseLocationsDialog.py
changeset 1762 fcc406143e5b
parent 1749 d73b64672238
child 1766 c1e5b9f19483
equal deleted inserted replaced
1761:8c98bad90b8d 1762:fcc406143e5b
    28 import wx
    28 import wx
    29 
    29 
    30 from plcopen.structures import LOCATIONDATATYPES
    30 from plcopen.structures import LOCATIONDATATYPES
    31 from PLCControler import LOCATION_CONFNODE, LOCATION_MODULE, LOCATION_GROUP, LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT, LOCATION_VAR_MEMORY
    31 from PLCControler import LOCATION_CONFNODE, LOCATION_MODULE, LOCATION_GROUP, LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT, LOCATION_VAR_MEMORY
    32 from util.BitmapLibrary import GetBitmap
    32 from util.BitmapLibrary import GetBitmap
       
    33 from util.TranslationCatalogs import NoTranslate
    33 
    34 
    34 #-------------------------------------------------------------------------------
    35 #-------------------------------------------------------------------------------
    35 #                                   Helpers
    36 #                                   Helpers
    36 #-------------------------------------------------------------------------------
    37 #-------------------------------------------------------------------------------
    37 
    38 
    38 
    39 
    39 def GetDirFilterChoiceOptions():
    40 def GetDirFilterChoiceOptions():
    40     _ = lambda x: x
    41     _ = NoTranslate
    41     return [(_("All"), [LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT, LOCATION_VAR_MEMORY]),
    42     return [(_("All"), [LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT, LOCATION_VAR_MEMORY]),
    42             (_("Input"), [LOCATION_VAR_INPUT]),
    43             (_("Input"), [LOCATION_VAR_INPUT]),
    43             (_("Output"), [LOCATION_VAR_OUTPUT]),
    44             (_("Output"), [LOCATION_VAR_OUTPUT]),
    44             (_("Memory"), [LOCATION_VAR_MEMORY])]
    45             (_("Memory"), [LOCATION_VAR_MEMORY])]
    45 
    46 
    46 
    47 
    47 DIRFILTERCHOICE_OPTIONS = dict([(_(option), filter) for option, filter in GetDirFilterChoiceOptions()])
    48 DIRFILTERCHOICE_OPTIONS = dict([(_(option), filter) for option, filter in GetDirFilterChoiceOptions()])
    48 
    49 
    49 
    50 
    50 def GetTypeFilterChoiceOptions():
    51 def GetTypeFilterChoiceOptions():
    51     _ = lambda x: x
    52     _ = NoTranslate
    52     return [_("All"),
    53     return [_("All"),
    53             _("Type and derivated"),
    54             _("Type and derivated"),
    54             _("Type strict")]
    55             _("Type strict")]
    55 
    56 
    56 
    57