[vlc-devel] commit: macosx: explicitly show the protocols the objects are implementing, use a modern API method in the wizard and fixed some minor warnings ( Felix Kühne )

git version control git at videolan.org
Sun Aug 16 15:55:36 CEST 2009


vlc | branch: 1.0-bugfix | Felix Kühne <fpk at Bartleby.local> | Sun Aug 16 15:54:49 2009 +0200| [52b21462ebfcf22a19115b853280bb8fbac5be3b] | committer: Felix Kühne 

macosx: explicitly show the protocols the objects are implementing, use a modern API method in the wizard and fixed some minor warnings

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=52b21462ebfcf22a19115b853280bb8fbac5be3b
---

 modules/gui/macosx/embeddedwindow.h |    2 +-
 modules/gui/macosx/intf.h           |    2 +-
 modules/gui/macosx/intf.m           |    2 +-
 modules/gui/macosx/misc.h           |    2 +-
 modules/gui/macosx/playlist.h       |    2 +-
 modules/gui/macosx/playlistinfo.h   |    4 ++--
 modules/gui/macosx/playlistinfo.m   |    4 ++--
 modules/gui/macosx/prefs_widgets.h  |   14 +++++++-------
 modules/gui/macosx/simple_prefs.h   |    2 +-
 modules/gui/macosx/simple_prefs.m   |    2 +-
 modules/gui/macosx/wizard.m         |    7 ++-----
 11 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/modules/gui/macosx/embeddedwindow.h b/modules/gui/macosx/embeddedwindow.h
index 5c20d1b..e62543c 100644
--- a/modules/gui/macosx/embeddedwindow.h
+++ b/modules/gui/macosx/embeddedwindow.h
@@ -27,7 +27,7 @@
 
 #import "misc.h"
 
