<key>IBEditorPositions</key>
<dict>
<key>29</key>
- <string>407 753 308 44 0 0 1600 1178 </string>
+ <string>266 466 308 44 0 0 1152 746 </string>
<key>303</key>
<string>93 566 72 114 0 0 1600 1178 </string>
</dict>
<string>291.0</string>
<key>IBOpenObjects</key>
<array>
+ <integer>29</integer>
+ <integer>636</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
* intf.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: intf.h,v 1.9 2003/01/04 04:11:08 jlj Exp $
+ * $Id: intf.h,v 1.10 2003/01/05 01:55:07 massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
IBOutlet id o_mu_window;
IBOutlet id o_mi_minimize;
+ IBOutlet id o_mi_close_window;
IBOutlet id o_mi_bring_atf;
/* dock menu */
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: intf.m,v 1.17 2003/01/04 04:11:08 jlj Exp $
+ * $Id: intf.m,v 1.18 2003/01/05 01:55:07 massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
[o_mi_subtitle setTitle: _NS("Subtitles")];
[o_mu_window setTitle: _NS("Window")];
- [o_mi_minimize setTitle: _NS("Minimize")];
+ [o_mi_minimize setTitle: _NS("Minimize Window")];
+ [o_mi_close_window setTitle: _NS("Close Window")];
[o_mi_bring_atf setTitle: _NS("Bring All to Front")];
/* dock menu */
}
else if( p_intf->p_sys->p_input->b_dead )
{
+ vout_thread_t * p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT,
+ FIND_ANYWHERE );
vlc_object_release( p_intf->p_sys->p_input );
p_intf->p_sys->p_input = NULL;
+
+ if ( p_vout != NULL )
+ {
+ vlc_object_detach( p_vout );
+ vlc_object_release( p_vout );
+ vout_Destroy( p_vout );
+ }
}
if( p_intf->p_sys->p_input != NULL )
p_intf->p_sys->p_input = NULL;
}
+ if( o_prefs != nil )
+ {
+ [o_prefs release];
+ o_prefs = nil;
+ }
+
/*
* Free playlists
*/
[o_mi_channels setEnabled: FALSE];
[o_mi_device setEnabled: FALSE];
[o_mi_screen setEnabled: FALSE];
+ [o_mi_close_window setEnabled: FALSE];
}
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
var: "video-device" selector: @selector(toggleVar:)];
vlc_object_release( (vlc_object_t *)p_vout );
+
+ [o_mi_close_window setEnabled: TRUE];
}
p_intf->p_sys->b_vout_update = 0;
* vout.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: vout.h,v 1.3 2002/12/24 23:00:51 massiot Exp $
+ * $Id: vout.h,v 1.4 2003/01/05 01:55:07 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
- (void)toggleFullscreen;
- (BOOL)isFullscreen;
+- (BOOL)windowShouldClose:(id)sender;
+
@end
/*****************************************************************************
* vout.m: MacOS X video output plugin
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: vout.m,v 1.9 2002/12/25 02:23:36 massiot Exp $
+ * $Id: vout.m,v 1.10 2003/01/05 01:55:07 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
msg_Err( p_vout, "unable to destroy window" );
}
+ if ( p_vout->p_sys->p_fullscreen_state != NULL )
+ EndFullScreen ( p_vout->p_sys->p_fullscreen_state, NULL );
+
ExitMovies();
free( p_vout->p_sys->p_matrix );
}
}
+/* This is actually the same as VLCControls::stop. */
+- (BOOL)windowShouldClose:(id)sender
+{
+ intf_thread_t * p_intf = [NSApp getIntf];
+ playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist == NULL )
+ {
+ return NO;
+ }
+
+ playlist_Stop( p_playlist );
+ vlc_object_release( p_playlist );
+
+ /* The window will be closed by the intf later. */
+ return NO;
+}
+
@end
/*****************************************************************************
{
unsigned int i_stylemask = NSTitledWindowMask |
NSMiniaturizableWindowMask |
+ NSClosableWindowMask |
NSResizableWindowMask;
[p_vout->p_sys->o_window