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