Commit 68a19d04 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

Clean up here and there

parent 688d48fe
......@@ -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];
}
}
......
......@@ -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];
}
}
}
......
......@@ -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];
}
......
......@@ -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;
......
......@@ -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;
......
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