fix regression on tagging tabs/windows as view source (bug 156606)
git-svn-id: svn://10.0.0.236/trunk@153187 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
904328e9ec
commit
c34e4eaac3
@ -527,11 +527,13 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
||||
|
||||
- (void)setTabTitle:(NSString*)tabTitle windowTitle:(NSString*)windowTitle
|
||||
{
|
||||
const short kViewSourceLength = 12; // strlen("view-source:")
|
||||
|
||||
NSString* curURL = [self getCurrentURLSpec];
|
||||
[mTabTitle autorelease];
|
||||
if (tabTitle && [tabTitle length] > 0) {
|
||||
if ([curURL hasPrefix:@"view-source:"])
|
||||
mTabTitle = [NSString stringWithFormat:NSLocalizedString(@"SourceOf", @""), tabTitle];
|
||||
mTabTitle = [NSString stringWithFormat:NSLocalizedString(@"SourceOf", @""), [curURL substringFromIndex:kViewSourceLength]];
|
||||
else
|
||||
mTabTitle = tabTitle;
|
||||
}
|
||||
@ -542,7 +544,7 @@ const NSString* kOfflineNotificationName = @"offlineModeChanged";
|
||||
[mTitle autorelease];
|
||||
if (windowTitle && [windowTitle length] > 0) {
|
||||
if ([curURL hasPrefix:@"view-source:"])
|
||||
mTitle = [NSString stringWithFormat:NSLocalizedString(@"SourceOf", @""), windowTitle];
|
||||
mTitle = [NSString stringWithFormat:NSLocalizedString(@"SourceOf", @""), [curURL substringFromIndex:kViewSourceLength]];
|
||||
else
|
||||
mTitle = windowTitle;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user