- at interface VLCEmbeddedWindow : NSWindow
+ at interface VLCEmbeddedWindow : NSWindow <NSWindowDelegate, NSAnimationDelegate>
 {
     IBOutlet id o_btn_backward;
     IBOutlet id o_btn_forward;
diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index 3d1f899..3ca9e3d 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -90,7 +90,7 @@ struct intf_sys_t
 @class VLCEmbeddedWindow;
 @class VLCControls;
 @class VLCPlaylist;
- at interface VLCMain : NSObject
+ at interface VLCMain : NSObject <NSWindowDelegate, NSToolbarDelegate>
 {
     intf_thread_t *p_intf;      /* The main intf object */
     id o_prefs;                 /* VLCPrefs       */
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index abc5bd1..c1cb5cd 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1317,7 +1317,7 @@ static unsigned int VLCModifiersToCocoa( unsigned int i_key )
     unichar key = 0;
     vlc_value_t val;
     unsigned int i_pressed_modifiers = 0;
-    struct hotkey *p_hotkeys;
+    const struct hotkey *p_hotkeys;
     int i;
 
     val.i_int = 0;
diff --git a/modules/gui/macosx/misc.h b/modules/gui/macosx/misc.h
index a27f87c..79af3ba 100644
--- a/modules/gui/macosx/misc.h
+++ b/modules/gui/macosx/misc.h
@@ -64,7 +64,7 @@
  *  Missing extension to NSWindow
  *****************************************************************************/
 
- at interface VLCWindow : NSWindow
+ at interface VLCWindow : NSWindow <NSWindowDelegate>
 {
     BOOL b_canBecomeKeyWindow;
     BOOL b_isset_canBecomeKeyWindow;
diff --git a/modules/gui/macosx/playlist.h b/modules/gui/macosx/playlist.h
index 02f291a..f792ca6 100644
--- a/modules/gui/macosx/playlist.h
+++ b/modules/gui/macosx/playlist.h
@@ -34,7 +34,7 @@
 /*****************************************************************************
  * VLCPlaylistCommon interface
  *****************************************************************************/
- at interface VLCPlaylistCommon : NSObject
+ at interface VLCPlaylistCommon : NSObject <NSComboBoxDataSource>
 {
     IBOutlet id o_tc_name;
     IBOutlet id o_tc_author;
diff --git a/modules/gui/macosx/playlistinfo.h b/modules/gui/macosx/playlistinfo.h
index cea5c0c..2f7ef42 100644
--- a/modules/gui/macosx/playlistinfo.h
+++ b/modules/gui/macosx/playlistinfo.h
@@ -126,8 +126,8 @@
     NSMutableArray *o_children;
 }
 
-- (int)numberOfChildren;
-- (VLCInfoTreeItem *)childAtIndex:(int)i_index;
+- (NSInteger)numberOfChildren;
+- (VLCInfoTreeItem *)childAtIndex:(NSUInteger)i_index;
 - (NSString *)name;
 - (NSString *)value;
 - (void)refresh;
diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m
index 972f1a6..151bda9 100644
--- a/modules/gui/macosx/playlistinfo.m
+++ b/modules/gui/macosx/playlistinfo.m
@@ -592,11 +592,11 @@ error:
     o_children = nil;
 }
 
-- (VLCInfoTreeItem *)childAtIndex:(int)i_index {
+- (VLCInfoTreeItem *)childAtIndex:(NSUInteger)i_index {
     return [[self children] objectAtIndex:i_index];
 }
 
-- (int)numberOfChildren {
+- (NSInteger)numberOfChildren {
 
     id i_tmp = [self children];
     return ( i_tmp == IsALeafNode ) ? (-1) : (int)[i_tmp count];
diff --git a/modules/gui/macosx/prefs_widgets.h b/modules/gui/macosx/prefs_widgets.h
index 8d44a77..82ceba8 100644
--- a/modules/gui/macosx/prefs_widgets.h
+++ b/modules/gui/macosx/prefs_widgets.h
@@ -69,7 +69,7 @@ static NSMenu   *o_keys_menu = nil;
 
 @end
 
- at interface StringListConfigControl : VLCConfigControl
+ at interface StringListConfigControl : VLCConfigControl <NSComboBoxDataSource>
 {
     NSComboBox      *o_combo;
 }
@@ -104,7 +104,7 @@ static NSMenu   *o_keys_menu = nil;
 
 @end
 
- at interface IntegerConfigControl : VLCConfigControl
+ at interface IntegerConfigControl : VLCConfigControl <NSTextFieldDelegate>
 {
     NSTextField     *o_textfield;
     NSStepper       *o_stepper;
@@ -118,7 +118,7 @@ static NSMenu   *o_keys_menu = nil;
 
 @end
 
- at interface IntegerListConfigControl : VLCConfigControl
+ at interface IntegerListConfigControl : VLCConfigControl <NSComboBoxDataSource>
 {
     NSComboBox      *o_combo;
 }
@@ -128,7 +128,7 @@ static NSMenu   *o_keys_menu = nil;
 
 @end
 
- at interface RangedIntegerConfigControl : VLCConfigControl
+ at interface RangedIntegerConfigControl : VLCConfigControl <NSTextFieldDelegate>
 {
     NSSlider        *o_slider;
     NSTextField     *o_textfield;
@@ -154,7 +154,7 @@ static NSMenu   *o_keys_menu = nil;
 
 @end
 
- at interface FloatConfigControl : VLCConfigControl
+ at interface FloatConfigControl : VLCConfigControl <NSTextFieldDelegate>
 {
     NSTextField     *o_textfield;
     NSStepper       *o_stepper;
@@ -168,7 +168,7 @@ static NSMenu   *o_keys_menu = nil;
 
 @end
 
- at interface RangedFloatConfigControl : VLCConfigControl
+ at interface RangedFloatConfigControl : VLCConfigControl <NSTextFieldDelegate>
 {
     NSSlider        *o_slider;
     NSTextField     *o_textfield;
@@ -194,7 +194,7 @@ static NSMenu   *o_keys_menu = nil;
 
 @end
 
- at interface ModuleListConfigControl : VLCConfigControl
+ at interface ModuleListConfigControl : VLCConfigControl <NSTableViewDataSource>
 {
     NSTextField     *o_textfield;
     NSScrollView    *o_scrollview;
diff --git a/modules/gui/macosx/simple_prefs.h b/modules/gui/macosx/simple_prefs.h
index 936a4cf..b4744b0 100644
--- a/modules/gui/macosx/simple_prefs.h
+++ b/modules/gui/macosx/simple_prefs.h
@@ -25,7 +25,7 @@
 #import "intf.h"
 #import <vlc_common.h>
 
- at interface VLCSimplePrefs : NSObject
+ at interface VLCSimplePrefs : NSObject <NSToolbarDelegate>
 {
     IBOutlet id o_audio_dolby_pop;
     IBOutlet id o_audio_dolby_txt;
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index e5f16fb..9742752 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -324,7 +324,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
     else if( p_config->psz_text )
         return p_config->psz_text;
     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;
 }
diff --git a/modules/gui/macosx/wizard.m b/modules/gui/macosx/wizard.m
index dc49497..1bc23fc 100644
--- a/modules/gui/macosx/wizard.m
+++ b/modules/gui/macosx/wizard.m
@@ -1177,11 +1177,8 @@ static VLCWizard *_o_sharedInstance = nil;
                 {
                     NSString * fileNameToUse;
                     /* check whether the extension is hidden or not.
-                     * if not, remove it
-                     * we need the casting to make GCC4 happy */
-                    if( [[[NSFileManager defaultManager] fileAttributesAtPath:
-                        [[o_userSelections objectForKey:@"pathToStrm"]
-                        objectAtIndex: x] traverseLink: NO] objectForKey:
+                     * if not, remove it */
+                    if( [[[NSFileManager defaultManager] attributesOfItemAtPath: [[o_userSelections objectForKey:@"pathToStrm"] objectAtIndex: x] error: nil] objectForKey:
                         NSFileExtensionHidden] )
                         fileNameToUse = [NSString stringWithString:
                             [[NSFileManager defaultManager] displayNameAtPath:




More information about the vlc-devel mailing list