Skip to content

Commit 9e144a2

Browse files
committed
Single item for title and description.
1 parent 39cf7dd commit 9e144a2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

osx/src/main/java/ch/cyberduck/ui/cocoa/controller/TransferPromptController.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import ch.cyberduck.binding.application.*;
2424
import ch.cyberduck.binding.foundation.FoundationKitFunctions;
2525
import ch.cyberduck.binding.foundation.NSAttributedString;
26+
import ch.cyberduck.binding.foundation.NSMutableAttributedString;
2627
import ch.cyberduck.binding.foundation.NSNotification;
2728
import ch.cyberduck.binding.foundation.NSObject;
2829
import ch.cyberduck.core.Cache;
@@ -445,13 +446,14 @@ public void setActionPopup(final NSPopUpButton actionPopup) {
445446

446447
for(TransferAction action : TransferAction.forTransfer(transfer.getType())) {
447448
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);
448453
this.actionPopup.lastItem().setRepresentedObject(action.name());
449454
if(action.equals(defaultAction)) {
450455
this.actionPopup.selectItem(actionPopup.lastItem());
451456
}
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);
455457
}
456458
this.actionPopup.setTarget(this.id());
457459
this.actionPopup.setAction(Foundation.selector("actionPopupClicked:"));

0 commit comments

Comments
 (0)