881 @return dictionary with name as key and display string as value |
881 @return dictionary with name as key and display string as value |
882 (dictionary of string) |
882 (dictionary of string) |
883 """ |
883 """ |
884 pluginDict = {} |
884 pluginDict = {} |
885 |
885 |
886 for name, module in \ |
886 for module in list(self.__onDemandActiveModules.values()) + \ |
887 list(self.__onDemandActiveModules.items()) + \ |
887 list(self.__onDemandInactiveModules.values()): |
888 list(self.__onDemandInactiveModules.items()): |
|
889 if getattr(module, "pluginType") == type_ and \ |
888 if getattr(module, "pluginType") == type_ and \ |
890 getattr(module, "error", "") == "": |
889 getattr(module, "error", "") == "": |
891 plugin_name = getattr(module, "pluginTypename") |
890 plugin_name = getattr(module, "pluginTypename") |
892 if hasattr(module, "displayString"): |
891 if hasattr(module, "displayString"): |
893 try: |
892 try: |
907 |
906 |
908 @param type_ type of the plugin (string) |
907 @param type_ type of the plugin (string) |
909 @param name name of the plugin type (string) |
908 @param name name of the plugin type (string) |
910 @return preview pixmap (QPixmap) |
909 @return preview pixmap (QPixmap) |
911 """ |
910 """ |
912 for modname, module in \ |
911 for module in list(self.__onDemandActiveModules.values()) + \ |
913 list(self.__onDemandActiveModules.items()) + \ |
912 list(self.__onDemandInactiveModules.values()): |
914 list(self.__onDemandInactiveModules.items()): |
|
915 if getattr(module, "pluginType") == type_ and \ |
913 if getattr(module, "pluginType") == type_ and \ |
916 getattr(module, "pluginTypename") == name: |
914 getattr(module, "pluginTypename") == name: |
917 if hasattr(module, "previewPix"): |
915 if hasattr(module, "previewPix"): |
918 return module.previewPix() |
916 return module.previewPix() |
919 else: |
917 else: |
1087 values. Each tuple contains the vcs name (string) and vcs display |
1085 values. Each tuple contains the vcs name (string) and vcs display |
1088 string (string). |
1086 string (string). |
1089 """ |
1087 """ |
1090 vcsDict = {} |
1088 vcsDict = {} |
1091 |
1089 |
1092 for name, module in \ |
1090 for module in list(self.__onDemandActiveModules.values()) + \ |
1093 list(self.__onDemandActiveModules.items()) + \ |
1091 list(self.__onDemandInactiveModules.values()): |
1094 list(self.__onDemandInactiveModules.items()): |
|
1095 if getattr(module, "pluginType") == "version_control": |
1092 if getattr(module, "pluginType") == "version_control": |
1096 if hasattr(module, "getVcsSystemIndicator"): |
1093 if hasattr(module, "getVcsSystemIndicator"): |
1097 res = module.getVcsSystemIndicator() |
1094 res = module.getVcsSystemIndicator() |
1098 for indicator, vcsData in list(res.items()): |
1095 for indicator, vcsData in list(res.items()): |
1099 if indicator in vcsDict: |
1096 if indicator in vcsDict: |
1348 Plugins supporting this functionality must support the module function |
1345 Plugins supporting this functionality must support the module function |
1349 clearPrivateData() and have the module level attribute pluginType. |
1346 clearPrivateData() and have the module level attribute pluginType. |
1350 |
1347 |
1351 @param type_ type of the plugin to clear private data for (string) |
1348 @param type_ type of the plugin to clear private data for (string) |
1352 """ |
1349 """ |
1353 for name, module in \ |
1350 for module in \ |
1354 list(self.__onDemandActiveModules.items()) + \ |
1351 list(self.__onDemandActiveModules.values()) + \ |
1355 list(self.__onDemandInactiveModules.items()) + \ |
1352 list(self.__onDemandInactiveModules.values()) + \ |
1356 list(self.__activeModules.items()) + \ |
1353 list(self.__activeModules.values()) + \ |
1357 list(self.__inactiveModules.items()): |
1354 list(self.__inactiveModules.values()): |
1358 if getattr(module, "pluginType", "") == type_: |
1355 if getattr(module, "pluginType", "") == type_: |
1359 if hasattr(module, "clearPrivateData"): |
1356 if hasattr(module, "clearPrivateData"): |
1360 module.clearPrivateData() |
1357 module.clearPrivateData() |
1361 |
1358 |
1362 # |
1359 # |