[vlc-devel] commit: Clean up here and there ( Felix Paul Kühne )
git version control
git at videolan.org
Sat Jan 10 16:10:43 CET 2009
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Jan 10 16:10:30 2009 +0100| [68a19d04d39a40854dbd5f48195735516d73ec8b] | committer: Felix Paul Kühne
Clean up here and there
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68a19d04d39a40854dbd5f48195735516d73ec8b
---
modules/gui/macosx/controls.m | 1 -
modules/gui/macosx/fspanel.m | 9 ++++++---
modules/gui/macosx/intf.m | 38 +++++++++++++++++++-------------------
modules/gui/macosx/playlist.m | 2 +-
modules/gui/macosx/vout.m | 17 +++++++++++------
5 files changed, 37 insertions(+), 30 deletions(-)
diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index 8ce9ee1..dfe7bc7 100644
--- a/modules/gui/macosx/controls.m
+++ b/modules/gui/macosx/controls.m
@@ -174,7 +174,6 @@
/* We have a detached vout */
else if( [[window className] isEqualToString: @"VLCVoutWindow"] )
{
- msg_Dbg( VLCIntf, "detached vout controls.m call voutView" );
voutView = [window voutView];
}
}
diff --git a/modules/gui/macosx/fspanel.m b/modules/gui/macosx/fspanel.m
index 5fabdfe..825ab56 100644
--- a/modules/gui/macosx/fspanel.m
+++ b/modules/gui/macosx/fspanel.m
@@ -178,10 +178,13 @@
- (void)setActive:(id)noData
{
- if( [[[[VLCMain sharedInstance] getControls] voutView] isFullscreen] )
+ if( [[[VLCMain sharedInstance] getControls] voutView] != nil )
{
- b_nonActive = NO;
- [self fadeIn];
+ if( [[[[VLCMain sharedInstance] getControls] voutView] isFullscreen] )
+ {
+ b_nonActive = NO;
+ [self fadeIn];
+ }
}
}
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 5649f6d..ce00432 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -473,7 +473,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];
@@ -1253,7 +1253,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;
}
@@ -1264,7 +1264,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;
}
@@ -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 openFile];
} 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 openFileGeneric];
} 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 openDisc];
} else {
@@ -1961,7 +1961,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 {
@@ -1973,7 +1973,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 {
@@ -1985,7 +1985,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];
@@ -1998,7 +1998,7 @@ end:
- (IBAction)showVLM:(id)sender
{
if( !nib_vlm_loaded )
- nib_vlm_loaded = [NSBundle loadNibNamed:@"VLM" owner:self];
+ nib_vlm_loaded = [NSBundle loadNibNamed:@"VLM" owner: NSApp];
[o_vlm showVLMWindow];
}
@@ -2009,7 +2009,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];
}
@@ -2019,12 +2019,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];
}
@@ -2033,7 +2033,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];
}
@@ -2048,7 +2048,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" );
@@ -2062,7 +2062,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];
}
@@ -2070,7 +2070,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];
}
@@ -2079,7 +2079,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
@@ -2334,7 +2334,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];
}
diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index 4d5e8f9..54951e0 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1333,7 +1333,7 @@
return( o_ctx_menu );
}
-- (void)outlineView: (NSTableView *)o_tv
+- (void)outlineView: (NSOutlineView *)o_tv
didClickTableColumn:(NSTableColumn *)o_tc
{
int i_mode, i_type = 0;
diff --git a/modules/gui/macosx/vout.m b/modules/gui/macosx/vout.m
index 3772cb3..f06dbf2 100644
--- a/modules/gui/macosx/vout.m
+++ b/modules/gui/macosx/vout.m
@@ -126,14 +126,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;
More information about the vlc-devel
mailing list