[vlc-commits] macosx: playlist menu: use modern way to load xib

David Fuhrmann git at videolan.org
Sun Jun 10 11:03:11 CEST 2018


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Jun  9 21:05:47 2018 +0200| [4841da0ec14728b6e145058be847b13b325bece4] | committer: David Fuhrmann

macosx: playlist menu: use modern way to load xib

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4841da0ec14728b6e145058be847b13b325bece4
---

 modules/gui/macosx/VLCPlaylist.h | 2 +-
 modules/gui/macosx/VLCPlaylist.m | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/VLCPlaylist.h b/modules/gui/macosx/VLCPlaylist.h
index 024af45d08..f78c8069da 100644
--- a/modules/gui/macosx/VLCPlaylist.h
+++ b/modules/gui/macosx/VLCPlaylist.h
@@ -29,7 +29,7 @@
 
 @interface VLCPlaylist : NSResponder<NSOutlineViewDelegate>
 
- at property (readwrite, weak) IBOutlet NSMenu *playlistMenu;
+ at property (readwrite, strong) IBOutlet NSMenu *playlistMenu;
 @property (readwrite, weak) IBOutlet NSMenuItem *playPlaylistMenuItem;
 @property (readwrite, weak) IBOutlet NSMenuItem *deletePlaylistMenuItem;
 @property (readwrite, weak) IBOutlet NSMenuItem *infoPlaylistMenuItem;
diff --git a/modules/gui/macosx/VLCPlaylist.m b/modules/gui/macosx/VLCPlaylist.m
index c066fdf4e4..d959303f11 100644
--- a/modules/gui/macosx/VLCPlaylist.m
+++ b/modules/gui/macosx/VLCPlaylist.m
@@ -686,7 +686,7 @@
 - (NSMenu *)menuForEvent:(NSEvent *)o_event
 {
     if (!b_playlistmenu_nib_loaded)
-        b_playlistmenu_nib_loaded = [NSBundle loadNibNamed:@"PlaylistMenu" owner:self];
+        b_playlistmenu_nib_loaded = [[NSBundle mainBundle] loadNibNamed:@"PlaylistMenu" owner:self topLevelObjects:nil];
 
     NSPoint pt = [_outlineView convertPoint: [o_event locationInWindow] fromView: nil];
     NSInteger row = [_outlineView rowAtPoint:pt];



More information about the vlc-commits mailing list