Skip to content

Commit

Permalink
Do not use NSSearchToolbarItem on versions prior 10.16. Interesting…
Browse files Browse the repository at this point in the history
…ly this already works on 10.15.
  • Loading branch information
dkocher committed Nov 11, 2020
1 parent 51f2d14 commit 13abe04
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -33,6 +33,7 @@
import ch.cyberduck.core.AbstractHostCollection;
import ch.cyberduck.core.BookmarkNameProvider;
import ch.cyberduck.core.DefaultCharsetProvider;
import ch.cyberduck.core.Factory;
import ch.cyberduck.core.LocaleFactory;
import ch.cyberduck.core.local.Application;
import ch.cyberduck.core.local.ApplicationFinder;
Expand Down Expand Up @@ -456,8 +457,11 @@ public NSToolbarItem create(final String identifier) {
if(!toolbarItems.containsKey(identifier)) {
switch(BrowserToolbarItem.valueOf(identifier)) {
case search:
toolbarItems.put(identifier, NSSearchToolbarItem.itemWithIdentifier(identifier));
break;
if(!Factory.Platform.osversion.matches("10\\.(9|10|11|12|13|14|15).*")) {
toolbarItems.put(identifier, NSSearchToolbarItem.itemWithIdentifier(identifier));
break;
}
// Break through
default:
toolbarItems.put(identifier, CDToolbarItem.itemWithIdentifier(identifier));
}
Expand Down

0 comments on commit 13abe04

Please sign in to comment.