ViewManager/ViewManager.py

branch
5_0_x
changeset 336
e48be003c73b
parent 253
3ccdf551bde7
child 365
0686ac00256e
child 516
1a57b04e3bd2
equal deleted inserted replaced
334:dc0fc1180a1e 336:e48be003c73b
3218 """ 3218 """
3219 Public slot to add a filename to the list of recently opened files. 3219 Public slot to add a filename to the list of recently opened files.
3220 3220
3221 @param fn name of the file to be added 3221 @param fn name of the file to be added
3222 """ 3222 """
3223 if fn in self.recent: 3223 for recent in self.recent[:]:
3224 self.recent.remove(fn) 3224 if Utilities.samepath(fn, recent):
3225 self.recent.remove(recent)
3225 self.recent.insert(0, fn) 3226 self.recent.insert(0, fn)
3226 maxRecent = Preferences.getUI("RecentNumber") 3227 maxRecent = Preferences.getUI("RecentNumber")
3227 if len(self.recent) > maxRecent: 3228 if len(self.recent) > maxRecent:
3228 self.recent = self.recent[:maxRecent] 3229 self.recent = self.recent[:maxRecent]
3229 self.__saveRecent() 3230 self.__saveRecent()

eric ide

mercurial