Matthew Smith avatar Matthew Smith committed fa3a364

Uses 0 rather than 1 for hotkey for recent file 10

catkin.cc, SysTrayIcon.cc - In the recent file menu, for entry 9 (which shows as 10), uses 0 rather than 1 for its hotkey (to make sure 1 is reserved for the first entry)

Comments (0)

Files changed (2)

       t = recentFiles.value( j ).title.section( ' ', 0, 5 );
       if( t != recentFiles.value( j ).title )
 	t.append( tr( " ..." ) );
-      text = tr( "&%1 %2" )
-	.arg( j + 1 )
+      if( j == 9 )
+         text = tr( "1&0 %1" )
 	.arg( recentFiles.value( j ).title.isEmpty() ?
 	      recentFiles.value( j ).filename.section( "/", -1, -1 ) : t );
+      else
+        text = tr( "&%1 %2" )
+	  .arg( j + 1 )
+	  .arg( recentFiles.value( j ).title.isEmpty() ?
+	        recentFiles.value( j ).filename.section( "/", -1, -1 ) : t );
       recentFileActions[j]->setText( text );
       recentFileActions[j]->setData( recentFiles.value( j ).filename );
       recentFileActions[j]->setVisible( true );
       t = recentFiles.value( j ).title.section( ' ', 0, 5 );
       if( t != recentFiles.value( j ).title )
 	t.append( tr( " ..." ) );
-      text = tr( "&%1 %2" )
-	.arg( j + 1 )
-	.arg( recentFiles.value( j ).title.isEmpty() ?
+      if( j == 9 )
+        text = tr( "1&0 %1" )
+ 	.arg( recentFiles.value( j ).title.isEmpty() ?
 	      recentFiles.value( j ).filename.section( "/", -1, -1 ) : t );
+      else
+        text  = tr("&%1 %2" )
+	  .arg( j + 1 )
+	  .arg( recentFiles.value( j ).title.isEmpty() ?
+	        recentFiles.value( j ).filename.section( "/", -1, -1 ) : t );
       recentFileActions[j]->setText( text );
       recentFileActions[j]->setData( recentFiles.value( j ).filename );
       recentFileActions[j]->setVisible( true );
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.