[[VLCMain sharedInstance] setIntf: p_intf];
- /* subscribe to LibVLCCore's messages */
- vlc_LogSet(p_intf->p_libvlc, MsgCallback, NULL);
-
[NSBundle loadNibNamed: @"MainMenu" owner: NSApp];
[NSApp run];
- (IBAction)showMessagesPanel:(id)sender
{
+ /* subscribe to LibVLCCore's messages */
+ vlc_LogSet(p_intf->p_libvlc, MsgCallback, NULL);
+
+ /* show panel */
[o_msgs_panel makeKeyAndOrderFront: sender];
}
[o_msgs_table scrollRowToVisible: [o_msg_arr count] - 1];
}
+- (void)windowWillClose:(NSNotification *)o_notification
+{
+ /* unsubscribe from LibVLCCore's messages */
+ vlc_LogSet( p_intf->p_libvlc, NULL, NULL );
+}
+
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
{
if (aTableView == o_msgs_table)