]> git.sesse.net Git - vlc/commitdiff
macosx: compilation fix for the 10.4u SDK and removal of a hack
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 23 Aug 2008 21:37:21 +0000 (23:37 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 23 Aug 2008 21:37:42 +0000 (23:37 +0200)
Note that all NS*Integer types were introduced on 10.5 only. They can tollfree bridged with the respective plain ints. They are undocumented anyway...

modules/gui/macosx/embeddedwindow.h
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/macosx/playlist.m
modules/gui/macosx/simple_prefs.h
modules/gui/macosx/simple_prefs.m

index f451b51697d4f896b1e6a6ad0bd4a9324a1f6167..ead8618f72cfc2c92e374499387caf6bdae13937 100644 (file)
@@ -53,7 +53,7 @@
     BOOL              b_window_is_invisible;
 
     NSSize videoRatio;
-    NSInteger originalLevel;
+    int originalLevel;
 }
 
 - (void)controlTintChanged;
index ded1405908acc4d727f81134500dd12fe210d3c0..ed999e22fd771e03c24f961046ad745269e2b6af 100644 (file)
 
 #include <Cocoa/Cocoa.h>
 
-/* this was introduced in Darwin 9. We need to declare it to prevent both
- * compilation warnings and errors */
-#ifndef NSInteger
-#define NSInteger int
-#endif
-
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
index 7274687d0e707aef13b0a0e8186020e3ece05a5e..256f6a23318c4b55f082cdcad2829cb73caa2a61 100644 (file)
@@ -2124,10 +2124,10 @@ end:
     NSDirectoryEnumerator *direnum = [[NSFileManager defaultManager] enumeratorAtPath:crashReporter];
     NSString *fname;
     NSString * latestLog = nil;
-    NSInteger year  = !previouslySeen ? [[NSUserDefaults standardUserDefaults] integerForKey:@"LatestCrashReportYear"] : 0;
-    NSInteger month = !previouslySeen ? [[NSUserDefaults standardUserDefaults] integerForKey:@"LatestCrashReportMonth"]: 0;
-    NSInteger day   = !previouslySeen ? [[NSUserDefaults standardUserDefaults] integerForKey:@"LatestCrashReportDay"]  : 0;
-    NSInteger hours = !previouslySeen ? [[NSUserDefaults standardUserDefaults] integerForKey:@"LatestCrashReportHours"]: 0;
+    int year  = !previouslySeen ? [[NSUserDefaults standardUserDefaults] integerForKey:@"LatestCrashReportYear"] : 0;
+    int month = !previouslySeen ? [[NSUserDefaults standardUserDefaults] integerForKey:@"LatestCrashReportMonth"]: 0;
+    int day   = !previouslySeen ? [[NSUserDefaults standardUserDefaults] integerForKey:@"LatestCrashReportDay"]  : 0;
+    int hours = !previouslySeen ? [[NSUserDefaults standardUserDefaults] integerForKey:@"LatestCrashReportHours"]: 0;
 
     while (fname = [direnum nextObject])
     {
index 4ae969649d01dcb07de2a4f260b0aa5f193e5e74..5dad4232cebfdd276e66f79fca47ce0d4d0ac883 100644 (file)
 
     pt = [o_outline_view convertPoint: [o_event locationInWindow]
                                                  fromView: nil];
-    NSInteger row = [o_outline_view rowAtPoint:pt];
+    int row = [o_outline_view rowAtPoint:pt];
     if( row != -1 )
         [o_outline_view selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
 
index 20c091886cc4624853fe816883e585784218aae2..60539e07b63d7e58f58af2dfd29fb30d369e39bd 100644 (file)
 /* hotkeys */
 - (IBAction)hotkeySettingChanged:(id)sender;
 - (void)showHotkeySettings;
-- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
-- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex;
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
 - (BOOL)changeHotkeyTo: (int)i_theNewKey;
 
 @end
index d6f1a6e0a73465e0348c9f04b7f93ffb64b0b7f9..5052f2413d0b82ea6daeb2216514a0862b31c6e4 100644 (file)
@@ -1193,12 +1193,12 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
     [self showSettingsForCategory: o_hotkeys_view];
 }
 
-- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView
 {
     return [o_hotkeySettings count];
 }
 
-- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
+- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
 {
     if( [[aTableColumn identifier] isEqualToString: @"action"] )
         return [o_hotkeyDescriptions objectAtIndex: rowIndex];