Commit c5ec1dcd authored by David Fuhrmann's avatar David Fuhrmann Committed by Jean-Baptiste Kempf

macosx: use input changed event to update bookmarks dialog

This allows lazy loading of the bookmarks window.

(cherry picked from commit ee503a8ffe8acadaef0f9a3dbe28196778cc1aa7)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5048ad23
......@@ -64,6 +64,5 @@
- (IBAction)edit_ok:(id)sender;
- (void)showBookmarks;
- (void)refresh;
- (id)dataTable;
@end
......@@ -71,6 +71,11 @@ static VLCBookmarks *_o_sharedInstance = nil;
[o_bookmarks_window setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
[self initStrings];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(inputChangedEvent:)
name:VLCInputChangedNotification
object:nil];
}
- (void)dealloc
......@@ -78,6 +83,8 @@ static VLCBookmarks *_o_sharedInstance = nil;
if (p_old_input)
vlc_object_release(p_old_input);
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
......@@ -121,7 +128,7 @@ static VLCBookmarks *_o_sharedInstance = nil;
[o_bookmarks_window makeKeyAndOrderFront:nil];
}
- (void)refresh
-(void)inputChangedEvent:(NSNotification *)o_notification
{
[o_tbl_dataTable reloadData];
}
......
......@@ -1303,7 +1303,6 @@ static bool f_appExit = false;
[o_mainwindow updateWindow];
[self updateDelays];
[self updateMainMenu];
[[self bookmarks] refresh];
[self playlistUpdated];
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment