Skip to content

Commit 5b3d0a8

Browse files
committed
Set window title from bookmark.
1 parent 97b45c3 commit 5b3d0a8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121
import ch.cyberduck.binding.application.NSMenuItem;
2222
import ch.cyberduck.binding.application.NSOpenPanel;
2323
import ch.cyberduck.binding.application.NSPopUpButton;
24+
import ch.cyberduck.binding.application.NSWindow;
2425
import ch.cyberduck.binding.application.SheetCallback;
2526
import ch.cyberduck.binding.foundation.NSObject;
2627
import ch.cyberduck.binding.foundation.NSURL;
28+
import ch.cyberduck.core.BookmarkNameProvider;
2729
import ch.cyberduck.core.CollectionListener;
2830
import ch.cyberduck.core.Host;
2931
import ch.cyberduck.core.Local;
@@ -85,6 +87,12 @@ public void collectionItemChanged(final Host item) {
8587
//
8688
}
8789

90+
@Override
91+
public void setWindow(final NSWindow window) {
92+
this.addObserver(bookmark -> window.setTitle(BookmarkNameProvider.toString(bookmark)));
93+
super.setWindow(window);
94+
}
95+
8896
public void setTransferPopup(final NSPopUpButton button) {
8997
this.transferPopup = button;
9098
this.transferPopup.setTarget(this.id());

0 commit comments

Comments
 (0)