Skip to content

Commit

Permalink
#Yet another #1145
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Aug 4, 2007
1 parent 6980384 commit ca64398
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions source/ch/cyberduck/ui/cocoa/CDPreferencesController.java
Expand Up @@ -1645,17 +1645,21 @@ private void configureDefaultProtocolHandlerCombobox(NSPopUpButton defaultProtoc
final String[] bundleIdentifiers = URLSchemeHandlerConfiguration.instance().getAllHandlersForURLScheme(protocol);
for(int i = 0; i < bundleIdentifiers.length; i++) {
String path = NSWorkspace.sharedWorkspace().absolutePathForAppBundleWithIdentifier(bundleIdentifiers[i]);
if(null == path) {
continue;
}
NSBundle app = NSBundle.bundleWithPath(path);
if(path != null) {
defaultProtocolHandlerCombobox.addItem(app.infoDictionary().objectForKey("CFBundleName").toString());
final NSImage icon = NSWorkspace.sharedWorkspace().iconForFile(path);
icon.setSize(new NSSize(16f, 16f));
final NSMenuItem item = defaultProtocolHandlerCombobox.lastItem();
item.setImage(icon);
item.setRepresentedObject(bundleIdentifiers[i]);
if(bundleIdentifiers[i].equals(defaultHandler)) {
defaultProtocolHandlerCombobox.selectItem(item);
}
if(null == app) {
continue;
}
defaultProtocolHandlerCombobox.addItem(app.infoDictionary().objectForKey("CFBundleName").toString());
final NSImage icon = NSWorkspace.sharedWorkspace().iconForFile(path);
icon.setSize(new NSSize(16f, 16f));
final NSMenuItem item = defaultProtocolHandlerCombobox.lastItem();
item.setImage(icon);
item.setRepresentedObject(bundleIdentifiers[i]);
if(bundleIdentifiers[i].equals(defaultHandler)) {
defaultProtocolHandlerCombobox.selectItem(item);
}
}
}
Expand Down

0 comments on commit ca64398

Please sign in to comment.