|
23 | 23 | import ch.cyberduck.binding.application.*; |
24 | 24 | import ch.cyberduck.binding.foundation.FoundationKitFunctions; |
25 | 25 | import ch.cyberduck.binding.foundation.NSAttributedString; |
| 26 | +import ch.cyberduck.binding.foundation.NSMutableAttributedString; |
26 | 27 | import ch.cyberduck.binding.foundation.NSNotification; |
27 | 28 | import ch.cyberduck.binding.foundation.NSObject; |
28 | 29 | import ch.cyberduck.core.Cache; |
@@ -445,13 +446,14 @@ public void setActionPopup(final NSPopUpButton actionPopup) { |
445 | 446 |
|
446 | 447 | for(TransferAction action : TransferAction.forTransfer(transfer.getType())) { |
447 | 448 | this.actionPopup.addItemWithTitle(action.getTitle()); |
| 449 | + final NSMutableAttributedString title = NSMutableAttributedString.create(action.getTitle()); |
| 450 | + title.appendAttributedString(NSAttributedString.attributedStringWithAttributes( |
| 451 | + String.format("\n%s", action.getDescription()), MENU_HELP_FONT_ATTRIBUTES)); |
| 452 | + this.actionPopup.lastItem().setAttributedTitle(title); |
448 | 453 | this.actionPopup.lastItem().setRepresentedObject(action.name()); |
449 | 454 | if(action.equals(defaultAction)) { |
450 | 455 | this.actionPopup.selectItem(actionPopup.lastItem()); |
451 | 456 | } |
452 | | - this.actionPopup.addItemWithTitle(action.getDescription()); |
453 | | - this.actionPopup.lastItem().setAttributedTitle(NSAttributedString.attributedStringWithAttributes(action.getDescription(), MENU_HELP_FONT_ATTRIBUTES)); |
454 | | - this.actionPopup.lastItem().setEnabled(false); |
455 | 457 | } |
456 | 458 | this.actionPopup.setTarget(this.id()); |
457 | 459 | this.actionPopup.setAction(Foundation.selector("actionPopupClicked:")); |
|
0 commit comments