From: Felix Paul Kühne Date: Sun, 26 Nov 2006 19:21:54 +0000 (+0000) Subject: * the remaining compilation fixes plus a bit of clean up here and there. vout.m needs... X-Git-Tag: 0.9.0-test0~9198 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7614e4ee8618c05d37b1612d2d01741c250d49f5;p=vlc * the remaining compilation fixes plus a bit of clean up here and there. vout.m needs further fixing and everything needs quite some testing --- diff --git a/modules/gui/macosx/bookmarks.m b/modules/gui/macosx/bookmarks.m index 86d13adfa0..43920dbfa2 100644 --- a/modules/gui/macosx/bookmarks.m +++ b/modules/gui/macosx/bookmarks.m @@ -37,7 +37,7 @@ #import "bookmarks.h" #import "intf.h" #import "wizard.h" -#import +#import /***************************************************************************** * VLCExtended implementation @@ -171,10 +171,6 @@ static VLCBookmarks *_o_sharedInstance = nil; VLC_OBJECT_INPUT, FIND_ANYWHERE ); seekpoint_t **pp_bookmarks; int i_bookmarks; - char * toBeReturned; - toBeReturned = ""; - int i_toBeReturned; - i_toBeReturned = 0; int row; row = [o_tbl_dataTable selectedRow]; @@ -346,7 +342,7 @@ static VLCBookmarks *_o_sharedInstance = nil; to: [[NSNumber numberWithInt: (pp_bookmarks[i_second]->i_time_offset/1000000)] stringValue] ofItem: [NSString stringWithUTF8String: - p_input->input.p_item->psz_uri]]; + input_GetItem(p_input)->psz_uri]]; vlc_object_release( p_input ); msg_Dbg(p_intf, "released input"); } @@ -436,10 +432,8 @@ static VLCBookmarks *_o_sharedInstance = nil; VLC_OBJECT_INPUT, FIND_ANYWHERE ); seekpoint_t **pp_bookmarks; int i_bookmarks; - char * toBeReturned; - toBeReturned = ""; - int i_toBeReturned; - i_toBeReturned = 0; + char *toBeReturned; + int i_toBeReturned = 0; if( !p_input ) { diff --git a/modules/gui/macosx/extended.m b/modules/gui/macosx/extended.m index a1d3f562aa..4925ab2266 100644 --- a/modules/gui/macosx/extended.m +++ b/modules/gui/macosx/extended.m @@ -39,10 +39,9 @@ #import "extended.h" #import "intf.h" #import "vout.h" -#import -#import -#import -#import +#import +#import +#import /***************************************************************************** * VLCExtended implementation diff --git a/modules/gui/macosx/fspanel.m b/modules/gui/macosx/fspanel.m index 9ee35fbd5f..584325e052 100644 --- a/modules/gui/macosx/fspanel.m +++ b/modules/gui/macosx/fspanel.m @@ -296,7 +296,6 @@ id view = [super initWithFrame:frameRect]; fillColor = [[NSColor clearColor] retain]; NSRect s_rc = [self frame]; - NSImage * image; addButton( o_prev, @"fs_skip_previous" , @"fs_skip_previous_highlight", 174, 15, prev ); addButton( o_slow, @"fs_rewind" , @"fs_rewind_highlight" , 211, 14, slower ); addButton( o_play, @"fs_play" , @"fs_play_highlight" , 267, 10, play ); diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m index 05c6b5fd85..495c1bc1b8 100644 --- a/modules/gui/macosx/open.m +++ b/modules/gui/macosx/open.m @@ -43,7 +43,7 @@ #include "playlist.h" #include "open.h" #include "output.h" -#import +#import /***************************************************************************** * GetEjectableMediaOfClass diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index 37524c05c7..ccc92c8eb1 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -242,7 +242,6 @@ NSLog( @"expandable" ); - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)o_tc byItem:(id)item { id o_value = nil; - intf_thread_t *p_intf = VLCIntf; playlist_item_t *p_item; if( item == nil || ![item isKindOfClass: [NSValue class]] ) return( @"error" ); @@ -380,7 +379,7 @@ NSLog( @"expandable" ); while( p_parser->pp_shortcuts[++i] != NULL ); i--; /* Check whether to enable these menuitems */ - objectname = i>=0 ? p_parser->pp_shortcuts[i] : p_parser->psz_object_name; + objectname = i>=0 ? (char *)p_parser->pp_shortcuts[i] : (char *)p_parser->psz_object_name; b_enabled = playlist_IsServicesDiscoveryLoaded( p_playlist, objectname ); /* Create the menu entries used in the playlist menu */ diff --git a/modules/gui/macosx/sfilters.h b/modules/gui/macosx/sfilters.h index b003c62cd5..e6a91ed42f 100644 --- a/modules/gui/macosx/sfilters.h +++ b/modules/gui/macosx/sfilters.h @@ -22,7 +22,7 @@ *****************************************************************************/ #import -#import +#import @interface VLCsFilters : NSObject { diff --git a/modules/gui/macosx/sfilters.m b/modules/gui/macosx/sfilters.m index 4265cf10e6..19ec263cc2 100644 --- a/modules/gui/macosx/sfilters.m +++ b/modules/gui/macosx/sfilters.m @@ -31,7 +31,7 @@ #import "sfilters.h" #import "intf.h" -#import +#import /* TODO: - check for memory leaks @@ -298,13 +298,24 @@ static VLCsFilters *_o_sharedInstance = nil; psz_subfilters = config_GetPsz( p_intf, "sub-filter" ); if( psz_subfilters ) { - [o_marq_enabled_ckb setState: (bool)strstr( psz_subfilters, "marq")]; - [o_logo_enabled_ckb setState: (bool)strstr( psz_subfilters, "logo")]; - [o_time_enabled_ckb setState: (bool)strstr( psz_subfilters, "time")]; + if( strstr( psz_subfilters, "marq") ) + [o_marq_enabled_ckb setState: YES]; + else + [o_marq_enabled_ckb setState: NO]; + + if( strstr( psz_subfilters, "logo") ) + [o_logo_enabled_ckb setState: YES]; + else + [o_logo_enabled_ckb setState: NO]; + + if( strstr( psz_subfilters, "time") ) + [o_time_enabled_ckb setState: YES]; + else + [o_time_enabled_ckb setState: NO]; } - [self enableMarq]; - [self enableLogo]; - [self enableTime]; + [self enableMarq]; + [self enableLogo]; + [self enableTime]; } - (IBAction)logo_selectFile:(id)sender @@ -344,7 +355,7 @@ static VLCsFilters *_o_sharedInstance = nil; { if( [[o_marq_marq_fld stringValue] length] == 0 ) { - val.psz_string = ""; + val.psz_string = (char *)""; } else { @@ -414,7 +425,7 @@ static VLCsFilters *_o_sharedInstance = nil; { if( [[o_time_stamp_fld stringValue] length] == 0 ) { - val.psz_string = ""; + val.psz_string = (char *)""; } else { @@ -508,11 +519,11 @@ static VLCsFilters *_o_sharedInstance = nil; { if( [o_marq_enabled_ckb state] == NSOnState ) { - [self changeFiltersString:"marq" onOrOff:VLC_TRUE]; + [self changeFiltersString:(char *)"marq" onOrOff:VLC_TRUE]; } else { - [self changeFiltersString:"marq" onOrOff:VLC_FALSE]; + [self changeFiltersString:(char *)"marq" onOrOff:VLC_FALSE]; } [self enableMarq]; } @@ -520,11 +531,11 @@ static VLCsFilters *_o_sharedInstance = nil; { if( [o_logo_enabled_ckb state] == NSOnState ) { - [self changeFiltersString:"logo" onOrOff:VLC_TRUE]; + [self changeFiltersString:(char *)"logo" onOrOff:VLC_TRUE]; } else { - [self changeFiltersString:"logo" onOrOff:VLC_FALSE]; + [self changeFiltersString:(char *)"logo" onOrOff:VLC_FALSE]; } [self enableLogo]; } @@ -532,11 +543,11 @@ static VLCsFilters *_o_sharedInstance = nil; { if( [o_time_enabled_ckb state] == NSOnState ) { - [self changeFiltersString:"time" onOrOff:VLC_TRUE]; + [self changeFiltersString:(char *)"time" onOrOff:VLC_TRUE]; } else { - [self changeFiltersString:"time" onOrOff:VLC_FALSE]; + [self changeFiltersString:(char *)"time" onOrOff:VLC_FALSE]; } [self enableTime]; } diff --git a/modules/gui/macosx/vout.m b/modules/gui/macosx/vout.m index 12133e61c7..87cbb5f83a 100644 --- a/modules/gui/macosx/vout.m +++ b/modules/gui/macosx/vout.m @@ -273,17 +273,19 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, return; } - if( p_input->input.p_item->psz_name != NULL ) + if( input_GetItem(p_input)->psz_name != NULL ) o_title = [NSMutableString stringWithUTF8String: - p_input->input.p_item->psz_name]; - if( p_input->input.p_item->psz_uri != NULL ) + input_GetItem(p_input)->psz_name]; + if( input_GetItem(p_input)->psz_uri != NULL ) o_mrl = [NSMutableString stringWithUTF8String: - p_input->input.p_item->psz_uri]; + input_GetItem(p_input)->psz_uri]; if( o_title == nil ) o_title = o_mrl; if( o_mrl != nil ) { + /* FIXME once psz_access is exported, since that syntax is no longer valid */ +#if 0 if( p_input->input.p_access && !strcmp( p_input->input.p_access->p_module->psz_shortname, "File" ) ) { NSRange prefix_range = [o_mrl rangeOfString: @"file:"]; @@ -291,6 +293,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, [o_mrl deleteCharactersInRange: prefix_range]; [o_window setRepresentedFilename: o_mrl]; } +#endif [o_window setTitle: o_title]; } else diff --git a/modules/gui/macosx/wizard.h b/modules/gui/macosx/wizard.h index 52fbdb3372..99359ea634 100644 --- a/modules/gui/macosx/wizard.h +++ b/modules/gui/macosx/wizard.h @@ -148,7 +148,7 @@ NSArray * o_strmgMthds; NSString * o_opts; - BOOL * keepSettingsOrNot; + BOOL b_keepSettingsOrNot; } - (IBAction)cancelRun:(id)sender; - (IBAction)nextTab:(id)sender; diff --git a/modules/gui/macosx/wizard.m b/modules/gui/macosx/wizard.m index e01f615f12..c2f3845f75 100644 --- a/modules/gui/macosx/wizard.m +++ b/modules/gui/macosx/wizard.m @@ -33,9 +33,8 @@ *****************************************************************************/ #import "wizard.h" #import "intf.h" -#import "network.h" #import "playlist.h" -#import +#import /***************************************************************************** * VLCWizard implementation @@ -306,7 +305,7 @@ static VLCWizard *_o_sharedInstance = nil; - (void)resetWizard { /* get the current state of our setting to keep the selections or not */ - keepSettingsOrNot = (BOOL *)config_GetInt( VLCIntf, "macosx-wizard-keep" ); + b_keepSettingsOrNot = (BOOL)config_GetInt( VLCIntf, "macosx-wizard-keep" ); /* go to the front page and clean up a bit */ [o_userSelections removeAllObjects]; @@ -314,7 +313,7 @@ static VLCWizard *_o_sharedInstance = nil; [o_tab_pageHolder selectFirstTabViewItem:self]; - if( keepSettingsOrNot ) + if( b_keepSettingsOrNot ) return; /* reset the wizard-window to its default values if wanted */ @@ -1198,10 +1197,10 @@ static VLCWizard *_o_sharedInstance = nil; /* check whether the extension is hidden or not. * if not, remove it * we need the casting to make GCC4 happy */ - if( (int)[[[NSFileManager defaultManager] fileAttributesAtPath: \ + if( [[[NSFileManager defaultManager] fileAttributesAtPath: \ [[o_userSelections objectForKey:@"pathToStrm"] \ objectAtIndex: x] traverseLink: NO] objectForKey: \ - NSFileExtensionHidden] == YES ) + NSFileExtensionHidden] ) fileNameToUse = [NSString stringWithString: [[NSFileManager defaultManager] displayNameAtPath: [[o_userSelections objectForKey:@"pathToStrm"] @@ -1321,7 +1320,7 @@ static VLCWizard *_o_sharedInstance = nil; { /* play the first item and add the others afterwards */ playlist_item_t *p_item = playlist_ItemGetByInput( p_playlist, p_input, VLC_TRUE ); - playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, NULL, + playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, NULL, p_item ); } @@ -1348,7 +1347,7 @@ static VLCWizard *_o_sharedInstance = nil; objectAtIndex:0]]; x += 1; } - if( keepSettingsOrNot && savePreviousSel >= 0 ) + if( b_keepSettingsOrNot && savePreviousSel >= 0 ) [o_t4_pop_videoCodec selectItemAtIndex: savePreviousSel]; savePreviousSel = [o_t4_pop_audioCodec indexOfSelectedItem]; @@ -1360,7 +1359,7 @@ static VLCWizard *_o_sharedInstance = nil; objectAtIndex:0]]; x += 1; } - if( keepSettingsOrNot && savePreviousSel >= 0 ) + if( b_keepSettingsOrNot && savePreviousSel >= 0 ) [o_t4_pop_audioCodec selectItemAtIndex: savePreviousSel]; }