ViewManager/ViewManager.py

changeset 432
497e188ee86e
parent 372
237c3fe739f5
child 453
a81097a85889
--- a/ViewManager/ViewManager.py	Thu Jul 29 18:34:15 2010 +0200
+++ b/ViewManager/ViewManager.py	Thu Jul 29 20:00:59 2010 +0200
@@ -3609,11 +3609,11 @@
         idx = 1
         for rs in self.recent:
             if idx < 10:
-                formatStr = '&%d. %s'
+                formatStr = '&{0:d}. {1}'
             else:
-                formatStr = '%d. %s'
+                formatStr = '{0:d}. {1}'
             act = self.recentMenu.addAction(\
-                formatStr % (idx, 
+                formatStr.format(idx, 
                     Utilities.compactPath(rs, self.ui.maxMenuFilePathLen)))
             act.setData(rs)
             act.setEnabled(QFileInfo(rs).exists())
@@ -4366,9 +4366,9 @@
         for filename in sorted(filenames):
             editor = self.getOpenEditor(filename)
             for bookmark in editor.getBookmarks():
-                bmSuffix = " : %d" % bookmark
+                bmSuffix = " : {0:d}".format(bookmark)
                 act = self.bookmarksMenu.addAction(
-                    "%s%s" % (
+                    "{0}{1}".format(
                         Utilities.compactPath(
                             filename,
                             self.ui.maxMenuFilePathLen - len(bmSuffix)), 
@@ -4905,7 +4905,7 @@
         if self.activeWindow() is not None and \
            self.activeWindow().getFileName():
             ext = os.path.splitext(self.activeWindow().getFileName())[1]
-            rx = QRegExp(".*\*\.%s[ )].*" % ext[1:])
+            rx = QRegExp(".*\*\.{0}[ )].*".format(ext[1:]))
             filters = QScintilla.Lexers.getOpenFileFiltersList()
             index = -1
             for i in range(len(filters)):

eric ide

mercurial