diff --git a/camino/resources/localized/English.lproj/Localizable.strings b/camino/resources/localized/English.lproj/Localizable.strings index 998d3efa76b..57b97107901 100644 Binary files a/camino/resources/localized/English.lproj/Localizable.strings and b/camino/resources/localized/English.lproj/Localizable.strings differ diff --git a/camino/src/browser/BrowserWindowController.h b/camino/src/browser/BrowserWindowController.h index ebe050f0f8b..cffe0e47da6 100644 --- a/camino/src/browser/BrowserWindowController.h +++ b/camino/src/browser/BrowserWindowController.h @@ -177,6 +177,9 @@ typedef enum nsIURIFixup* mURIFixer; // [STRONG] should be nsCOMPtr, but can't nsIBrowserHistory* mGlobalHistory; // [STRONG] should be nsCOMPtr, but can't + + // saving window titles when opening the bookmark manager + NSString* mSavedTitle; } - (void)dealloc; @@ -353,6 +356,7 @@ typedef enum - (void)toggleBookmarkManager:(id)sender; - (void)ensureBrowserVisible:(id)sender; +- (NSString*)savedTitle; +- (void)setSavedTitle:(NSString *)aTitle; @end - diff --git a/camino/src/browser/BrowserWindowController.mm b/camino/src/browser/BrowserWindowController.mm index 4c83fbe3b40..396f79da06e 100644 --- a/camino/src/browser/BrowserWindowController.mm +++ b/camino/src/browser/BrowserWindowController.mm @@ -269,6 +269,7 @@ static NSArray* sToolbarDefaults = nil; mProgressSuperview = nil; mBookmarkToolbarItem = nil; mSidebarToolbarItem = nil; + mSavedTitle = nil; // register for services NSArray* sendTypes = [NSArray arrayWithObjects:NSStringPboardType, nil]; @@ -438,6 +439,7 @@ static NSArray* sToolbarDefaults = nil; //if (mSidebarBrowserView) // [mSidebarBrowserView windowClosed]; + [mSavedTitle release]; [mProgress release]; [mPopupBlocked release]; [mSearchBar release]; @@ -2566,6 +2568,19 @@ static NSArray* sToolbarDefaults = nil; return sBrokenIcon; } +// return the window's saved title +- (NSString *)savedTitle +{ + return mSavedTitle; +} + +// save the window title before showing +// bookmark manager or History manager +- (void)setSavedTitle:(NSString *)aTitle +{ + [mSavedTitle autorelease]; + mSavedTitle = [aTitle retain]; +} + (NSDictionary *)searchURLDictionary { @@ -2654,12 +2669,16 @@ static NSArray* sToolbarDefaults = nil; // cancel all pending loads. safari does this, i think we should too [self stopAllPendingLoads]; + // save window title + [self setSavedTitle:[[self window] title]]; + [[self window] setTitle:NSLocalizedString(@"Bookmark Manager",@"Bookmark Manager")]; [mBookmarkViewController selectLastContainer]; // set focus to appropriate area of bm manager [mBookmarkViewController focus]; } else { + [[self window] setTitle:[self savedTitle]]; CHBrowserView* browserView = [mBrowserView getBrowserView]; if (browserView) [browserView setActive:YES];