diff --git a/camino/src/bookmarks/BookmarkFolder.h b/camino/src/bookmarks/BookmarkFolder.h index 73e5c00518f..93cc638d5aa 100644 --- a/camino/src/bookmarks/BookmarkFolder.h +++ b/camino/src/bookmarks/BookmarkFolder.h @@ -86,7 +86,7 @@ enum { - (void)setIsToolbar:(BOOL)aFlag; - (void)setIsSmartFolder:(BOOL)aFlag; - (void)setIsDockMenu:(BOOL)aFlag; -- (void)makeDockMenu:(id)sender; +- (void)toggleIsDockMenu:(id)sender; // Things added to make it work sort of like an array - (unsigned)count; diff --git a/camino/src/bookmarks/BookmarkFolder.mm b/camino/src/bookmarks/BookmarkFolder.mm index eb755c0cd4c..09b4067a447 100644 --- a/camino/src/bookmarks/BookmarkFolder.mm +++ b/camino/src/bookmarks/BookmarkFolder.mm @@ -454,9 +454,9 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context) [self setSpecialFlag:curVal]; } -- (void)makeDockMenu:(id)sender +- (void)toggleIsDockMenu:(id)sender { - [self setIsDockMenu:YES]; + [self setIsDockMenu:![self isDockMenu]]; } - (void)setIsDockMenu:(BOOL)aBool diff --git a/camino/src/bookmarks/BookmarkManager.mm b/camino/src/bookmarks/BookmarkManager.mm index 218f336f91f..909131cb9f9 100644 --- a/camino/src/bookmarks/BookmarkManager.mm +++ b/camino/src/bookmarks/BookmarkManager.mm @@ -791,7 +791,7 @@ static BookmarkManager* gBookmarkManager = nil; if (([items count] == 1) && itemsContainsFolder) { menuTitle = NSLocalizedString(@"Use as Dock Menu", nil); - menuItem = [[[NSMenuItem alloc] initWithTitle:menuTitle action:@selector(makeDockMenu:) keyEquivalent:@""] autorelease]; + menuItem = [[[NSMenuItem alloc] initWithTitle:menuTitle action:@selector(toggleIsDockMenu:) keyEquivalent:@""] autorelease]; [menuItem setTarget:[items objectAtIndex:0]]; if ([(BookmarkFolder*)[items objectAtIndex:0] isDockMenu]) [menuItem setState:NSOnState]; diff --git a/camino/src/bookmarks/BookmarkViewController.h b/camino/src/bookmarks/BookmarkViewController.h index 372c72594b7..cd488dc1e61 100644 --- a/camino/src/bookmarks/BookmarkViewController.h +++ b/camino/src/bookmarks/BookmarkViewController.h @@ -162,7 +162,7 @@ enum // // IBActions // -- (IBAction)setAsDockMenuFolder:(id)aSender; +- (IBAction)toggleIsDockMenuFolder:(id)aSender; - (IBAction)addCollection:(id)aSender; - (IBAction)addBookmarkSeparator:(id)aSender; - (IBAction)addBookmarkFolder:(id)aSender; diff --git a/camino/src/bookmarks/BookmarkViewController.mm b/camino/src/bookmarks/BookmarkViewController.mm index e657734ff77..76611658a00 100644 --- a/camino/src/bookmarks/BookmarkViewController.mm +++ b/camino/src/bookmarks/BookmarkViewController.mm @@ -376,10 +376,10 @@ const int kOutlineViewLeftMargin = 19; // determined empirically, since it doesn // IBActions // -- (IBAction)setAsDockMenuFolder:(id)aSender +- (IBAction)toggleIsDockMenuFolder:(id)aSender { BookmarkFolder* aFolder = [self selectedContainerFolder]; - [aFolder setIsDockMenu:YES]; + [aFolder toggleIsDockMenu:aSender]; } - (IBAction)addCollection:(id)aSender @@ -1381,7 +1381,7 @@ const int kOutlineViewLeftMargin = 19; // determined empirically, since it doesn [contextMenu addItem:[NSMenuItem separatorItem]]; NSMenuItem* useAsDockItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Use as Dock Menu", nil) - action:@selector(setAsDockMenuFolder:) + action:@selector(toggleIsDockMenuFolder:) keyEquivalent:@""]; [useAsDockItem setTarget:self]; if ([aFolder isDockMenu])