fix missed selectors and problem where loading tabs in background would

mess up jumpback (bugs 342538 and 342526)
This commit is contained in:
pinkerton%aol.net 2006-06-23 17:27:04 +00:00
Родитель 16dbdb6ab1
Коммит 8cdcc3bcda
5 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -556,7 +556,7 @@ const int kReuseWindowOnAE = 2;
if (openInNewWindow)
[self openBrowserWindowWithURL:[(Bookmark *)item url] andReferrer:nil behind:behindWindow allowPopups:YES];
else if (openInNewTab)
[browserWindowController openNewTabWithURL:[(Bookmark *)item url] referrer:nil loadInBackground:newTabInBackground allowPopups:YES];
[browserWindowController openNewTabWithURL:[(Bookmark *)item url] referrer:nil loadInBackground:newTabInBackground allowPopups:YES setJumpback:NO];
else
[browserWindowController loadURL:[(Bookmark *)item url] referrer:nil activate:YES allowPopups:YES];
}
@ -1107,7 +1107,7 @@ Otherwise, we return the URL we originally got. Right now this supports .url,
if (tabOrWindowIsAvailable || reuseWindow == kReuseWindowOnAE)
[controller loadURL:inURLString referrer:nil activate:YES allowPopups:NO];
else if (reuseWindow == kOpenNewTabOnAE)
[controller openNewTabWithURL:inURLString referrer:aReferrer loadInBackground:loadInBackground allowPopups:NO];
[controller openNewTabWithURL:inURLString referrer:aReferrer loadInBackground:loadInBackground allowPopups:NO setJumpback:NO];
else
{
// note that we're opening a new window here

Просмотреть файл

@ -471,7 +471,7 @@ NSString* const kTabBarBackgroundDoubleClickedNotification = @"kTabBarBackground
-(void)addTabForURL:(NSString*)aURL referrer:(NSString*)aReferrer
{
[[[self window] windowController] openNewTabWithURL:aURL referrer:aReferrer loadInBackground:YES allowPopups:NO];
[[[self window] windowController] openNewTabWithURL:aURL referrer:aReferrer loadInBackground:YES allowPopups:NO setJumpback:NO];
}
#pragma mark -
@ -492,6 +492,7 @@ NSString* const kTabBarBackgroundDoubleClickedNotification = @"kTabBarBackground
- (void)setJumpbackTab:(BrowserTabViewItem*)inTab
{
NSLog(@"setting jumpback to %d", inTab);
mJumpbackTab = inTab;
}

Просмотреть файл

@ -2992,7 +2992,7 @@ enum BWCOpenDest {
// jump back to if this new one is closed w/out switching to any other tabs.
// This must come after the call to |openNewTab:| which clears the jumpback
// tab and changes the selected tab to the new tab.
if (inSetJumpback)
if (inSetJumpback && !aLoadInBG)
[mTabBrowser setJumpbackTab:previouslySelected];
[[newTab view] loadURI:aURLSpec referrer:aReferrer flags:NSLoadFlagsNone activate:!aLoadInBG allowPopups:inAllowPopups];
@ -3014,7 +3014,8 @@ enum BWCOpenDest {
// jump back to if this new one is closed w/out switching to any other tabs.
// This must come after the call to |openNewTab:| which clears the jumpback
// tab and changes the selected tab to the new tab.
[mTabBrowser setJumpbackTab:previouslySelected];
if (!inLoadInBG)
[mTabBrowser setJumpbackTab:previouslySelected];
return [[newTab view] getBrowserView];
}

Просмотреть файл

@ -432,7 +432,7 @@ static const unsigned int kMaxTitleLength = 50;
{
BOOL backgroundLoad = [[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.loadInBackground" withSuccess:NULL];
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.tabs.opentabfor.middleclick" withSuccess:NULL])
[bwc openNewTabWithURL:itemURL referrer:nil loadInBackground:backgroundLoad allowPopups:NO];
[bwc openNewTabWithURL:itemURL referrer:nil loadInBackground:backgroundLoad allowPopups:NO setJumpback:NO];
else
[bwc openNewWindowWithURL:itemURL referrer: nil loadInBackground:backgroundLoad allowPopups:NO];
}

Просмотреть файл

@ -204,7 +204,7 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
if (cmdKeyDown)
{
if (openInTabs)
[mBrowserWindowController openNewTabWithURL:url referrer:nil loadInBackground:loadInBackground allowPopups:NO];
[mBrowserWindowController openNewTabWithURL:url referrer:nil loadInBackground:loadInBackground allowPopups:NO setJumpback:YES];
else
[mBrowserWindowController openNewWindowWithURL:url referrer: nil loadInBackground:loadInBackground allowPopups:NO];
}
@ -273,7 +273,7 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
while ((curItem = [itemsEnum nextObject]))
{
if ([curItem isKindOfClass:[HistorySiteItem class]])
[mBrowserWindowController openNewTabWithURL:[curItem url] referrer:nil loadInBackground:backgroundLoad allowPopups:NO];
[mBrowserWindowController openNewTabWithURL:[curItem url] referrer:nil loadInBackground:backgroundLoad allowPopups:NO setJumpback:YES];
}
}