PluginManager/PluginManager.py

branch
5_4_x
changeset 3199
564d4e8ae27a
parent 3171
2c37b9a37b2d
equal deleted inserted replaced
3198:8c9eb883b2a0 3199:564d4e8ae27a
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 lastModifiedDate.month() == now.month():
1065 # monthly 1069 # monthly
1066 return 1070 return
1067 1071
1068 self.__updateAvailable = False 1072 self.__updateAvailable = False
1069 1073

eric ide

mercurial