private void addDownloadPath(final Local f) { if(downloadPathPopup.menu().itemWithTitle(f.getDisplayName()) == null) { downloadPathPopup.addItemWithTitle(f.getDisplayName()); downloadPathPopup.lastItem().setImage(IconCacheFactory.<NSImage>get().fileIcon(f, 16)); downloadPathPopup.lastItem().setRepresentedObject(f.getAbsolute()); if(new DownloadDirectoryFinder().find(bookmark).equals(f)) { downloadPathPopup.selectItem(downloadPathPopup.lastItem()); } } }
menu.addItemWithTitle_action_keyEquivalent(LocaleFactory.localizedString("List"), Foundation.selector("browserSwitchMenuClicked:"), StringUtils.EMPTY); menu.itemWithTitle(LocaleFactory.localizedString("List")).setTag(BrowserController.BrowserSwitchSegement.list.ordinal()); menu.addItemWithTitle_action_keyEquivalent(LocaleFactory.localizedString("Outline"), Foundation.selector("browserSwitchMenuClicked:"), StringUtils.EMPTY); menu.itemWithTitle(LocaleFactory.localizedString("Outline")).setTag(BrowserController.BrowserSwitchSegement.outline.ordinal()); toolbarMenu.setSubmenu(menu); item.setView(button);