Beispiel #1
0
 def setCurrentFile(self, path):
     if path is None:
         return
     path = os.path.abspath(path)
     recentFiles = settings.recentFiles()
     if path in recentFiles:
         recentFiles.remove(path)
     recentFiles.insert(0, path)
     while len(recentFiles) > MAX_RECENT_FILES:
         del recentFiles[-1]
     settings.setRecentFiles(recentFiles)
Beispiel #2
0
 def setCurrentFile(self, path):
     if path is None:
         return
     path = os.path.abspath(path)
     recentFiles = settings.recentFiles()
     if path in recentFiles:
         recentFiles.remove(path)
     recentFiles.insert(0, path)
     while len(recentFiles) > MAX_RECENT_FILES:
         del recentFiles[-1]
     settings.setRecentFiles(recentFiles)
Beispiel #3
0
 def setCurrentFile(self, path):
     if path is None:
         return
     recentFiles = settings.recentFiles()
     if path in recentFiles:
         recentFiles.remove(path)
     recentFiles.insert(0, path)
     while len(recentFiles) > MAX_RECENT_FILES:
         del recentFiles[-1]
     settings.setRecentFiles(recentFiles)
     for window in QApplication.topLevelWidgets():
         if isinstance(window, FontWindow):
             window.updateRecentFiles()
Beispiel #4
0
 def clearRecentFiles(self):
     settings.setRecentFiles([])
Beispiel #5
0
 def clearRecentFiles(self):
     settings.setRecentFiles([])