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() |