Shortcut Alt-0 selects the 10th tab (index 9.)

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@250 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
leavengood 2010-03-01 04:31:07 +00:00 committed by Alexandre Deckner
parent e64e6d933a
commit 08d60e5886

View File

@ -253,9 +253,12 @@ BrowserWindow::BrowserWindow(BRect frame, const BMessenger& downloadListener,
AddShortcut('R', B_COMMAND_KEY, new BMessage(RELOAD));
// Add shortcuts to select a particular tab
for (int32 i = 1; i <= 9; i++) {
for (int32 i = 0; i <= 9; i++) {
BMessage *selectTab = new BMessage(SELECT_TAB);
selectTab->AddInt32("tab index", i - 1);
if (i == 0)
selectTab->AddInt32("tab index", 9);
else
selectTab->AddInt32("tab index", i - 1);
char numStr[2];
snprintf(numStr, sizeof(numStr), "%d", (int) i);
AddShortcut(numStr[0], B_COMMAND_KEY, selectTab);