Commit 1e492f3d authored by Felix Paul Kühne's avatar Felix Paul Kühne

Backported [688d48fe] and...

Backported [688d48fe] and [68a19d04]

Due to VLC's API changes, no cherry-picks were possible for these commits
parent 5f95aad6
/***************************************************************************** /*****************************************************************************
* controls.m: MacOS X interface module * controls.m: MacOS X interface module
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2007 the VideoLAN team * Copyright (C) 2002-2009 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -154,7 +154,6 @@ ...@@ -154,7 +154,6 @@
/* We have a detached vout */ /* We have a detached vout */
else if( [[o_window className] isEqualToString: @"VLCVoutWindow"] ) else if( [[o_window className] isEqualToString: @"VLCVoutWindow"] )
{ {
msg_Dbg( VLCIntf, "detached vout controls.m call getVoutView" );
o_vout_view = [o_window getVoutView]; o_vout_view = [o_window getVoutView];
} }
} }
......
/***************************************************************************** /*****************************************************************************
* fspanel.m: MacOS X full screen panel * fspanel.m: MacOS X full screen panel
***************************************************************************** *****************************************************************************
* Copyright (C) 2006-2008 the VideoLAN team * Copyright (C) 2006-2009 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Jérôme Decoodt <djc at videolan dot org> * Authors: Jérôme Decoodt <djc at videolan dot org>
...@@ -178,11 +178,14 @@ ...@@ -178,11 +178,14 @@
- (void)setActive:(id)noData - (void)setActive:(id)noData
{ {
if( [[[VLCMain sharedInstance] getControls] getVoutView] != nil )
{
if( [[[[VLCMain sharedInstance] getControls] getVoutView] isFullscreen] ) if( [[[[VLCMain sharedInstance] getControls] getVoutView] isFullscreen] )
{ {
b_nonActive = NO; b_nonActive = NO;
[self fadeIn]; [self fadeIn];
} }
}
} }
/* This routine is called repeatedly to fade in the window */ /* This routine is called repeatedly to fade in the window */
......
/***************************************************************************** /*****************************************************************************
* intf.m: MacOS X interface module * intf.m: MacOS X interface module
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2008 the VideoLAN team * Copyright (C) 2002-2009 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -471,7 +471,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -471,7 +471,7 @@ static VLCMain *_o_sharedMainInstance = nil;
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
/* Check for update silently on startup */ /* Check for update silently on startup */
if( !nib_update_loaded ) if( !nib_update_loaded )
nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner:self]; nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner: NSApp];
if([o_update shouldCheckForUpdate]) if([o_update shouldCheckForUpdate])
[NSThread detachNewThreadSelector:@selector(checkForUpdate) toTarget:o_update withObject:nil]; [NSThread detachNewThreadSelector:@selector(checkForUpdate) toTarget:o_update withObject:nil];
...@@ -1247,7 +1247,7 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key ) ...@@ -1247,7 +1247,7 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key )
return nil; return nil;
if( !nib_prefs_loaded ) if( !nib_prefs_loaded )
nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: self]; nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: NSApp];
return o_sprefs; return o_sprefs;
} }
...@@ -1258,7 +1258,7 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key ) ...@@ -1258,7 +1258,7 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key )
return nil; return nil;
if( !nib_prefs_loaded ) if( !nib_prefs_loaded )
nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: self]; nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: NSApp];
return o_prefs; return o_prefs;
} }
...@@ -1901,7 +1901,7 @@ end: ...@@ -1901,7 +1901,7 @@ end:
{ {
if( !nib_open_loaded ) if( !nib_open_loaded )
{ {
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self]; nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
[o_open awakeFromNib]; [o_open awakeFromNib];
[o_open openFile]; [o_open openFile];
} else { } else {
...@@ -1913,7 +1913,7 @@ end: ...@@ -1913,7 +1913,7 @@ end:
{ {
if( !nib_open_loaded ) if( !nib_open_loaded )
{ {
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self]; nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
[o_open awakeFromNib]; [o_open awakeFromNib];
[o_open openFileGeneric]; [o_open openFileGeneric];
} else { } else {
...@@ -1925,7 +1925,7 @@ end: ...@@ -1925,7 +1925,7 @@ end:
{ {
if( !nib_open_loaded ) if( !nib_open_loaded )
{ {
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self]; nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
[o_open awakeFromNib]; [o_open awakeFromNib];
[o_open openDisc]; [o_open openDisc];
} else { } else {
...@@ -1937,7 +1937,7 @@ end: ...@@ -1937,7 +1937,7 @@ end:
{ {
if( !nib_open_loaded ) if( !nib_open_loaded )
{ {
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self]; nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
[o_open awakeFromNib]; [o_open awakeFromNib];
[o_open openNet]; [o_open openNet];
} else { } else {
...@@ -1949,7 +1949,7 @@ end: ...@@ -1949,7 +1949,7 @@ end:
{ {
if( !nib_open_loaded ) if( !nib_open_loaded )
{ {
nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner:self]; nib_open_loaded = [NSBundle loadNibNamed:@"Open" owner: NSApp];
[o_open awakeFromNib]; [o_open awakeFromNib];
[o_open openCapture]; [o_open openCapture];
} else { } else {
...@@ -1961,7 +1961,7 @@ end: ...@@ -1961,7 +1961,7 @@ end:
{ {
if( !nib_wizard_loaded ) if( !nib_wizard_loaded )
{ {
nib_wizard_loaded = [NSBundle loadNibNamed:@"Wizard" owner:self]; nib_wizard_loaded = [NSBundle loadNibNamed:@"Wizard" owner: NSApp];
[o_wizard initStrings]; [o_wizard initStrings];
[o_wizard resetWizard]; [o_wizard resetWizard];
[o_wizard showWizard]; [o_wizard showWizard];
...@@ -1977,7 +1977,7 @@ end: ...@@ -1977,7 +1977,7 @@ end:
o_extended = [[VLCExtended alloc] init]; o_extended = [[VLCExtended alloc] init];
if( !nib_extended_loaded ) if( !nib_extended_loaded )
nib_extended_loaded = [NSBundle loadNibNamed:@"Extended" owner:self]; nib_extended_loaded = [NSBundle loadNibNamed:@"Extended" owner: NSApp];
[o_extended showPanel]; [o_extended showPanel];
} }
...@@ -1987,12 +1987,12 @@ end: ...@@ -1987,12 +1987,12 @@ end:
/* we need the wizard-nib for the bookmarks's extract functionality */ /* we need the wizard-nib for the bookmarks's extract functionality */
if( !nib_wizard_loaded ) if( !nib_wizard_loaded )
{ {
nib_wizard_loaded = [NSBundle loadNibNamed:@"Wizard" owner:self]; nib_wizard_loaded = [NSBundle loadNibNamed:@"Wizard" owner: NSApp];
[o_wizard initStrings]; [o_wizard initStrings];
} }
if( !nib_bookmarks_loaded ) if( !nib_bookmarks_loaded )
nib_bookmarks_loaded = [NSBundle loadNibNamed:@"Bookmarks" owner:self]; nib_bookmarks_loaded = [NSBundle loadNibNamed:@"Bookmarks" owner: NSApp];
[o_bookmarks showBookmarks]; [o_bookmarks showBookmarks];
} }
...@@ -2001,7 +2001,7 @@ end: ...@@ -2001,7 +2001,7 @@ end:
{ {
if( !nib_prefs_loaded ) if( !nib_prefs_loaded )
{ {
nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: self]; nib_prefs_loaded = [NSBundle loadNibNamed:@"Preferences" owner: NSApp];
o_sprefs = [[VLCSimplePrefs alloc] init]; o_sprefs = [[VLCSimplePrefs alloc] init];
o_prefs= [[VLCPrefs alloc] init]; o_prefs= [[VLCPrefs alloc] init];
} }
...@@ -2016,7 +2016,7 @@ end: ...@@ -2016,7 +2016,7 @@ end:
{ {
#ifdef UPDATE_CHECK #ifdef UPDATE_CHECK
if( !nib_update_loaded ) if( !nib_update_loaded )
nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner:self]; nib_update_loaded = [NSBundle loadNibNamed:@"Update" owner: NSApp];
[o_update showUpdateWindow]; [o_update showUpdateWindow];
#else #else
msg_Err( VLCIntf, "Update checker wasn't enabled in this build" ); msg_Err( VLCIntf, "Update checker wasn't enabled in this build" );
...@@ -2030,7 +2030,7 @@ end: ...@@ -2030,7 +2030,7 @@ end:
- (IBAction)viewAbout:(id)sender - (IBAction)viewAbout:(id)sender
{ {
if( !nib_about_loaded ) if( !nib_about_loaded )
nib_about_loaded = [NSBundle loadNibNamed:@"About" owner:self]; nib_about_loaded = [NSBundle loadNibNamed:@"About" owner: NSApp];
[o_about showAbout]; [o_about showAbout];
} }
...@@ -2038,7 +2038,7 @@ end: ...@@ -2038,7 +2038,7 @@ end:
- (IBAction)showLicense:(id)sender - (IBAction)showLicense:(id)sender
{ {
if( !nib_about_loaded ) if( !nib_about_loaded )
nib_about_loaded = [NSBundle loadNibNamed:@"About" owner:self]; nib_about_loaded = [NSBundle loadNibNamed:@"About" owner: NSApp];
[o_about showGPL: sender]; [o_about showGPL: sender];
} }
...@@ -2047,7 +2047,7 @@ end: ...@@ -2047,7 +2047,7 @@ end:
{ {
if( !nib_about_loaded ) if( !nib_about_loaded )
{ {
nib_about_loaded = [NSBundle loadNibNamed:@"About" owner:self]; nib_about_loaded = [NSBundle loadNibNamed:@"About" owner: NSApp];
[o_about showHelp]; [o_about showHelp];
} }
else else
...@@ -2302,7 +2302,7 @@ end: ...@@ -2302,7 +2302,7 @@ end:
- (IBAction)showInformationPanel:(id)sender - (IBAction)showInformationPanel:(id)sender
{ {
if(! nib_info_loaded ) if(! nib_info_loaded )
nib_info_loaded = [NSBundle loadNibNamed:@"MediaInfo" owner: self]; nib_info_loaded = [NSBundle loadNibNamed:@"MediaInfo" owner: NSApp];
[o_info initPanel]; [o_info initPanel];
} }
......
/***************************************************************************** /*****************************************************************************
* playlist.m: MacOS X interface module * playlist.m: MacOS X interface module
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2008 the VideoLAN team * Copyright (C) 2002-2009 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -479,6 +479,7 @@ ...@@ -479,6 +479,7 @@
playlist_t *p_playlist = pl_Yield( VLCIntf ); playlist_t *p_playlist = pl_Yield( VLCIntf );
PL_LOCK;
if( playlist_CurrentSize( p_playlist ) >= 2 ) if( playlist_CurrentSize( p_playlist ) >= 2 )
{ {
[o_status_field setStringValue: [NSString stringWithFormat: [o_status_field setStringValue: [NSString stringWithFormat:
...@@ -492,6 +493,7 @@ ...@@ -492,6 +493,7 @@
else else
[o_status_field setStringValue: _NS("1 item")]; [o_status_field setStringValue: _NS("1 item")];
} }
PL_UNLOCK;
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
...@@ -1417,6 +1419,7 @@ ...@@ -1417,6 +1419,7 @@
id o_value = [super outlineView: outlineView child: index ofItem: item]; id o_value = [super outlineView: outlineView child: index ofItem: item];
playlist_t *p_playlist = pl_Yield( VLCIntf ); playlist_t *p_playlist = pl_Yield( VLCIntf );
PL_LOCK;
if( playlist_CurrentSize( p_playlist ) >= 2 ) if( playlist_CurrentSize( p_playlist ) >= 2 )
{ {
[o_status_field setStringValue: [NSString stringWithFormat: [o_status_field setStringValue: [NSString stringWithFormat:
...@@ -1434,6 +1437,7 @@ ...@@ -1434,6 +1437,7 @@
[o_status_field setStringValue: _NS("1 item")]; [o_status_field setStringValue: _NS("1 item")];
} }
} }
PL_UNLOCK;
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
[o_outline_dict setObject:o_value forKey:[NSString stringWithFormat:@"%p", [o_outline_dict setObject:o_value forKey:[NSString stringWithFormat:@"%p",
......
/***************************************************************************** /*****************************************************************************
* vout.m: MacOS X video output module * vout.m: MacOS X video output module
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2008 the VideoLAN team * Copyright (C) 2001-2009 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Colin Delacroix <colin@zoy.org> * Authors: Colin Delacroix <colin@zoy.org>
...@@ -123,9 +123,12 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -123,9 +123,12 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
- (id)getViewForWindow: (id)o_window - (id)getViewForWindow: (id)o_window
{ {
if( o_embedded_array != nil )
{
id o_enumerator = [o_embedded_array objectEnumerator]; id o_enumerator = [o_embedded_array objectEnumerator];
id o_current_embedded; id o_current_embedded;
if( o_window != nil )
{
while( (o_current_embedded = [o_enumerator nextObject]) ) while( (o_current_embedded = [o_enumerator nextObject]) )
{ {
if( [o_current_embedded getWindow] == o_window ) if( [o_current_embedded getWindow] == o_window )
...@@ -133,6 +136,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, ...@@ -133,6 +136,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
return o_current_embedded; return o_current_embedded;
} }
} }
}
}
return nil; return nil;
} }
......
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