зеркало из https://github.com/mozilla/pjs.git
allow for toggling of bookmark manager using bm manager toolbar button, no bug sr=pinkerton
This commit is contained in:
Родитель
3ff20d69e8
Коммит
fe820d76ac
|
@ -1156,6 +1156,12 @@ enum BWCOpenDest {
|
||||||
[theItem setEnabled:enable];
|
[theItem setEnabled:enable];
|
||||||
return 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:)) {
|
else if (action == @selector(forward:)) {
|
||||||
// we have to handle all the enabling/disabling ourselves because this
|
// we have to handle all the enabling/disabling ourselves because this
|
||||||
// toolbar button is a view item. Note the return value is ignored.
|
// toolbar button is a view item. Note the return value is ignored.
|
||||||
|
@ -1455,8 +1461,11 @@ enum BWCOpenDest {
|
||||||
//
|
//
|
||||||
// Load the bookmarks in the frontmost tab or window.
|
// Load the bookmarks in the frontmost tab or window.
|
||||||
//
|
//
|
||||||
-(IBAction)manageBookmarks: (id)aSender
|
-(IBAction)manageBookmarks:(id)aSender
|
||||||
{
|
{
|
||||||
|
if ([self bookmarkManagerIsVisible])
|
||||||
|
[self back:aSender];
|
||||||
|
else
|
||||||
[self loadURL:@"about:bookmarks" referrer:nil activate:YES allowPopups:YES];
|
[self loadURL:@"about:bookmarks" referrer:nil activate:YES allowPopups:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче