998 Public method to deactivated all activated VCS plugins. |
998 Public method to deactivated all activated VCS plugins. |
999 """ |
999 """ |
1000 for name, module in list(self.__onDemandActiveModules.items()): |
1000 for name, module in list(self.__onDemandActiveModules.items()): |
1001 if getattr(module, "pluginType") == "version_control": |
1001 if getattr(module, "pluginType") == "version_control": |
1002 self.deactivatePlugin(name, True) |
1002 self.deactivatePlugin(name, True) |
1003 |
1003 |
|
1004 ######################################################################## |
|
1005 ## Methods creation of the plug-ins download directory |
|
1006 ######################################################################## |
|
1007 |
1004 def __checkPluginsDownloadDirectory(self): |
1008 def __checkPluginsDownloadDirectory(self): |
1005 """ |
1009 """ |
1006 Private slot to check for the existence of the plugins download |
1010 Private slot to check for the existence of the plugins download |
1007 directory. |
1011 directory. |
1008 """ |
1012 """ |
1048 Public method to check the availability of updates of plug-ins. |
1052 Public method to check the availability of updates of plug-ins. |
1049 """ |
1053 """ |
1050 period = Preferences.getPluginManager("UpdatesCheckInterval") |
1054 period = Preferences.getPluginManager("UpdatesCheckInterval") |
1051 if period == 0: |
1055 if period == 0: |
1052 return |
1056 return |
1053 elif period in [2, 3, 4]: |
1057 elif period in [1, 2, 3]: |
1054 lastModified = QFileInfo(self.pluginRepositoryFile).lastModified() |
1058 lastModified = QFileInfo(self.pluginRepositoryFile).lastModified() |
1055 if lastModified.isValid() and lastModified.date().isValid(): |
1059 if lastModified.isValid() and lastModified.date().isValid(): |
1056 lastModifiedDate = lastModified.date() |
1060 lastModifiedDate = lastModified.date() |
1057 now = QDate.currentDate() |
1061 now = QDate.currentDate() |
1058 if period == 2 and lastModifiedDate.day() == now.day(): |
1062 if period == 1 and lastModifiedDate.day() == now.day(): |
1059 # daily |
1063 # daily |
1060 return |
1064 return |
1061 elif period == 3 and lastModifiedDate.daysTo(now) < 7: |
1065 elif period == 2 and lastModifiedDate.daysTo(now) < 7: |
1062 # weekly |
1066 # weekly |
1063 return |
1067 return |
1064 elif period == 4 and lastModifiedDate.month() == now.month(): |
1068 elif period == 3 and \ |
|
1069 (lastModifiedDate.daysTo(now) < |
|
1070 lastModifiedDate.daysInMonth()): |
1065 # monthly |
1071 # monthly |
1066 return |
1072 return |
1067 |
1073 |
1068 self.__updateAvailable = False |
1074 self.__updateAvailable = False |
1069 |
1075 |
1143 @param author data for the author field (string) |
1149 @param author data for the author field (string) |
1144 @param version data for the version field (string) |
1150 @param version data for the version field (string) |
1145 @param filename data for the filename field (string) |
1151 @param filename data for the filename field (string) |
1146 @param status status of the plugin (string [stable, unstable, unknown]) |
1152 @param status status of the plugin (string [stable, unstable, unknown]) |
1147 """ |
1153 """ |
|
1154 # ignore hidden plug-ins |
|
1155 pluginName = os.path.splitext(url.rsplit("/", 1)[1])[0] |
|
1156 if pluginName in Preferences.getPluginManager("HiddenPlugins"): |
|
1157 return |
|
1158 |
1148 archive = os.path.join(Preferences.getPluginManager("DownloadPath"), |
1159 archive = os.path.join(Preferences.getPluginManager("DownloadPath"), |
1149 filename) |
1160 filename) |
1150 |
1161 |
1151 # Check against installed/loaded plug-ins |
1162 # Check against installed/loaded plug-ins |
1152 pluginName = os.path.splitext(url.rsplit("/", 1)[1])[0] |
|
1153 pluginDetails = self.getPluginDetails(pluginName) |
1163 pluginDetails = self.getPluginDetails(pluginName) |
1154 if pluginDetails is None: |
1164 if pluginDetails is None: |
1155 if not Preferences.getPluginManager("CheckInstalledOnly"): |
1165 if not Preferences.getPluginManager("CheckInstalledOnly"): |
1156 self.__updateAvailable = True |
1166 self.__updateAvailable = True |
1157 return |
1167 return |