858 self.recentMenu.clear() |
858 self.recentMenu.clear() |
859 |
859 |
860 idx = 1 |
860 idx = 1 |
861 for rp in self.recent: |
861 for rp in self.recent: |
862 if idx < 10: |
862 if idx < 10: |
863 formatStr = '&%d. %s' |
863 formatStr = '&{0:d}. {1}' |
864 else: |
864 else: |
865 formatStr = '%d. %s' |
865 formatStr = '{0:d}. {1}' |
866 act = self.recentMenu.addAction(\ |
866 act = self.recentMenu.addAction(\ |
867 formatStr % (idx, |
867 formatStr.format(idx, |
868 Utilities.compactPath(rp, self.ui.maxMenuFilePathLen))) |
868 Utilities.compactPath(rp, self.ui.maxMenuFilePathLen))) |
869 act.setData(rp) |
869 act.setData(rp) |
870 act.setEnabled(QFileInfo(rp).exists()) |
870 act.setEnabled(QFileInfo(rp).exists()) |
871 idx += 1 |
871 idx += 1 |
872 |
872 |