Project/Project.py

branch
5_0_x
changeset 336
e48be003c73b
parent 332
37619c8d6f0f
child 337
22ae08988de7
equal deleted inserted replaced
334:dc0fc1180a1e 336:e48be003c73b
3871 def __syncRecent(self): 3871 def __syncRecent(self):
3872 """ 3872 """
3873 Private method to synchronize the list of recently opened projects 3873 Private method to synchronize the list of recently opened projects
3874 with the central store. 3874 with the central store.
3875 """ 3875 """
3876 if self.pfile in self.recent: 3876 for recent in self.recent[:]:
3877 self.recent.remove(self.pfile) 3877 if Utilities.samepath(self.pfile, recent):
3878 self.recent.remove(recent)
3878 self.recent.insert(0, self.pfile) 3879 self.recent.insert(0, self.pfile)
3879 maxRecent = Preferences.getProject("RecentNumber") 3880 maxRecent = Preferences.getProject("RecentNumber")
3880 if len(self.recent) > maxRecent: 3881 if len(self.recent) > maxRecent:
3881 self.recent = self.recent[:maxRecent] 3882 self.recent = self.recent[:maxRecent]
3882 self.__saveRecent() 3883 self.__saveRecent()
3917 3918
3918 def __clearRecent(self): 3919 def __clearRecent(self):
3919 """ 3920 """
3920 Private method to clear the recent projects menu. 3921 Private method to clear the recent projects menu.
3921 """ 3922 """
3922 self.recent.clear() 3923 self.recent = []
3923 3924
3924 def __searchNewFiles(self): 3925 def __searchNewFiles(self):
3925 """ 3926 """
3926 Private slot used to handle the search new files action. 3927 Private slot used to handle the search new files action.
3927 """ 3928 """

eric ide

mercurial