Commit 52b21462 authored by Felix Kühne's avatar Felix Kühne

macosx: explicitly show the protocols the objects are implementing, use a...

macosx: explicitly show the protocols the objects are implementing, use a modern API method in the wizard and fixed some minor warnings
parent 3e7e3cc6
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#import "misc.h" #import "misc.h"
@interface VLCEmbeddedWindow : NSWindow @interface VLCEmbeddedWindow : NSWindow <NSWindowDelegate, NSAnimationDelegate>
{ {
IBOutlet id o_btn_backward; IBOutlet id o_btn_backward;
IBOutlet id o_btn_forward; IBOutlet id o_btn_forward;
......
...@@ -90,7 +90,7 @@ struct intf_sys_t ...@@ -90,7 +90,7 @@ struct intf_sys_t
@class VLCEmbeddedWindow; @class VLCEmbeddedWindow;
@class VLCControls; @class VLCControls;
@class VLCPlaylist; @class VLCPlaylist;
@interface VLCMain : NSObject @interface VLCMain : NSObject <NSWindowDelegate, NSToolbarDelegate>
{ {
intf_thread_t *p_intf; /* The main intf object */ intf_thread_t *p_intf; /* The main intf object */
id o_prefs; /* VLCPrefs */ id o_prefs; /* VLCPrefs */
......
...@@ -1317,7 +1317,7 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key ) ...@@ -1317,7 +1317,7 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key )
unichar key = 0; unichar key = 0;
vlc_value_t val; vlc_value_t val;
unsigned int i_pressed_modifiers = 0; unsigned int i_pressed_modifiers = 0;
struct hotkey *p_hotkeys; const struct hotkey *p_hotkeys;
int i; int i;
val.i_int = 0; val.i_int = 0;
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
* Missing extension to NSWindow * Missing extension to NSWindow
*****************************************************************************/ *****************************************************************************/
@interface VLCWindow : NSWindow @interface VLCWindow : NSWindow <NSWindowDelegate>
{ {
BOOL b_canBecomeKeyWindow; BOOL b_canBecomeKeyWindow;
BOOL b_isset_canBecomeKeyWindow; BOOL b_isset_canBecomeKeyWindow;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
/***************************************************************************** /*****************************************************************************
* VLCPlaylistCommon interface * VLCPlaylistCommon interface
*****************************************************************************/ *****************************************************************************/
@interface VLCPlaylistCommon : NSObject @interface VLCPlaylistCommon : NSObject <NSComboBoxDataSource>
{ {
IBOutlet id o_tc_name; IBOutlet id o_tc_name;
IBOutlet id o_tc_author; IBOutlet id o_tc_author;
......
...@@ -126,8 +126,8 @@ ...@@ -126,8 +126,8 @@
NSMutableArray *o_children; NSMutableArray *o_children;
} }
- (int)numberOfChildren; - (NSInteger)numberOfChildren;
- (VLCInfoTreeItem *)childAtIndex:(int)i_index; - (VLCInfoTreeItem *)childAtIndex:(NSUInteger)i_index;
- (NSString *)name; - (NSString *)name;
- (NSString *)value; - (NSString *)value;
- (void)refresh; - (void)refresh;
......
...@@ -592,11 +592,11 @@ error: ...@@ -592,11 +592,11 @@ error:
o_children = nil; o_children = nil;
} }
- (VLCInfoTreeItem *)childAtIndex:(int)i_index { - (VLCInfoTreeItem *)childAtIndex:(NSUInteger)i_index {
return [[self children] objectAtIndex:i_index]; return [[self children] objectAtIndex:i_index];
} }
- (int)numberOfChildren { - (NSInteger)numberOfChildren {
id i_tmp = [self children]; id i_tmp = [self children];
return ( i_tmp == IsALeafNode ) ? (-1) : (int)[i_tmp count]; return ( i_tmp == IsALeafNode ) ? (-1) : (int)[i_tmp count];
......
...@@ -69,7 +69,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -69,7 +69,7 @@ static NSMenu *o_keys_menu = nil;
@end @end
@interface StringListConfigControl : VLCConfigControl @interface StringListConfigControl : VLCConfigControl <NSComboBoxDataSource>
{ {
NSComboBox *o_combo; NSComboBox *o_combo;
} }
...@@ -104,7 +104,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -104,7 +104,7 @@ static NSMenu *o_keys_menu = nil;
@end @end
@interface IntegerConfigControl : VLCConfigControl @interface IntegerConfigControl : VLCConfigControl <NSTextFieldDelegate>
{ {
NSTextField *o_textfield; NSTextField *o_textfield;
NSStepper *o_stepper; NSStepper *o_stepper;
...@@ -118,7 +118,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -118,7 +118,7 @@ static NSMenu *o_keys_menu = nil;
@end @end
@interface IntegerListConfigControl : VLCConfigControl @interface IntegerListConfigControl : VLCConfigControl <NSComboBoxDataSource>
{ {
NSComboBox *o_combo; NSComboBox *o_combo;
} }
...@@ -128,7 +128,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -128,7 +128,7 @@ static NSMenu *o_keys_menu = nil;
@end @end
@interface RangedIntegerConfigControl : VLCConfigControl @interface RangedIntegerConfigControl : VLCConfigControl <NSTextFieldDelegate>
{ {
NSSlider *o_slider; NSSlider *o_slider;
NSTextField *o_textfield; NSTextField *o_textfield;
...@@ -154,7 +154,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -154,7 +154,7 @@ static NSMenu *o_keys_menu = nil;
@end @end
@interface FloatConfigControl : VLCConfigControl @interface FloatConfigControl : VLCConfigControl <NSTextFieldDelegate>
{ {
NSTextField *o_textfield; NSTextField *o_textfield;
NSStepper *o_stepper; NSStepper *o_stepper;
...@@ -168,7 +168,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -168,7 +168,7 @@ static NSMenu *o_keys_menu = nil;
@end @end
@interface RangedFloatConfigControl : VLCConfigControl @interface RangedFloatConfigControl : VLCConfigControl <NSTextFieldDelegate>
{ {
NSSlider *o_slider; NSSlider *o_slider;
NSTextField *o_textfield; NSTextField *o_textfield;
...@@ -194,7 +194,7 @@ static NSMenu *o_keys_menu = nil; ...@@ -194,7 +194,7 @@ static NSMenu *o_keys_menu = nil;
@end @end
@interface ModuleListConfigControl : VLCConfigControl @interface ModuleListConfigControl : VLCConfigControl <NSTableViewDataSource>
{ {
NSTextField *o_textfield; NSTextField *o_textfield;
NSScrollView *o_scrollview; NSScrollView *o_scrollview;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#import "intf.h" #import "intf.h"
#import <vlc_common.h> #import <vlc_common.h>
@interface VLCSimplePrefs : NSObject @interface VLCSimplePrefs : NSObject <NSToolbarDelegate>
{ {
IBOutlet id o_audio_dolby_pop; IBOutlet id o_audio_dolby_pop;
IBOutlet id o_audio_dolby_txt; IBOutlet id o_audio_dolby_txt;
......
...@@ -324,7 +324,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na ...@@ -324,7 +324,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
else if( p_config->psz_text ) else if( p_config->psz_text )
return p_config->psz_text; return p_config->psz_text;
else else
msg_Warn( p_this, "option %s does not include any help" ); msg_Warn( p_this, "option %s does not include any help", psz_name );
return NULL; return NULL;
} }
......
...@@ -1177,11 +1177,8 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1177,11 +1177,8 @@ static VLCWizard *_o_sharedInstance = nil;
{ {
NSString * fileNameToUse; NSString * fileNameToUse;
/* check whether the extension is hidden or not. /* check whether the extension is hidden or not.
* if not, remove it * if not, remove it */
* we need the casting to make GCC4 happy */ if( [[[NSFileManager defaultManager] attributesOfItemAtPath: [[o_userSelections objectForKey:@"pathToStrm"] objectAtIndex: x] error: nil] objectForKey:
if( [[[NSFileManager defaultManager] fileAttributesAtPath:
[[o_userSelections objectForKey:@"pathToStrm"]
objectAtIndex: x] traverseLink: NO] objectForKey:
NSFileExtensionHidden] ) NSFileExtensionHidden] )
fileNameToUse = [NSString stringWithString: fileNameToUse = [NSString stringWithString:
[[NSFileManager defaultManager] displayNameAtPath: [[NSFileManager defaultManager] displayNameAtPath:
......
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