edouard@3884: #!/usr/bin/env python edouard@3884: # -*- coding: utf-8 -*- edouard@3884: edouard@3884: # See COPYING file for copyrights details. edouard@3884: edouard@4038: from connectors.ERPC_URI import schemes_desc, per_scheme_model edouard@4038: from connectors.SchemeEditor import SchemeEditor edouard@4038: edouard@4038: ## Scheme list for the dialog's combobox edouard@4038: edouard@4038: Schemes = list(zip(*schemes_desc))[0] edouard@3884: edouard@3884: edouard@4038: ## Specialized SchemeEditor panel for ERPC edouard@3884: edouard@3884: class ERPC_dialog(SchemeEditor): edouard@3884: def __init__(self, scheme, *args, **kwargs): edouard@4038: self.model, self.EnableIDSelector, self.parser, self.builder = per_scheme_model[scheme] edouard@3884: edouard@3884: SchemeEditor.__init__(self, scheme, *args, **kwargs) edouard@3884: edouard@3884: def SetLoc(self, loc): edouard@4038: self.SetFields(self.parser(loc)) edouard@3884: edouard@3884: def GetLoc(self): edouard@4038: return self.builder(self.GetFields())