Skip to content

Commit

Permalink
Fix #8367.
Browse files Browse the repository at this point in the history
Former-commit-id: 2013d66352c580262eebfbc3dc7adeedea0d2e2a
  • Loading branch information
dkocher committed Nov 25, 2014
1 parent 71f6fb3 commit 9d5bc9d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions source/ch/cyberduck/ui/cocoa/delegate/EditMenuDelegate.java
Expand Up @@ -29,6 +29,7 @@
import ch.cyberduck.ui.resources.IconCacheFactory;

import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.rococoa.Foundation;
import org.rococoa.Selector;
import org.rococoa.cocoa.foundation.NSInteger;
Expand Down Expand Up @@ -105,9 +106,14 @@ public boolean menuUpdateItemAtIndex(NSMenu menu, NSMenuItem item, NSInteger ind
final Application application = editors.get(index.intValue());
item.setRepresentedObject(application.getIdentifier());
final String editor = editors.get(index.intValue()).getName();
item.setTitle(editor);
if(StringUtils.isBlank(editor)) {
item.setTitle(LocaleFactory.localizedString("Unknown"));
}
else {
item.setTitle(editor);
}
if(null != selected && application.getIdentifier().equalsIgnoreCase(EditorFactory.instance().getEditor(selected.getName()).getIdentifier())) {
setShortcut(item, this.getKeyEquivalent(), this.getModifierMask());
this.setShortcut(item, this.getKeyEquivalent(), this.getModifierMask());
}
else {
this.clearShortcut(item);
Expand Down

0 comments on commit 9d5bc9d

Please sign in to comment.