allow for toggling of bookmark manager using bm manager toolbar button, no bug sr=pinkerton

This commit is contained in:
joshmoz%gmail.com 2005-03-05 17:39:50 +00:00
Родитель 3ff20d69e8
Коммит fe820d76ac
1 изменённых файлов: 11 добавлений и 2 удалений

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

@ -1156,6 +1156,12 @@ enum BWCOpenDest {
[theItem setEnabled:enable];
return enable;
}
else if (action == @selector(manageBookmarks:)) {
BOOL enable = [[mBrowserView getBrowserView] canGoBack];
if (!enable && ![self bookmarkManagerIsVisible])
enable = true;
return enable;
}
else if (action == @selector(forward:)) {
// we have to handle all the enabling/disabling ourselves because this
// toolbar button is a view item. Note the return value is ignored.
@ -1455,9 +1461,12 @@ enum BWCOpenDest {
//
// Load the bookmarks in the frontmost tab or window.
//
-(IBAction)manageBookmarks: (id)aSender
-(IBAction)manageBookmarks:(id)aSender
{
[self loadURL:@"about:bookmarks" referrer:nil activate:YES allowPopups:YES];
if ([self bookmarkManagerIsVisible])
[self back:aSender];
else
[self loadURL:@"about:bookmarks" referrer:nil activate:YES allowPopups:YES];
}
//