Changeset 13

Show
Ignore:
Timestamp:
09/22/09 23:46:55 (3 years ago)
Author:
joel
Message:

Massive refactoring and cleanups.

Files:
67 modified

Legend:

Unmodified
Added
Removed
  • DeskBrowse.xcodeproj/project.pbxproj

    r11 r13  
    3131                5DC2C45B0EC2158800BD0054 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 5DC2C4560EC2158800BD0054 /* Credits.rtf */; }; 
    3232                5DC2C45D0EC2158800BD0054 /* main.dbmenu in Resources */ = {isa = PBXBuildFile; fileRef = 5DC2C4580EC2158800BD0054 /* main.dbmenu */; }; 
    33                 5DC2C4610EC215D400BD0054 /* DeskBrowse.scriptSuite in Resources */ = {isa = PBXBuildFile; fileRef = 5DC2C45E0EC215D400BD0054 /* DeskBrowse.scriptSuite */; }; 
    34                 5DC2C4620EC215D400BD0054 /* DeskBrowse.scriptTerminology in Resources */ = {isa = PBXBuildFile; fileRef = 5DC2C45F0EC215D400BD0054 /* DeskBrowse.scriptTerminology */; }; 
    35                 5DC2C4630EC215D400BD0054 /* Scripting.r in Rez */ = {isa = PBXBuildFile; fileRef = 5DC2C4600EC215D400BD0054 /* Scripting.r */; }; 
    3633                5DC2C4670EC215F500BD0054 /* DefaultLocationFieldIcon.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 5DC2C4640EC215F500BD0054 /* DefaultLocationFieldIcon.tiff */; }; 
    3734                5DC2C4680EC215F500BD0054 /* Generic.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5DC2C4650EC215F500BD0054 /* Generic.icns */; }; 
     
    250247                5DC2C4560EC2158800BD0054 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = Credits.rtf; path = Resources/Credits.rtf; sourceTree = "<group>"; }; 
    251248                5DC2C4580EC2158800BD0054 /* main.dbmenu */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; name = main.dbmenu; path = Resources/main.dbmenu; sourceTree = "<group>"; }; 
    252                 5DC2C45E0EC215D400BD0054 /* DeskBrowse.scriptSuite */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = DeskBrowse.scriptSuite; path = Resources/AppleScript/DeskBrowse.scriptSuite; sourceTree = "<group>"; }; 
    253                 5DC2C45F0EC215D400BD0054 /* DeskBrowse.scriptTerminology */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = DeskBrowse.scriptTerminology; path = Resources/AppleScript/DeskBrowse.scriptTerminology; sourceTree = "<group>"; }; 
    254                 5DC2C4600EC215D400BD0054 /* Scripting.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; name = Scripting.r; path = Resources/AppleScript/Scripting.r; sourceTree = "<group>"; }; 
    255249                5DC2C4640EC215F500BD0054 /* DefaultLocationFieldIcon.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = DefaultLocationFieldIcon.tiff; path = Resources/Images/DefaultLocationFieldIcon.tiff; sourceTree = "<group>"; }; 
    256250                5DC2C4650EC215F500BD0054 /* Generic.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Generic.icns; path = Resources/Images/Generic.icns; sourceTree = "<group>"; }; 
     
    580574                        isa = PBXGroup; 
    581575                        children = ( 
    582                                 5D1F467B09DF5D3100F7B99A /* applescript */, 
    583576                                5DC2C68D0EC22AEA00BD0054 /* nibs */, 
    584577                                5DC2C53E0EC21DC000BD0054 /* images */, 
     
    723716                        ); 
    724717                        name = "History Classes"; 
    725                         sourceTree = "<group>"; 
    726                 }; 
    727                 5D1F467B09DF5D3100F7B99A /* applescript */ = { 
    728                         isa = PBXGroup; 
    729                         children = ( 
    730                                 5DC2C45E0EC215D400BD0054 /* DeskBrowse.scriptSuite */, 
    731                                 5DC2C45F0EC215D400BD0054 /* DeskBrowse.scriptTerminology */, 
    732                                 5DC2C4600EC215D400BD0054 /* Scripting.r */, 
    733                         ); 
    734                         name = applescript; 
    735718                        sourceTree = "<group>"; 
    736719                }; 
     
    10741057                                5DC2C45B0EC2158800BD0054 /* Credits.rtf in Resources */, 
    10751058                                5DC2C45D0EC2158800BD0054 /* main.dbmenu in Resources */, 
    1076                                 5DC2C4610EC215D400BD0054 /* DeskBrowse.scriptSuite in Resources */, 
    1077                                 5DC2C4620EC215D400BD0054 /* DeskBrowse.scriptTerminology in Resources */, 
    10781059                                5DC2C4670EC215F500BD0054 /* DefaultLocationFieldIcon.tiff in Resources */, 
    10791060                                5DC2C4680EC215F500BD0054 /* Generic.icns in Resources */, 
     
    11961177                        buildActionMask = 2147483647; 
    11971178                        files = ( 
    1198                                 5DC2C4630EC215D400BD0054 /* Scripting.r in Rez */, 
    11991179                        ); 
    12001180                        runOnlyForDeploymentPostprocessing = 0; 
     
    14321412                                GCC_OPTIMIZATION_LEVEL = 0; 
    14331413                                MACOSX_DEPLOYMENT_TARGET = 10.3; 
    1434                                 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; 
     1414                                SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; 
    14351415                        }; 
    14361416                        name = Development; 
     
    14431423                                        i386, 
    14441424                                ); 
    1445                                 MACOSX_DEPLOYMENT_TARGET = 10.4; 
    1446                                 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; 
     1425                                GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 
     1426                                MACOSX_DEPLOYMENT_TARGET = 10.5; 
     1427                                SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; 
    14471428                        }; 
    14481429                        name = Deployment; 
     
    14561437                                ); 
    14571438                                MACOSX_DEPLOYMENT_TARGET = 10.3; 
    1458                                 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; 
     1439                                SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; 
    14591440                        }; 
    14601441                        name = Default; 
  • Source/DBActionMenuView.h

    r1 r13  
    1212@interface DBActionMenuView : NSView { 
    1313        NSImage *bgImage; 
    14         float opacity; 
     14        CGFloat opacity; 
    1515        DBActionMenuItem *history; 
    1616        DBActionMenuItem *downloads; 
  • Source/DBActionMenuWindow.m

    r1 r13  
    1111@implementation DBActionMenuWindow 
    1212 
    13 - (id) initWithContentRect: (NSRect) contentRect styleMask: (unsigned int) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag 
     13- (id) initWithContentRect: (NSRect) contentRect styleMask: (NSUInteger) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag 
    1414{ 
    1515    if (self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: NO]) 
  • Source/DBAntiPhisingValidator.m

    r1 r13  
    1919 
    2020+ (BOOL)validateLink:(NSURL *)urlLink { 
    21         NSString *u = [urlLink absoluteString]; 
     21        //NSString *u = [urlLink absoluteString]; 
    2222        return YES; 
    2323} 
  • Source/DBApplication.m

    r1 r13  
    8383{ 
    8484        NSString*       characters      = [theEvent charactersIgnoringModifiers]; 
    85         NSString*       characters1     = [theEvent characters]; 
     85        //NSString*     characters1     = [theEvent characters]; 
    8686         
    87         unsigned int modifiers  = [theEvent modifierFlags]; 
     87        NSUInteger modifiers    = [theEvent modifierFlags]; 
    8888         
    8989        /* 
  • Source/DBBetterOutlineView.m

    r1 r13  
    2424        NSDictionary*   userInfo                = [notification userInfo]; 
    2525        NSString*               textMovementKey = @"NSTextMovement"; 
    26         int                             whyEnd                  = [[userInfo objectForKey: textMovementKey] intValue]; 
     26        NSInteger                               whyEnd                  = [[userInfo objectForKey: textMovementKey] intValue]; 
    2727        BOOL                    calledSuper             = NO; 
    2828         
     
    6161        if (selectedRow != NSNotFound && selectedRow < numberOfRows) 
    6262        { 
    63                 int columnToEdit        = 0; 
    64                 int numberOfColumns     = [self numberOfColumns]; 
     63                NSInteger columnToEdit  = 0; 
     64                NSInteger numberOfColumns       = [self numberOfColumns]; 
    6565                 
    6666                if (columnToEdit >= 0 && columnToEdit < numberOfColumns) 
  • Source/DBBezelController.m

    r1 r13  
    1515        if (self) { 
    1616                NSRect screen = [[NSScreen mainScreen] frame]; 
    17                 float width = 220; 
    18                 float height = 186; 
     17                CGFloat width = 220; 
     18                CGFloat height = 186; 
    1919                bezel = [[NSWindow alloc] initWithContentRect:NSMakeRect(((screen.size.width/2) - (width/2)), ((screen.size.height/2) - height), width, height) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; 
    2020                [bezel setOpaque:NO]; 
  • Source/DBBezelOutlineView.m

    r1 r13  
    2828         
    2929         
    30         int                             i; 
     30        NSInteger                               i; 
    3131        NSArray*                tableColumns            = [self tableColumns]; 
    3232        NSTableColumn*  currentTableColumn      = nil; 
     
    6767                if (character == NSDeleteFunctionKey || character == 0x7F) 
    6868                { 
    69                         [[self delegate] tableViewDeleteKeyPressed: self]; 
     69                        [[self delegate] performSelector:@selector(tableViewDeleteKeyPressed:) withObject:self]; 
    7070                        handled = YES; 
    7171                } 
  • Source/DBBezelTableView.h

    r1 r13  
    1212 
    1313 
    14 static float kDragImageAlpha = 0.55f; 
     14static CGFloat kDragImageAlpha = 0.55f; 
    1515 
    1616@interface DBBezelTableView : NSTableView 
  • Source/DBBezelTableView.m

    r9 r13  
    6969                                        if ([delegate respondsToSelector: @selector(tableViewDeleteKeyPressed:)]) 
    7070                                        { 
    71                                                 [delegate tableViewDeleteKeyPressed: self];      
     71                                                [delegate performSelector:@selector(tableViewDeleteKeyPressed:) withObject:self]; 
    7272                                                handled = YES; 
    7373                                        } 
     
    123123}*/ 
    124124 
    125 - (unsigned int) draggingSourceOperationMaskForLocal: (BOOL) isLocal 
     125- (NSUInteger) draggingSourceOperationMaskForLocal: (BOOL) isLocal 
    126126{ 
    127         unsigned int operation = NSDragOperationNone; 
     127        NSUInteger operation = NSDragOperationNone; 
    128128         
    129129        if (isLocal) 
  • Source/DBBezelWindow.m

    r1 r13  
    1111 
    1212 
    13 - (id) initWithContentRect: (NSRect) contentRect styleMask: (unsigned int) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag 
     13- (id) initWithContentRect: (NSRect) contentRect styleMask: (NSUInteger) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag 
    1414{ 
    1515        if (self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask backing: bufferingType defer: flag]) 
    1616        { 
    17 //              [self setAboveMainWindowLevel: YES]; // Only use this if you want the bezel windows to float 
     17//              [self setAboveMainWindowLevel: YES]; // Only use this if you want the bezel windows to CGFloat 
    1818                [self setOpaque: NO]; 
    1919                [self setBackgroundColor: [NSColor clearColor]]; 
     
    9090                        newOrigin.y     = origin.y + newLocation.y - dragStartLocation.y; 
    9191                         
    92                         float maxHeight; 
     92                        CGFloat maxHeight; 
    9393                         
    9494                        if ([self level] < NSMainMenuWindowLevel) // if our level is less than the main menu level 
  • Source/DBBookmarkActionCell.h

    r1 r13  
    66 
    77#import <Cocoa/Cocoa.h> 
     8#import "DBBookmarkBarCell.h" 
    89 
    9  
    10 @protocol DBBookmarkBarCell; 
    1110 
    1211@interface DBBookmarkActionCell : NSActionCell <DBBookmarkBarCell> 
  • Source/DBBookmarkActionCell.m

    r8 r13  
    116116        if (stringSize.width < textFrame.size.width) 
    117117        { 
    118                 float extraWidth        = textFrame.size.width - stringSize.width; 
     118                CGFloat extraWidth      = textFrame.size.width - stringSize.width; 
    119119                textFrame.origin.x      = textFrame.origin.x + extraWidth / 2; 
    120120        } 
     
    240240        NSDictionary*   stringAttributes        = [self textAttributes]; 
    241241        NSSize                  stringSize                      = [[self stringValue] sizeWithAttributes: stringAttributes]; 
    242         float                   desiredWidth            = stringSize.width + DBPaddingOnSidesOfTextFrame * 2; 
    243         float                   newWidth                        = (desiredWidth <= DBBookmarkCellMaximumWidth) ? desiredWidth : DBBookmarkCellMaximumWidth; 
     242        CGFloat                 desiredWidth            = stringSize.width + DBPaddingOnSidesOfTextFrame * 2; 
     243        CGFloat                 newWidth                        = (desiredWidth <= DBBookmarkCellMaximumWidth) ? desiredWidth : DBBookmarkCellMaximumWidth; 
    244244         
    245245        [self setFrame: NSMakeRect(frame.origin.x, frame.origin.y, newWidth, frame.size.height)]; 
  • Source/DBBookmarkBar.h

    r1 r13  
    2121         
    2222        BOOL                                    mDragging; 
    23         float                                   mLastMouseX; 
     23        CGFloat                                 mLastMouseX; 
    2424         
    2525        NSRect                                  mLastFrame; 
  • Source/DBBookmarkBar.m

    r1 r13  
    1313 
    1414 
    15 const float kDistanceBetweenBookmarks = 5; 
     15const CGFloat kDistanceBetweenBookmarks = 5; 
    1616 
    1717@interface DBBookmarkBar (Private) 
    1818 
    19 - (float) maxRightEdgeForCells; 
     19- (CGFloat) maxRightEdgeForCells; 
    2020 
    2121- (void) drawBackgroundInRect: (NSRect) rect; 
     
    119119        [mBookmarkCells removeAllObjects]; 
    120120         
    121         NSArray*                bookmarks                       = [mBookmarkController bookmarks]; 
    122          
    123         NSRect                  frame                           = [self frame]; 
    124         float                   frameHeight                     = frame.size.height; 
    125         float                   frameWidth                      = frame.size.width; 
    126          
    127         float                   maxRightEdge            = [self maxRightEdgeForCells]; 
     121        CGFloat                 maxRightEdge            = [self maxRightEdgeForCells]; 
    128122         
    129123        NSEnumerator*   bookmarkEnumerator      = [mBookmarkController bookmarkEnumerator]; 
     
    154148        id <DBBookmarkBarCell>  bookmarkCell    = nil; 
    155149         
    156         float                                   maxRightEdge    = [self maxRightEdgeForCells]; 
     150        CGFloat                                 maxRightEdge    = [self maxRightEdgeForCells]; 
    157151         
    158152        NSEnumerator*                   cellEnumerator  = [mBookmarkCells objectEnumerator]; 
     
    184178        unsigned returnIndex = 0; 
    185179         
    186         float                                           maxRightEdge            = [self maxRightEdgeForCells]; 
     180        CGFloat                                         maxRightEdge            = [self maxRightEdgeForCells]; 
    187181        NSRect                                          lastCellFrame           = NSZeroRect; 
    188182         
     
    242236        if (clickedCell != nil) 
    243237        { 
    244                 int                     indexOfCellInArray      = [mBookmarkCells indexOfObject: clickedCell]; 
     238                NSInteger                       indexOfCellInArray      = [mBookmarkCells indexOfObject: clickedCell]; 
    245239                NSNumber*       numberIndexOfCell       = [NSNumber numberWithInt: indexOfCellInArray]; 
    246240                 
     
    266260        BOOL                                            fillNow                 = NO; 
    267261         
    268         float                                           maxRightEdge    = [self maxRightEdgeForCells]; 
     262        CGFloat                                         maxRightEdge    = [self maxRightEdgeForCells]; 
    269263         
    270264        NSEnumerator*                           cellEnumerator  = [mBookmarkCells objectEnumerator]; 
     
    316310} 
    317311 
    318 - (unsigned int) draggingEntered: (id <NSDraggingInfo>) sender 
     312- (NSUInteger) draggingEntered: (id <NSDraggingInfo>) sender 
    319313{ 
    320314        NSDragOperation returnOperation = NSDragOperationNone; 
     
    363357        } 
    364358         
    365         return operation; 
     359        return returnOperation; 
    366360} 
    367361 
     
    420414 
    421415 
    422 - (float) maxRightEdgeForCells 
    423 { 
    424         float   maxRightEdge    =  0; 
     416- (CGFloat) maxRightEdgeForCells 
     417{ 
     418        CGFloat maxRightEdge    =  0; 
    425419        NSRect  frameRect               = [self frame]; 
    426420         
     
    453447        NSPoint                                 mouseLocation           = [[self window] convertScreenToBase: [NSEvent mouseLocation]];//[self convertPoint: [[[NSApp mainWindow] currentEvent] locationInWindow] fromView: nil]; 
    454448        NSRect                                  frameRect                       = [self frame]; 
    455         NSRect                                  frameMinusPadding       = NSMakeRect(frameRect.origin.x - kDistanceBetweenBookmarks, frameRect.origin.y, frameRect.size.width - (2 * kDistanceBetweenBookmarks), frameRect.size.height); 
    456          
    457         float                                   maxRightEdge            = [self maxRightEdgeForCells]; 
     449        //NSRect                                        frameMinusPadding       = NSMakeRect(frameRect.origin.x - kDistanceBetweenBookmarks, frameRect.origin.y, frameRect.size.width - (2 * kDistanceBetweenBookmarks), frameRect.size.height); 
     450         
     451        CGFloat                                 maxRightEdge            = [self maxRightEdgeForCells]; 
    458452        NSRect                                  lastCellFrame           = NSZeroRect; 
    459453         
     
    469463                        if (mouseLocation.x < NSMidX(cellFrame) && mouseLocation.x > NSMidX(lastCellFrame)) 
    470464                        { 
    471                                 float   positionOfIndicator             = NSMaxX(lastCellFrame) + (NSMinX(cellFrame) - NSMaxX(lastCellFrame)) / 2; 
     465                                CGFloat positionOfIndicator             = NSMaxX(lastCellFrame) + (NSMinX(cellFrame) - NSMaxX(lastCellFrame)) / 2; 
    472466                                NSRect  rectForDragIndicator    = NSMakeRect(positionOfIndicator, 0, 1, NSHeight(frameRect) - 2); 
    473467                                 
     
    507501         
    508502        NSRect                                  frameRect                                       = [self frame]; 
    509         NSRect                                  frameMinusPadding                       = NSMakeRect(frameRect.origin.x - kDistanceBetweenBookmarks, frameRect.origin.y, frameRect.size.width - (2 * kDistanceBetweenBookmarks), frameRect.size.height); 
     503        //NSRect                                        frameMinusPadding                       = NSMakeRect(frameRect.origin.x - kDistanceBetweenBookmarks, frameRect.origin.y, frameRect.size.width - (2 * kDistanceBetweenBookmarks), frameRect.size.height); 
    510504         
    511505        unsigned                                currentCellIndex                        = 0; 
  • Source/DBBookmarkBarCell.h

    r1 r13  
    99 
    1010extern NSString*        DBBookmarkCellPboardType; 
    11 extern float            DBBookmarkCellMaximumWidth; 
    12 extern float            DBPaddingOnSidesOfTextFrame; 
     11extern CGFloat          DBBookmarkCellMaximumWidth; 
     12extern CGFloat          DBPaddingOnSidesOfTextFrame; 
    1313 
    1414@protocol DBBookmarkBarCell 
  • Source/DBBookmarkBarCell.m

    r6 r13  
    66 
    77NSString*       DBBookmarkCellPboardType        = @"BookmarkCellType"; 
    8 float           DBBookmarkCellMaximumWidth      = 120.0; 
    9 float           DBPaddingOnSidesOfTextFrame = 10.0; 
     8CGFloat         DBBookmarkCellMaximumWidth      = 120.0; 
     9CGFloat         DBPaddingOnSidesOfTextFrame = 10.0; 
  • Source/DBBookmarkBarPopUpButton.m

    r1 r13  
    66 
    77#import "DBBookmarkBarPopUpButton.h" 
     8#import "DBBookmarkBar.h" 
    89 
    910#import "NSBezierPathRoundRects.h" 
     
    6465        if (stringSize.width < textFrame.size.width) 
    6566        { 
    66                 float extraWidth        = textFrame.size.width - stringSize.width; 
     67                CGFloat extraWidth      = textFrame.size.width - stringSize.width; 
    6768                textFrame.origin.x      = textFrame.origin.x + extraWidth / 2; 
    6869        } 
     
    8182        [self removeAllItems]; 
    8283                 
    83         NSArray* menuItems = [[self superview] menuItemsForPopUpButton: self]; 
     84        NSArray* menuItems = [((DBBookmarkBar*)[self superview]) menuItemsForPopUpButton: self]; 
    8485         
    8586        if ([menuItems count] > 0) 
     
    8788                NSMenu*                 menu                            = [self menu]; 
    8889                NSEnumerator*   menuItemEnumerator      = [menuItems objectEnumerator]; 
    89                 id<NSMenuItem>  currentMenuItem         = nil; 
     90                NSMenuItem*     currentMenuItem         = nil; 
    9091                 
    9192                while ((currentMenuItem = [menuItemEnumerator nextObject]) != nil) 
     
    103104- (void) deselectItems 
    104105{ 
    105         int numberOfItems = [self numberOfItems]; 
     106        NSInteger numberOfItems = [self numberOfItems]; 
    106107         
    107108        if (numberOfItems > 0) 
    108109        { 
    109110                NSMenu* menu                            = [self menu]; 
    110                 int             numberOfMenuItems       = [menu numberOfItems]; 
     111                NSInteger               numberOfMenuItems       = [menu numberOfItems]; 
    111112                 
    112113                if (numberOfMenuItems > 0) 
  • Source/DBBookmarkController.h

    r11 r13  
    5858// View methods 
    5959- (void) setTableView: (NSTableView*) tableView; 
    60 - (int) numberOfRows; 
    61 - (NSString*) stringForRow: (int) row; 
     60- (NSInteger) numberOfRows; 
     61- (NSString*) stringForRow: (NSInteger) row; 
    6262- (void) tableViewDoubleClick; 
    6363- (void) tableViewDeleteKeyPressed: (NSTableView*) tableView; 
    64 - (void) loadBookmarkAtIndex: (int) index; 
     64- (void) loadBookmarkAtIndex: (NSInteger) index; 
    6565- (void) bookmarkDelete: (NSNotification*) notification; 
    6666- (void) deleteBookmark: (DBBookmark*) bookmark; 
    67 - (void) deleteBookmarkAtIndex: (int) index; 
     67- (void) deleteBookmarkAtIndex: (NSInteger) index; 
    6868 
    6969// Main window 
     
    7474- (NSArray*) bookmarks; 
    7575- (NSEnumerator*) bookmarkEnumerator; 
    76 - (void) bookmarkDraggedFromIndex: (int) index toIndex: (int) newIndex; 
     76- (void) bookmarkDraggedFromIndex: (NSInteger) index toIndex: (NSInteger) newIndex; 
    7777 
    7878// Bookmark editing window 
  • Source/DBBookmarkController.m

    r11 r13  
    3232@interface NSMutableArray (SGSAdditions) 
    3333 
    34 - (int) moveObjectsAtIndexes: (NSIndexSet*) indexSet toIndex: (int) index; 
     34- (NSInteger) moveObjectsAtIndexes: (NSIndexSet*) indexSet toIndex: (NSInteger) index; 
    3535 
    3636@end 
     
    9191        NSMenu* bookmarksRoot = [[[NSApp mainMenu] itemWithTitle:@"Bookmarks"] submenu]; 
    9292         
    93         int offset = 3; 
     93        NSInteger offset = 3; 
    9494        unsigned count = [[bookmarksRoot itemArray] count]; 
    9595        unsigned i; 
     
    333333- (IBAction) loadSelectedBookmark: (id) sender 
    334334{ 
    335         int selectedRow = [mBookmarkTableView selectedRow]; 
     335        NSInteger selectedRow = [mBookmarkTableView selectedRow]; 
    336336         
    337337        if (selectedRow > -1 && selectedRow < [mBookmarkTableView numberOfRows]) 
     
    343343- (IBAction) deleteSelectedBookmark: (id) sender 
    344344{ 
    345         int selectedRow = [mBookmarkTableView selectedRow]; 
     345        NSInteger selectedRow = [mBookmarkTableView selectedRow]; 
    346346         
    347347        if (selectedRow > -1 && selectedRow < [mBookmarkTableView numberOfRows]) 
     
    411411} 
    412412 
    413 - (int) numberOfRows 
    414 { 
    415         int numberOfRows = [mBookmarks count]; 
     413- (NSInteger) numberOfRows 
     414{ 
     415        NSInteger numberOfRows = [mBookmarks count]; 
    416416         
    417417        return numberOfRows; 
    418418} 
    419419 
    420 - (NSString*) stringForRow: (int) row 
     420- (NSString*) stringForRow: (NSInteger) row 
    421421{ 
    422422        NSString* string = nil; 
     
    443443- (void) tableViewDoubleClick 
    444444{ 
    445         int row = [mBookmarkTableView selectedRow]; 
     445        NSInteger row = [mBookmarkTableView selectedRow]; 
    446446         
    447447        if (row > -1 && row < [mBookmarks count]) 
     
    455455        if (tableView == mBookmarkTableView) 
    456456        { 
    457                 int row = [mBookmarkTableView selectedRow]; 
     457                NSInteger row = [mBookmarkTableView selectedRow]; 
    458458                 
    459459                if (row > -1 && row < [mBookmarks count]) 
     
    464464} 
    465465 
    466 - (void) loadBookmarkAtIndex: (int) index 
     466- (void) loadBookmarkAtIndex: (NSInteger) index 
    467467{                
    468468        if (index < [mBookmarks count]) 
     
    489489- (void) deleteBookmark: (DBBookmark*) bookmark 
    490490{ 
    491         int index = [mBookmarks indexOfObject: bookmark]; 
     491        NSInteger index = [mBookmarks indexOfObject: bookmark]; 
    492492         
    493493        if (index != NSNotFound) 
     
    502502} 
    503503 
    504 - (void) deleteBookmarkAtIndex: (int) index 
     504- (void) deleteBookmarkAtIndex: (NSInteger) index 
    505505{        
    506506        DBBookmark* bookmark = [mBookmarks objectAtIndex: index]; 
     
    545545} 
    546546 
    547 - (void) bookmarkDraggedFromIndex: (int) index toIndex: (int) newIndex 
     547- (void) bookmarkDraggedFromIndex: (NSInteger) index toIndex: (NSInteger) newIndex 
    548548{ 
    549549        DBBookmark* draggedBookmark = [[mBookmarks objectAtIndex: index] retain]; 
     
    575575#pragma mark - 
    576576 
    577 - (id) outlineView: (NSOutlineView*) outlineView child: (int) index ofItem: (id) item 
     577- (id) outlineView: (NSOutlineView*) outlineView child: (NSInteger) index ofItem: (id) item 
    578578{ 
    579579        id childItem = nil; 
     
    603603} 
    604604 
    605 - (int) outlineView: (NSOutlineView*) outlineView numberOfChildrenOfItem: (id) item 
    606 { 
    607         int numberOfChildren = 0; 
     605- (NSInteger) outlineView: (NSOutlineView*) outlineView numberOfChildrenOfItem: (id) item 
     606{ 
     607        NSInteger numberOfChildren = 0; 
    608608         
    609609        if (item == nil) 
     
    643643#pragma mark NSTableView Data Source Methods 
    644644 
    645 - (int) numberOfRowsInTableView: (NSTableView*) tableView 
     645- (NSInteger) numberOfRowsInTableView: (NSTableView*) tableView 
    646646{ 
    647647        return [self numberOfRows]; 
    648648} 
    649649 
    650 - (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) column row: (int) row 
    651 { 
    652         NSString*       identifier      = [column identifier]; 
    653         id                      value           = nil; 
    654          
    655         value = [self stringForRow: row]; 
    656          
    657         return value; 
     650- (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) column row: (NSInteger) row 
     651{        
     652        return [self stringForRow:row]; 
    658653} 
    659654 
     
    662657#pragma mark NSTableView Delegate Methods 
    663658 
    664 - (void) tableView: (NSTableView*) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn*) tableColumn row: (int) row 
     659- (void) tableView: (NSTableView*) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn*) tableColumn row: (NSInteger) row 
    665660{ 
    666661        [cell setFont: [NSFont systemFontOfSize: 10.0]]; 
     
    706701 
    707702 
    708 - (NSDragOperation) tableView: (NSTableView*) tableView validateDrop: (id <NSDraggingInfo>) info proposedRow: (int) row proposedDropOperation: (NSTableViewDropOperation) operation 
     703- (NSDragOperation) tableView: (NSTableView*) tableView validateDrop: (id <NSDraggingInfo>) info proposedRow: (NSInteger) row proposedDropOperation: (NSTableViewDropOperation) operation 
    709704{ 
    710705        if (row == -1) 
     
    725720 
    726721 
    727 - (BOOL) tableView: (NSTableView*) tableView acceptDrop: (id <NSDraggingInfo>) info row: (int) dropRow dropOperation: (NSTableViewDropOperation) operation; 
     722- (BOOL) tableView: (NSTableView*) tableView acceptDrop: (id <NSDraggingInfo>) info row: (NSInteger) dropRow dropOperation: (NSTableViewDropOperation) operation; 
    728723{ 
    729724        BOOL                    accepted        = NO; 
    730725        NSPasteboard*   pboard          = [info draggingPasteboard]; 
    731         NSDragOperation srcMask         = [info draggingSourceOperationMask]; 
    732726         
    733727        if (tableView == mBookmarkTableView) 
     
    748742                                [tableView deselectAll: self]; 
    749743                                 
    750                                 int index = [rowIndexes lastIndex]; 
     744                                NSInteger index = [rowIndexes lastIndex]; 
    751745                                 
    752746                                while (index != NSNotFound) 
     
    788782{ 
    789783        NSMutableArray* arrayOfIndexes  = [NSMutableArray array]; 
    790         int                             index                   = [self lastIndex]; 
     784        NSInteger                               index                   = [self lastIndex]; 
    791785        NSNumber*               number                  = nil; 
    792786         
     
    814808        NSEnumerator*           arrayEnumerator = [array objectEnumerator]; 
    815809        NSNumber*                       currentNumber   = nil; 
    816         int                                     newIndex                = 0; 
     810        NSInteger                                       newIndex                = 0; 
    817811         
    818812        while ((currentNumber = [arrayEnumerator nextObject]) != nil) 
     
    835829 
    836830 
    837 - (int) moveObjectsAtIndexes: (NSIndexSet*) indexSet toIndex: (int) index 
    838 { 
    839         int                             returnVal                       = index; 
     831- (NSInteger) moveObjectsAtIndexes: (NSIndexSet*) indexSet toIndex: (NSInteger) index 
     832{ 
     833        NSInteger                               returnVal                       = 0; 
    840834        NSMutableArray* objectsToMove           = (NSMutableArray*)[self objectsAtIndexes: indexSet]; 
    841835        NSEnumerator*   objectEnumerator        = [objectsToMove reverseObjectEnumerator]; 
     
    844838        while ((currentObject = [objectEnumerator nextObject]) != nil) 
    845839        { 
    846                 int indexOfCurrentObject = [self indexOfObject: currentObject]; 
     840                NSInteger indexOfCurrentObject = [self indexOfObject: currentObject]; 
    847841                 
    848842                [self removeObjectAtIndex: indexOfCurrentObject]; 
  • Source/DBBookmarkMenuCell.m

    r7 r13  
    101101        if (stringSize.width < textFrame.size.width) 
    102102        { 
    103                 float extraWidth        = textFrame.size.width - stringSize.width; 
     103                CGFloat extraWidth      = textFrame.size.width - stringSize.width; 
    104104                textFrame.origin.x      = textFrame.origin.x + extraWidth / 2; 
    105105        } 
     
    246246                NSDictionary*   stringAttributes        = [self textAttributes]; 
    247247                NSSize                  stringSize                      = [[self stringValue] sizeWithAttributes: stringAttributes]; 
    248                 float                   desiredWidth            = stringSize.width + DBPaddingOnSidesOfTextFrame * 2; 
    249                 float                   newWidth                        = (desiredWidth <= DBBookmarkCellMaximumWidth) ? desiredWidth : DBBookmarkCellMaximumWidth; 
     248                CGFloat                 desiredWidth            = stringSize.width + DBPaddingOnSidesOfTextFrame * 2; 
     249                CGFloat                 newWidth                        = (desiredWidth <= DBBookmarkCellMaximumWidth) ? desiredWidth : DBBookmarkCellMaximumWidth; 
    250250                 
    251251                [self setFrame: NSMakeRect(frame.origin.x, frame.origin.y, newWidth, frame.size.height)]; 
  • Source/DBBookmarkTableDataSource.m

    r11 r13  
    3838 
    3939 
    40 - (int) numberOfRowsInTableView: (NSTableView*) tableView 
     40- (NSInteger) numberOfRowsInTableView: (NSTableView*) tableView 
    4141{ 
    4242        return [mBookmarkController numberOfBookmarks]; 
    4343} 
    4444 
    45 - (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) tableColumn row: (int) row 
     45- (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) tableColumn row: (NSInteger) row 
    4646{ 
    4747        id                      value                           = nil; 
     
    8686 
    8787 
    88 - (int) outlineView: (NSOutlineView*) outlineView numberOfChildrenOfItem: (id) item 
    89 { 
    90         int numberOfChildren = 0; 
     88- (NSInteger) outlineView: (NSOutlineView*) outlineView numberOfChildrenOfItem: (id) item 
     89{ 
     90        NSInteger numberOfChildren = 0; 
    9191         
    9292        if (item != nil && [item respondsToSelector: @selector(subBookmarks)]) 
     
    111111 
    112112 
    113 - (id) outlineView: (NSOutlineView*) outlineView child: (int) index ofItem: (id) item 
     113- (id) outlineView: (NSOutlineView*) outlineView child: (NSInteger) index ofItem: (id) item 
    114114{ 
    115115        id child = nil; 
     
    175175} 
    176176 
    177 - (NSDragOperation) outlineView: (NSOutlineView*) olv validateDrop: (id <NSDraggingInfo>) info proposedItem: (id) item proposedChildIndex: (int) index 
     177- (NSDragOperation) outlineView: (NSOutlineView*) olv validateDrop: (id <NSDraggingInfo>) info proposedItem: (id) item proposedChildIndex: (NSInteger) index 
    178178{ 
    179179        NSDragOperation operation = NSDragOperationGeneric; 
     
    182182} 
    183183 
    184 - (BOOL) outlineView: (NSOutlineView*) olv acceptDrop: (id <NSDraggingInfo>) info item: (id) item childIndex: (int) index 
     184- (BOOL) outlineView: (NSOutlineView*) olv acceptDrop: (id <NSDraggingInfo>) info item: (id) item childIndex: (NSInteger) index 
    185185{ 
    186186        BOOL                    acceptDrop              = NO; 
    187187         
    188         NSPasteboard*   draggingPboard  = [info draggingPasteboard]; 
     188        //NSPasteboard* draggingPboard  = [info draggingPasteboard]; 
    189189        NSDragOperation draggingMask    = [info draggingSourceOperationMask]; 
    190190         
    191191        if (draggingMask == NSTableViewDropAbove) 
    192192        { 
    193                 NSDictionary*   bdict           = [draggingPboard propertyListForType: kBookmarkDragType]; 
     193                //NSDictionary* bdict           = [draggingPboard propertyListForType: kBookmarkDragType]; 
    194194                //DBBookmark*           newBookmark = [[DBBookmark alloc] initWithDictionary: bdict]; 
    195195                //[item addBookmark: newBookmark]; 
    196                 int i = [mDraggingBookmarks count]; 
     196                NSInteger i = [mDraggingBookmarks count]; 
    197197                while (i--) 
    198198                { 
  • Source/DBBookmarkWindowController.m

    r1 r13  
    7676- (IBAction) remove: (id) sender 
    7777{ 
    78         int selectedRow = [mTableView selectedRow]; 
     78        NSInteger selectedRow = [mTableView selectedRow]; 
    7979         
    8080        if (selectedRow > -1 && selectedRow < [mTableView numberOfRows]) 
     
    8888- (IBAction) load: (id) sender 
    8989{ 
    90         int selectedRow = [mTableView selectedRow]; 
     90        NSInteger selectedRow = [mTableView selectedRow]; 
    9191         
    9292        if (selectedRow > -1 && selectedRow < [mTableView numberOfRows]) 
  • Source/DBDownloadController.h

    r1 r13  
    2525        NSMutableArray*                 mDownloads; 
    2626         
    27         int                                             mNumloads; 
    28         int                                             mNumloadsfinished; 
     27        NSInteger                                               mNumloads; 
     28        NSInteger                                               mNumloadsfinished; 
    2929         
    3030        double                                  mLastUpdate; 
     
    4848- (void) tableViewDoubleClick; 
    4949 
    50 - (int) downloadsInProgress; 
     50- (NSInteger) downloadsInProgress; 
    5151- (BOOL) deskBrowseShouldTerminate; 
    5252 
  • Source/DBDownloadController.m

    r5 r13  
    108108        if (mDownloadTableView != nil) 
    109109        { 
    110                 int                             row             = [mDownloadTableView selectedRow]; 
     110                NSInteger                               row             = [mDownloadTableView selectedRow]; 
    111111                DBDownloadObject*       object  = nil; 
    112112 
     
    140140} 
    141141 
    142 - (void) alertDidEnd: (NSAlert*) alert returnCode: (int) returnCode contextInfo: (void*) contextInfo 
     142- (void) alertDidEnd: (NSAlert*) alert returnCode: (NSInteger) returnCode contextInfo: (void*) contextInfo 
    143143{ 
    144144        if (returnCode == NSOKButton) 
     
    172172        if (mDownloadTableView != nil) 
    173173        { 
    174                 int row = [mDownloadTableView selectedRow]; 
     174                NSInteger row = [mDownloadTableView selectedRow]; 
    175175                 
    176176                if (row > -1 && row < [mDownloads count]) 
     
    186186} 
    187187 
    188 - (int) downloadsInProgress 
     188- (NSInteger) downloadsInProgress 
    189189{ 
    190190        return mNumloads; 
     
    199199- (void) tableViewDoubleClick 
    200200{ 
    201         int row = [mDownloadTableView selectedRow]; 
     201        NSInteger row = [mDownloadTableView selectedRow]; 
    202202         
    203203        if (row > -1 && row < [mDownloads count]) 
     
    211211 
    212212 
    213 - (int) numberOfRowsInTableView: (NSTableView*) tableView 
     213- (NSInteger) numberOfRowsInTableView: (NSTableView*) tableView 
    214214{        
    215215        return [mDownloads count]; 
    216216} 
    217217 
    218 - (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) column row: (int) row 
     218- (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) column row: (NSInteger) row 
    219219{ 
    220220        id                              value           = nil; 
     
    236236#pragma mark - 
    237237 
    238 - (void) tableView: (NSTableView*) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn*) tableColumn row: (int) row 
     238- (void) tableView: (NSTableView*) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn*) tableColumn row: (NSInteger) row 
    239239{ 
    240240        [(NSCell*)cell setFont: [NSFont systemFontOfSize: 10.0]]; 
     
    366366        NSString*                       downloadedFilePath              = [downloadObject downloadedFilePath]; 
    367367        NSString*                       nameOfDownloadedFile    = [downloadedFilePath lastPathComponent]; 
    368         NSWorkspace*            workspace                               = [NSWorkspace sharedWorkspace]; 
    369368        NSFileManager*          fileManager                             = [NSFileManager defaultManager]; 
    370369         
     
    517516                                                        informativeTextWithFormat: @"You have %@ in progress.  Quitting will stop all downloads.  Do you still want to quit?", alertMessage]; 
    518517                 
    519                 int response = [downloadAlert runModal]; 
     518                NSInteger response = [downloadAlert runModal]; 
    520519                 
    521520                if (response == NSOKButton) 
  • Source/DBDownloadObject.h

    r1 r13  
    3636        DBDownloadStatus        mStatus; 
    3737         
    38         float                   mBytesLoaded; 
    39         float                   mExpectedLength; 
     38        CGFloat                 mBytesLoaded; 
     39        CGFloat                 mExpectedLength; 
    4040} 
    4141 
     
    5656 
    5757- (void) setURLResponse: (NSURLResponse*) response; 
    58 - (float) bytesLoaded; 
    59 - (void) setBytesLoaded: (float) bytes; 
    60 - (int) percentComplete; 
     58- (CGFloat) bytesLoaded; 
     59- (void) setBytesLoaded: (CGFloat) bytes; 
     60- (NSInteger) percentComplete; 
    6161 
    6262- (NSString *)stringStatus; 
  • Source/DBDownloadObject.m

    r1 r13  
    201201 
    202202 
    203 - (float) bytesLoaded 
     203- (CGFloat) bytesLoaded 
    204204{ 
    205205        return mBytesLoaded; 
    206206} 
    207207 
    208 - (void) setBytesLoaded: (float) bytes 
     208- (void) setBytesLoaded: (CGFloat) bytes 
    209209{ 
    210210        mBytesLoaded    = bytes; 
     
    212212} 
    213213 
    214 - (int) percentComplete 
    215 { 
    216         int percentComplete = (mBytesLoaded / (float) mExpectedLength) * 100.0; 
     214- (NSInteger) percentComplete 
     215{ 
     216        NSInteger percentComplete = (mBytesLoaded / (CGFloat) mExpectedLength) * 100.0; 
    217217         
    218218        if(percentComplete < 0) 
     
    240240                if (mExpectedLength != NSURLResponseUnknownLength) 
    241241                { 
    242                         fileSize                = [NSNumber numberWithInt: (mExpectedLength / 1024)]; // kilobytes 
     242                        //fileSize              = [NSNumber numberWithInt: (mExpectedLength / 1024)]; // kilobytes 
    243243                        stringStatus    = [NSString stringWithFormat: @"%i%%", [self percentComplete]]; 
    244244                } 
  • Source/DBHTMLParser.m

    r1 r13  
    6161        NSScanner*              linkScanner                     = [NSScanner scannerWithString: HTMLString]; 
    6262        NSCharacterSet* quotesCharacterSet      = [NSCharacterSet characterSetWithCharactersInString: kQuoteCharacters]; 
    63         int                             lengthOfHTMLString      = [HTMLString length]; 
    64         int                             lengthOfAOpen           = [kAOpen length]; 
    65         int                             lengthOfHREF            = [kHREF length];        
     63        NSInteger                               lengthOfHTMLString      = [HTMLString length]; 
     64        NSInteger                               lengthOfAOpen           = [kAOpen length]; 
     65        NSInteger                               lengthOfHREF            = [kHREF length];        
    6666         
    6767        while (![linkScanner isAtEnd]) 
    6868        { 
    6969                NSString*       intoString                              = nil; 
    70                 int                     scanLocation                    = [linkScanner scanLocation]; 
    71                 int                     lengthOfRemainingString = lengthOfHTMLString - scanLocation; 
     70                NSInteger                       scanLocation                    = [linkScanner scanLocation]; 
     71                NSInteger                       lengthOfRemainingString = lengthOfHTMLString - scanLocation; 
    7272                 
    7373                NSRange         rangeOfAOpen                    = NSMakeRange(scanLocation, lengthOfAOpen); 
     
    167167- (NSString*) pReplaceHTMLCodesInString: (NSString*) HTMLString 
    168168{ 
    169         NSMutableString*        newString               = [[HTMLString mutableCopy] autorelease]; 
    170         NSRange                         currentRange    = NSMakeRange(NSNotFound, 0); 
     169        NSMutableString* newString = [[HTMLString mutableCopy] autorelease]; 
     170        NSRange currentRange; 
    171171         
    172172         
  • Source/DBHistoryController.h

    r1 r13  
    1818        id                      view; 
    1919        WebHistory*     webHistory; 
    20         int                     numberOfDaysToDisplay; 
     20        NSInteger                       numberOfDaysToDisplay; 
    2121} 
    2222 
     
    3838 
    3939// History View 
    40 - (int) numberOfDates; 
    41 - (int) numberOfItemsForDate: (NSCalendarDate*) date; 
    42 - (int) numberOfRows; 
    43 - (BOOL) isDateAtIndex: (int) index; 
    44 - (NSCalendarDate*) dateAtIndex: (int) index; 
    45 - (id) itemAtIndex: (int) index; 
    46 - (id) objectForDate: (NSCalendarDate*) date index: (int) index; 
    47 - (void) rowClicked: (int) row; 
     40- (NSInteger) numberOfDates; 
     41- (NSInteger) numberOfItemsForDate: (NSCalendarDate*) date; 
     42- (NSInteger) numberOfRows; 
     43- (BOOL) isDateAtIndex: (NSInteger) index; 
     44- (NSCalendarDate*) dateAtIndex: (NSInteger) index; 
     45- (id) itemAtIndex: (NSInteger) index; 
     46- (id) objectForDate: (NSCalendarDate*) date index: (NSInteger) index; 
     47- (void) rowClicked: (NSInteger) row; 
    4848 
    4949- (NSMenu *)menuForHistory; 
  • Source/DBHistoryController.m

    r2 r13  
    196196- (void) loadSelected 
    197197{ 
    198         int selectedRow = [view selectedRow]; 
     198        NSInteger selectedRow = [view selectedRow]; 
    199199 
    200200        if(selectedRow > -1) 
     
    214214- (void) removeSelected 
    215215{ 
    216         int                     selectedRow             = [view selectedRow] - 1; 
     216        NSInteger                       selectedRow             = [view selectedRow] - 1; 
    217217        NSArray*        itemsToRemove   = nil; 
    218218         
     
    289289// 
    290290 
    291 - (int) numberOfDates 
    292 { 
    293         int number; 
     291- (NSInteger) numberOfDates 
     292{ 
     293        NSInteger number; 
    294294         
    295295        number = [[webHistory orderedLastVisitedDays] count]; 
     
    303303// 
    304304 
    305 - (int) numberOfRows 
    306 { 
    307         int                             number          = 0; 
     305- (NSInteger) numberOfRows 
     306{ 
     307        NSInteger                               number          = 0; 
    308308        NSArray*                dates           = [webHistory orderedLastVisitedDays]; 
    309309        NSCalendarDate* currentDate     = nil; 
    310310         
    311         int i; 
     311        NSInteger i; 
    312312        for(i = 0; i < [dates count]; i++) 
    313313        { 
     
    326326// 
    327327 
    328 - (int) numberOfItemsForDate: (NSCalendarDate*) date 
    329 { 
    330         int number; 
     328- (NSInteger) numberOfItemsForDate: (NSCalendarDate*) date 
     329{ 
     330        NSInteger number; 
    331331         
    332332        number = [[webHistory orderedItemsLastVisitedOnDay: date] count]; 
     
    340340// 
    341341 
    342 - (BOOL) isDateAtIndex: (int) index 
     342- (BOOL) isDateAtIndex: (NSInteger) index 
    343343{ 
    344344        BOOL isDate                     = NO; 
    345345         
    346346        NSMutableArray* dateIndexes = [[NSMutableArray alloc] init]; 
    347         int currentIndex                = 0; 
    348          
    349         int i; 
     347        NSInteger currentIndex          = 0; 
     348         
     349        NSInteger i; 
    350350        for(i = 0; i < [self numberOfDates]; i++) 
    351351        { 
    352352                [dateIndexes addObject: [NSNumber numberWithInt: currentIndex]]; 
    353353                 
    354                 int j;           
     354                NSInteger j;             
    355355                for(j = 0; j < [self numberOfItemsForDate: [self dateAtIndex: i]]; j++) 
    356356                { 
     
    380380// 
    381381 
    382 - (NSCalendarDate*) dateAtIndex: (int) index 
     382- (NSCalendarDate*) dateAtIndex: (NSInteger) index 
    383383{ 
    384384        NSCalendarDate* date    = nil; 
     
    395395// 
    396396 
    397 - (id) itemAtIndex: (int) index 
     397- (id) itemAtIndex: (NSInteger) index 
    398398{ 
    399399        id                              item                    = nil; 
    400400         
    401         int                             currentIndex    = -1; 
     401        NSInteger                               currentIndex    = -1; 
    402402        NSArray*                dates                   = [webHistory orderedLastVisitedDays]; 
    403403        NSArray*                currentItems    = nil; 
     
    407407        if(index > -1) 
    408408        { 
    409                 int i; 
     409                NSInteger i; 
    410410                for(i = 0; i < [dates count]; i++) 
    411411                { 
     
    421421                        currentItems    = [webHistory orderedItemsLastVisitedOnDay: currentDate]; 
    422422                         
    423                         int j; 
     423                        NSInteger j; 
    424424                        for(j = 0; j < [currentItems count]; j++) 
    425425                        { 
     
    444444// 
    445445 
    446 - (id) objectForDate: (NSCalendarDate*) date index: (int) index 
     446- (id) objectForDate: (NSCalendarDate*) date index: (NSInteger) index 
    447447{ 
    448448        NSArray*                items           = nil; 
     
    475475// 
    476476 
    477 - (void) rowClicked: (int) row 
     477- (void) rowClicked: (NSInteger) row 
    478478{ 
    479479        if(row > -1 && ![self isDateAtIndex: row]) 
  • Source/DBHistoryView.h

    r1 r13  
    1616        NSColor*                                selectedTextColor; 
    1717        NSColor*                                finishedTextColor; 
    18         int                                             textSize; 
    19         int                                             selectedRow; 
     18        NSInteger                                               textSize; 
     19        NSInteger                                               selectedRow; 
    2020        NSMutableDictionary*    textAttributes; 
    21         float                                           rowHeight; 
    22         float                                           topPadding; 
     21        CGFloat                                         rowHeight; 
     22        CGFloat                                         topPadding; 
    2323} 
    2424 
     
    2727// 
    2828 
    29 - (NSString*) string: (NSString*) string withAttributes: (NSDictionary*) attributes constrainedToWidth: (float) width; 
     29- (NSString*) string: (NSString*) string withAttributes: (NSDictionary*) attributes constrainedToWidth: (CGFloat) width; 
    3030- (void) setTextColor: (NSColor*) color; 
    31 - (void) setTextSize: (int) size; 
     31- (void) setTextSize: (NSInteger) size; 
    3232 
    3333// 
    34 - (int) selectedRow; 
     34- (NSInteger) selectedRow; 
    3535- (void) updateSelectedRow; 
    3636- (void) reloadData; 
  • Source/DBHistoryView.m

    r1 r13  
    9191                NSRect                  pageArea                        = NSMakeRect(displayArea.origin.x + 20, displayArea.origin.y, displayArea.size.width - 20, displayArea.size.height); 
    9292                 
    93                 int                             dates                           = [delegate numberOfDates]; 
    94                  
    95                 int                             itemsForCurrentDate     = 0; 
    96                 int                             currentDrawRow          = 1; 
     93                NSInteger                               dates                           = [delegate numberOfDates]; 
     94                 
     95                NSInteger                               itemsForCurrentDate     = 0; 
     96                NSInteger                               currentDrawRow          = 1; 
    9797                NSCalendarDate* currentDate                     = nil; 
    9898                NSString*               pageString                      = nil; 
    9999                NSString*               dateString                      = nil; 
    100100 
    101                 int i; 
    102                 int j; 
     101                NSInteger i; 
     102                NSInteger j; 
    103103 
    104104                // Draw history items 
     
    150150////------------------------------------------------- 
    151151 
    152 - (NSString*) string: (NSString*) string withAttributes: (NSDictionary*) attributes constrainedToWidth: (float) width 
     152- (NSString*) string: (NSString*) string withAttributes: (NSDictionary*) attributes constrainedToWidth: (CGFloat) width 
    153153{ 
    154154        NSString*       fixedString             = string; 
     
    158158        if(stringSize.width > width) 
    159159        { 
    160                 int i = [string length]; 
     160                NSInteger i = [string length]; 
    161161                while([currentString sizeWithAttributes: attributes].width > width) 
    162162                { 
     
    197197////------------------------------------------------- 
    198198 
    199 - (void) setTextSize: (int) size 
     199- (void) setTextSize: (NSInteger) size 
    200200{ 
    201201        textSize = size; 
     
    213213        if(delegate != nil) 
    214214        { 
    215                 NSPoint origin          = [self frame].origin; 
    216215                NSPoint clickPoint      = [self convertPoint: [theEvent locationInWindow] fromView: nil]; 
    217                 float   clickPointY     = (([self frame].origin.y + [self frame].size.height) - 5) - clickPoint.y; 
     216                CGFloat clickPointY     = (([self frame].origin.y + [self frame].size.height) - 5) - clickPoint.y; 
    218217                 
    219218                selectedRow                     = ceil(clickPointY / rowHeight); 
     
    243242- (void) keyDown: (NSEvent*) theEvent 
    244243{ 
    245         int             row                     = [self selectedRow]; 
    246         int             keyCode         = [theEvent keyCode]; 
     244        NSInteger               row                     = [self selectedRow]; 
     245        NSInteger               keyCode         = [theEvent keyCode]; 
    247246        unichar character       = [DBKeyStuff characterForKeyCode: keyCode]; 
    248247 
     
    267266                [self updateSelectedRow]; 
    268267                 
    269                 float newHeight = ([delegate numberOfRows] * rowHeight); 
     268                CGFloat newHeight = ([delegate numberOfRows] * rowHeight); 
    270269                 
    271270                if ([[self enclosingScrollView] frame].size.height > newHeight) 
     
    284283} 
    285284 
    286 - (int) selectedRow 
     285- (NSInteger) selectedRow 
    287286{ 
    288287        return selectedRow; 
     
    291290- (void) updateSelectedRow 
    292291{ 
    293         int numberOfRows = [delegate numberOfRows]; 
     292        NSInteger numberOfRows = [delegate numberOfRows]; 
    294293         
    295294        if(selectedRow > numberOfRows - 1 || [delegate isDateAtIndex: selectedRow - 1]) 
  • Source/DBKeyStuff.h

    r1 r13  
    2121 
    2222+ (unichar) characterForKeyCode: (unsigned short) keyCode; 
    23 + (NSString*) stringForKeyCode: (unsigned short) keyCode modifiers: (unsigned int) modifiers; 
    24 + (NSString*) stringForModifiers: (unsigned int) modifiers; 
     23+ (NSString*) stringForKeyCode: (unsigned short) keyCode modifiers: (NSUInteger) modifiers; 
     24+ (NSString*) stringForModifiers: (NSUInteger) modifiers; 
    2525+ (NSString*) stringForKeyCode: (unsigned short) keyCode; 
    2626 
  • Source/DBKeyStuff.m

    r1 r13  
    9494// -------------------------------------- 
    9595 
    96 + (NSString*) stringForKeyCode: (unsigned short) keyCode modifiers: (unsigned int) modifiers 
     96+ (NSString*) stringForKeyCode: (unsigned short) keyCode modifiers: (NSUInteger) modifiers 
    9797{ 
    9898        NSString*       result          = nil; 
     
    457457// -------------------------------------- 
    458458 
    459 + (NSString*) stringForModifiers: (unsigned int) modifiers 
     459+ (NSString*) stringForModifiers: (NSUInteger) modifiers 
    460460{ 
    461461        NSMutableString*        stringResult = [NSMutableString string]; 
  • Source/DBKeychainAccess.m

    r1 r13  
    5858{ 
    5959        NSString*       password                        = nil; 
    60         int                     numberOfAttributes      = (name != nil) + (account != nil); 
     60        NSInteger                       numberOfAttributes      = (name != nil) + (account != nil); 
    6161         
    6262        if (numberOfAttributes > 0) 
     
    6767                SecKeychainAttribute            attributes[numberOfAttributes]; 
    6868                 
    69                 int index = 0; 
     69                NSInteger index = 0; 
    7070                 
    7171                if (name != nil) 
  • Source/DBLeveledWindow.m

    r1 r13  
    1313 
    1414 
    15 - (id) initWithContentRect: (NSRect) contentRect styleMask: (unsigned int) styleMask backing: (NSBackingStoreType) backingType defer: (BOOL) flag 
     15- (id) initWithContentRect: (NSRect) contentRect styleMask: (NSUInteger) styleMask backing: (NSBackingStoreType) backingType defer: (BOOL) flag 
    1616{ 
    1717        if (self = [super initWithContentRect: contentRect styleMask: styleMask backing: backingType defer: flag]) 
     
    4545- (void) windowLevelChanged: (NSNotification*) notification 
    4646{ 
    47         int windowLevel = [DBWindowLevel windowLevel]; 
     47        NSInteger windowLevel = [DBWindowLevel windowLevel]; 
    4848         
    4949        if (mAboveMainWindowLevel) 
  • Source/DBLocationTextFieldCell.m

    r5 r13  
    151151#pragma mark - 
    152152 
    153 - (void) selectWithFrame: (NSRect) frame inView: (NSView*) controlView editor: (NSText*) editor delegate: (id) delegate start: (int) selStart length: (int) selLength 
     153- (void) selectWithFrame: (NSRect) frame inView: (NSView*) controlView editor: (NSText*) editor delegate: (id) delegate start: (NSInteger) selStart length: (NSInteger) selLength 
    154154{ 
    155155    [super selectWithFrame: [self textRectForFrame: frame] inView: controlView editor: editor delegate: delegate start: selStart length: selLength]; 
  • Source/DBPreferenceController.h

    r1 r13  
    6464- (IBAction) changeDownloadLocation: (id) sender; 
    6565 
    66 - (void) setLevel: (int) newLevel; 
     66- (void) setLevel: (NSInteger) newLevel; 
    6767- (void) syncViewWithUserPrefs; 
    6868 
  • Source/DBPreferenceController.m

    r12 r13  
    1010#import "DBHotKeyController.h" 
    1111 
    12 int stateFromBool(BOOL aBool); // declaration 
    13 int oppositeBoolInt(int bi); 
    14 int stateFromBool(BOOL aBool) { 
     12NSInteger stateFromBool(BOOL aBool); // declaration 
     13NSInteger oppositeBoolInt(NSInteger bi); 
     14NSInteger stateFromBool(BOOL aBool) { 
    1515        if (aBool) { 
    1616                return NSOnState; 
     
    2020} 
    2121 
    22 int oppositeBoolInt(int bi) { 
     22NSInteger oppositeBoolInt(NSInteger bi) { 
    2323        if (bi == 0) 
    2424                return 1; 
     
    286286        if(defaultPrefs) 
    287287        { 
    288                 userDefaults = [NSUserDefaults standardUserDefaults]; 
     288                //userDefaults = [NSUserDefaults standardUserDefaults]; 
    289289                 
    290290                [showMenuBarAndDock setState:   [[defaultPrefs valueForKey: kShowMenuBarAndDock] boolValue]]; 
     
    417417// ----------------------------------- 
    418418 
    419 - (void) setLevel: (int) newLevel 
     419- (void) setLevel: (NSInteger) newLevel 
    420420{ 
    421421        [[self window]                  setLevel: newLevel]; 
     
    441441} 
    442442 
    443 - (void) openPanelDidEnd: (NSOpenPanel*) sheet returnCode: (int) returnCode contextInfo: (void*) contextInfo 
     443- (void) openPanelDidEnd: (NSOpenPanel*) sheet returnCode: (NSInteger) returnCode contextInfo: (void*) contextInfo 
    444444{ 
    445445        if (sheet != nil && returnCode == NSOKButton) 
  • Source/DBQuickDownload.h

    r1 r13  
    2222        WebDownload *download; 
    2323         
    24         int receivedContentLength; 
    25         int expectedContentLength; 
     24        NSInteger receivedContentLength; 
     25        NSInteger expectedContentLength; 
    2626         
    2727        NSString *_filename; 
  • Source/DBQuickDownload.m

    r1 r13  
    112112    } else { 
    113113        NSSavePanel *sp = [NSSavePanel savePanel]; 
    114                 int returnCode = [sp runModalForDirectory:NSHomeDirectory() file:filename]; 
     114                NSInteger returnCode = [sp runModalForDirectory:NSHomeDirectory() file:filename]; 
    115115                if (returnCode == NSOKButton) { 
    116116                        [download setDestination:[sp filename] allowOverwrite:YES]; 
  • Source/DBSlideWindow.h

    r1 r13  
    2525{ 
    2626        BOOL            snapsToEdges;           /* whether or not the window snaps to edges */ 
    27     float               snapTolerance;  /* distance from edge within which snapping occurs */ 
     27    CGFloat             snapTolerance;  /* distance from edge within which snapping occurs */ 
    2828    BOOL                snapping;               /* whether we're currently snapping to an edge */ 
    2929    NSPoint             dragStartLocation;      /* keeps track of last drag's mousedown point */ 
    30     float               padding; 
    31         float           minWidth; 
     30    CGFloat             padding; 
     31        CGFloat         minWidth; 
    3232        NSSize          clickDistanceFromWindowEdge; 
    3333        DBDragMode      currentDragMode; 
  • Source/DBSlideWindow.m

    r1 r13  
    99@implementation DBSlideWindow 
    1010 
    11 typedef int CGSConnection; 
    12 typedef int CGSWindow; 
     11typedef NSInteger CGSConnection; 
     12typedef NSInteger CGSWindow; 
    1313extern CGSConnection _CGSDefaultConnection(); 
    14 extern OSStatus CGSGetWindowTags(const CGSConnection cid, const CGSWindow wid, int *tags, int thirtyTwo); 
    15 extern OSStatus CGSSetWindowTags(const CGSConnection cid, const CGSWindow wid, int *tags, int thirtyTwo); 
    16 extern OSStatus CGSClearWindowTags(const CGSConnection cid, const CGSWindow wid, int *tags, int thirtyTwo); 
     14extern OSStatus CGSGetWindowTags(const CGSConnection cid, const CGSWindow wid, NSInteger *tags, NSInteger thirtyTwo); 
     15extern OSStatus CGSSetWindowTags(const CGSConnection cid, const CGSWindow wid, NSInteger *tags, NSInteger thirtyTwo); 
     16extern OSStatus CGSClearWindowTags(const CGSConnection cid, const CGSWindow wid, NSInteger *tags, NSInteger thirtyTwo); 
    1717 
    1818- (void)setSticky:(BOOL)flag { 
    1919        CGSConnection connectionID = _CGSDefaultConnection(); 
    2020        CGSWindow winNumber = [self windowNumber]; 
    21         int allTags[0]; 
    22         int theTags[2] = {0x0002, 0}; 
     21        NSInteger allTags[0]; 
     22        NSInteger theTags[2] = {0x0002, 0}; 
    2323         
    2424        if(!CGSGetWindowTags(connectionID, winNumber, allTags, 32)) { 
     
    3333#pragma mark - 
    3434 
    35 - (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag { 
     35- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag { 
    3636    if(self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]) 
    3737        { 
     
    316316{ 
    317317        NSUserDefaults* userDefaults    = [NSUserDefaults standardUserDefaults]; 
    318         float                   y                               = [[userDefaults objectForKey: kSlideWindowY]           floatValue]; 
    319         float                   width                   = [[userDefaults objectForKey: kSlideWindowWidth]       floatValue]; 
    320         float                   height                  = [[userDefaults objectForKey: kSlideWindowHeight]      floatValue];     
     318        CGFloat                 y                               = [[userDefaults objectForKey: kSlideWindowY]           floatValue]; 
     319        CGFloat                 width                   = [[userDefaults objectForKey: kSlideWindowWidth]       floatValue]; 
     320        CGFloat                 height                  = [[userDefaults objectForKey: kSlideWindowHeight]      floatValue];     
    321321         
    322322        NSRect                  newFrame                = NSMakeRect(-width, y, width, height); 
     
    333333{ 
    334334        NSRect  frame           = [self frame]; 
    335         NSRect  newFrame        = frame; 
     335        NSRect  newFrame        = NSZeroRect; 
    336336        NSPoint origin          = frame.origin; 
    337337        NSSize  size            = frame.size; 
  • Source/DBStatusItemController.m

    r1 r13  
    6363        [websp autorelease]; 
    6464         
    65         return menu; 
     65        return [menu autorelease]; 
    6666} 
    6767 
  • Source/DBSystemProfiler.m

    r1 r13  
    1313        CFTypeID propID; 
    1414        UInt8 *data; 
    15         unsigned int i, bufSize; 
     15        NSUInteger i, bufSize; 
    1616        UInt8 *s, *t; 
    1717        UInt8 firstPart[64], secondPart[64]; 
  • Source/DBTab.m

    r6 r13  
    243243- (void) drawTabInRect: (NSRect) rect 
    244244{ 
    245         NSRect  frame                           = [self frame]; 
    246         NSSize  size                            = frame.size; 
    247         NSPoint origin                          = frame.origin; 
     245        //NSRect        frame                           = [self frame]; 
     246        //NSSize        size                            = frame.size; 
     247        //NSPoint       origin                          = frame.origin; 
    248248         
    249249        NSColor* bgColor = [NSColor colorWithCalibratedWhite:0.75 alpha:1.0]; 
     
    261261        [[NSGraphicsContext currentContext] restoreGraphicsState]; 
    262262         
    263         /*float newFillWidth            = size.width - ([selectedTabLeft size].width + [selectedTabRight size].width); 
     263        /*CGFloat       newFillWidth            = size.width - ([selectedTabLeft size].width + [selectedTabRight size].width); 
    264264         
    265265         
     
    363363         
    364364        NSRect  bounds                  = [self bounds]; 
    365         float   topOfTabImage   = bounds.size.height; 
     365        //CGFloat       topOfTabImage   = bounds.size.height; 
    366366         
    367367        /*if (selected) 
     
    410410        { 
    411411                NSMutableDictionary*    labelAttributes = [NSMutableDictionary dictionary]; 
    412                 float                                   drawY                   = 5; 
     412                CGFloat                                 drawY                   = 5; 
    413413                 
    414414                [labelAttributes setValue: [NSFont systemFontOfSize: 11] forKey: NSFontAttributeName]; 
     
    416416                 
    417417                NSString*       stringToDraw    = [label truncatedToWidth: rect.size.width withAttributes: labelAttributes]; 
    418                 NSSize          stringSize              = [stringToDraw sizeWithAttributes: labelAttributes]; 
     418                //NSSize                stringSize              = [stringToDraw sizeWithAttributes: labelAttributes]; 
    419419                NSPoint         drawPoint               = NSMakePoint(rect.origin.x, rect.origin.y + drawY); 
    420420                 
     
    484484         
    485485        NSPoint mouseLocation   = [[self window] mouseLocationOutsideOfEventStream]; 
    486     NSRect      boundsInWindow  = [self convertRect: [self bounds] toView: nil]; 
    487         NSRect  bounds                  = [self bounds]; 
     486    //NSRect    boundsInWindow  = [self convertRect: [self bounds] toView: nil]; 
     487        //NSRect        bounds                  = [self bounds]; 
    488488        NSRect  trackingRect    = [self rectForCloseButton]; 
    489489         
     
    538538        { 
    539539                NSPoint         clickPoint      = [self convertPoint: [theEvent locationInWindow] fromView: nil]; 
    540                 NSPoint         origin          = [self frame].origin; 
     540                //NSPoint               origin          = [self frame].origin; 
    541541                 
    542542                if ([self pointInCloseButton: clickPoint]) 
     
    563563        { 
    564564                NSPoint         clickPoint      = [self convertPoint: [theEvent locationInWindow] fromView: nil]; 
    565                 NSPoint         origin          = [self frame].origin; 
     565                //NSPoint               origin          = [self frame].origin; 
    566566                 
    567567                if ([self pointInCloseButton: clickPoint]) 
  • Source/DBTabController.h

    r1 r13  
    1919        WebView*                defaultWebView; 
    2020         
    21         float                   tabWidth; 
     21        CGFloat                 tabWidth; 
    2222} 
    2323 
     
    4444- (DBTabBar *)tabBar; 
    4545 
    46 - (int)tabCount; 
     46- (NSInteger)tabCount; 
    4747 
    4848- (void)reloadTab; 
  • Source/DBTabController.m

    r1 r13  
    146146                DBTab *currentTab; 
    147147                DBTab *newTab; 
    148                 int i; 
    149                 int indexOfTab                  = [tabs indexOfObject: tab]; 
    150                 int selectedTab                 = [tabs indexOfObject: [self selectedTab]]; 
    151                 int     indexOfTabToSelect      = selectedTab; 
     148                NSInteger i; 
     149                NSInteger indexOfTab                    = [tabs indexOfObject: tab]; 
     150                NSInteger selectedTab                   = [tabs indexOfObject: [self selectedTab]]; 
     151                NSInteger       indexOfTabToSelect      = selectedTab; 
    152152                 
    153153                if (indexOfTab != NSNotFound) 
     
    194194        NSMutableArray* tabsToRemove    = [[NSMutableArray alloc] init]; 
    195195         
    196         int i; 
     196        NSInteger i; 
    197197        for(i = 0; i < [tabs count]; i++) 
    198198        { 
     
    217217- (void) updateTabSize 
    218218{ 
    219         float tabWidthToFit = [tabBar frame].size.width / [tabs count]; 
     219        CGFloat tabWidthToFit = [tabBar frame].size.width / [tabs count]; 
    220220                 
    221221        if (tabWidth >= tabWidthToFit) 
     
    244244        newSize = NSMakeSize(tabWidth, 29); 
    245245         
    246         int i; 
     246        NSInteger i; 
    247247        for(i = 0; i < [tabs count]; i++) 
    248248        { 
     
    259259{ 
    260260        BOOL    canFit                  = YES; 
    261         float   tabWidthToFit   = [tabBar frame].size.width / [tabs count]; 
     261        CGFloat tabWidthToFit   = [tabBar frame].size.width / [tabs count]; 
    262262         
    263263        if (tabWidthToFit < 50.0) 
     
    276276        DBTab*                  currentTab = nil; 
    277277         
    278         int i; 
     278        NSInteger i; 
    279279        for(i = 0; i < [tabs count]; i++) 
    280280        { 
     
    313313- (void) selectTabRight 
    314314{ 
    315         int             indexOfTabToSelect; 
     315        NSInteger               indexOfTabToSelect; 
    316316        DBTab*  tabToSelect                     = nil; 
    317317        DBTab*  selectedTab                     = [self selectedTab]; 
    318         int             indexOfSelectedTab      = [tabs indexOfObject: selectedTab]; 
    319         int             tabCount                        = [tabs count]; 
     318        NSInteger               indexOfSelectedTab      = [tabs indexOfObject: selectedTab]; 
     319        NSInteger               tabCount                        = [tabs count]; 
    320320         
    321321        if (tabCount > 1) 
     
    344344- (void) selectTabLeft 
    345345{ 
    346         int             indexOfTabToSelect; 
     346        NSInteger               indexOfTabToSelect; 
    347347        DBTab*  tabToSelect                     = nil; 
    348348        DBTab*  selectedTab                     = [self selectedTab]; 
    349         int             indexOfSelectedTab      = [tabs indexOfObject: selectedTab]; 
    350         int             tabCount                        = [tabs count]; 
     349        NSInteger               indexOfSelectedTab      = [tabs indexOfObject: selectedTab]; 
     350        NSInteger               tabCount                        = [tabs count]; 
    351351         
    352352        if (tabCount > 1) 
     
    376376        DBTab           *currentTab = nil; 
    377377        DBTab           *returnTab      = nil; 
    378         int i; 
     378        NSInteger i; 
    379379        for(i = 0; i < [tabs count]; i++) { 
    380380                currentTab = [tabs objectAtIndex: i]; 
     
    395395        DBTab*  currentTab              = nil; 
    396396         
    397         int i; 
     397        NSInteger i; 
    398398        for(i = 0; i < [tabs count]; i++) 
    399399        { 
    400                 currentTab = [tabs objectAtIndex: i]; 
    401                  
    402400                if (webView == [[tabView tabViewItemAtIndex: i] view]) 
    403401                { 
     
    410408} 
    411409 
    412 - (int)tabCount { 
     410- (NSInteger)tabCount { 
    413411        return [tabs count]; 
    414412} 
     
    416414- (void)reloadTab { 
    417415        DBTab *sel = [self selectedTab]; 
    418         int i; 
    419         int index = -1; 
     416        NSInteger i; 
     417        NSInteger index = -1; 
    420418        for (i=0; i<[tabs count]; i++) { 
    421419                if (sel == [tabs objectAtIndex:i]) { 
     
    432430 
    433431- (void)reloadAllTabs { 
    434         int i; 
     432        NSInteger i; 
    435433        WebView *wv; 
    436434        for (i=0; i<[tabs count]; i++) { 
  • Source/DBURLFormatter.m

    r1 r13  
    7171                                // there is no dot (ie: http://google ) 
    7272                                // add www 
    73                                 int loc = [newURL rangeOfString:@"//"].location; 
     73                                NSInteger loc = [newURL rangeOfString:@"//"].location; 
    7474                                loc += 2; // skip past the slashes 
    7575                                NSString *scheme = [newURL substringToIndex:loc]; 
  • Source/DBViewSourceWindowController.m

    r1 r13  
    77#import "DBViewSourceWindowController.h" 
    88 
    9 static int coloring = 0; 
     9static NSInteger coloring = 0; 
    1010 
    1111@implementation DBViewSourceWindowController 
     
    5858 
    5959//      Feel free to change the style of this method as you like, since you made the class 
    60 - (void) savePanelDidEnd: (NSSavePanel*) sheet returnCode: (int) returnCode contextInfo: (void*) contextInfo 
     60- (void) savePanelDidEnd: (NSSavePanel*) sheet returnCode: (NSInteger) returnCode contextInfo: (void*) contextInfo 
    6161{ 
    6262        if (sheet != nil && returnCode == NSOKButton) 
     
    108108    [[sourceView textStorage] removeAttribute:NSForegroundColorAttributeName range:range]; 
    109109     
    110     int ixLeft, ixRight; 
     110    NSInteger ixLeft, ixRight; 
    111111    NSDictionary *attsToUse; 
    112112    NSString *tagType; 
     
    118118        [scanner scanUpToString: @"<" intoString: nil]; 
    119119        ixLeft = [scanner scanLocation]; 
    120                 ixRight = [scanner scanLocation]; 
     120                //ixRight = [scanner scanLocation]; 
    121121         
    122122        if ((ixLeft+3) <= [source length]) { 
  • Source/DBWebsposePassword.m

    r1 r13  
    2424        // Get password from the keychain 
    2525         
    26         password = [[keychain passwordFromKeychainWithName: webpsosePasswordKeychainName account: webpsosePasswordKeychainAccount] retain]; 
     26        password = [keychain passwordFromKeychainWithName: webpsosePasswordKeychainName account: webpsosePasswordKeychainAccount]; 
    2727                 
    2828        if (password == nil) 
  • Source/DBWebsposeWindow.m

    r1 r13  
    1111 
    1212 
    13 - (id) initWithContentRect: (NSRect) contentRect styleMask: (unsigned int) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag 
     13- (id) initWithContentRect: (NSRect) contentRect styleMask: (NSUInteger) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag 
    1414{ 
    1515        if(self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: NO]) 
  • Source/DBWindowLevel.h

    r1 r13  
    1616} 
    1717 
    18 + (int) windowLevel; 
    19 + (void) setWindowLevel: (int) level; 
     18+ (NSInteger) windowLevel; 
     19+ (void) setWindowLevel: (NSInteger) level; 
    2020 
    2121@end 
  • Source/DBWindowLevel.m

    r1 r13  
    88 
    99 
    10 static int sWindowLevel; 
     10static NSInteger sWindowLevel; 
    1111 
    1212@implementation DBWindowLevel 
    1313 
    1414 
    15 + (int) windowLevel 
     15+ (NSInteger) windowLevel 
    1616{ 
    1717        return sWindowLevel; 
    1818} 
    1919 
    20 + (void) setWindowLevel: (int) level 
     20+ (void) setWindowLevel: (NSInteger) level 
    2121{ 
    2222        BOOL isDifferentLevel = (level != sWindowLevel); 
  • Source/DeskBrowseConstants.h

    r1 r13  
    3636extern  NSString*       kPathToDefaultPrefsFile; 
    3737 
    38 extern  float           kCurrentVersionNumber; 
     38extern  CGFloat         kCurrentVersionNumber; 
    3939 
    4040typedef enum _KeyCombination 
  • Source/DeskBrowseConstants.m

    r1 r13  
    3636NSString*       kPathToDefaultPrefsFile = @"/Contents/Resources/com.SGS-Software.DeskBrowse.DefaultPreferences.plist"; 
    3737 
    38 float           kCurrentVersionNumber   = 1.4; 
     38CGFloat         kCurrentVersionNumber   = 1.4; 
  • Source/DeskBrowseController.h

    r1 r13  
    7878        NSString                                                *homePage; // the home page 
    7979        BOOL                                                    windowIsVisible; // used to keep track of whether the window is already slide out or not 
    80         //float                                                 padding; // added to the zero cord to position the window (TEMORARY) 
     80        //CGFloat                                                       padding; // added to the zero cord to position the window (TEMORARY) 
    8181         
    8282        BOOL spinnerEnabled; 
     
    189189- (void)viewPageSource; 
    190190- (void) updateButtons; 
    191 - (WebView*) newWebView; 
     191- (WebView*) createWebView; 
    192192- (void) tabChanged: (NSNotification*) notification; 
    193193- (BOOL)actionMenuVisible; 
  • Source/DeskBrowseController.m

    r6 r13  
    7070        // that they will receive. 
    7171         
    72         if (self = [DeskBrowseController class]) 
     72        if (self == [DeskBrowseController class]) 
    7373        { 
    7474                NSUserDefaults*                 userDefaults    = [NSUserDefaults standardUserDefaults]; 
     
    214214        tabController = [[DBTabController alloc] initWithTabBar: tabBar tabView: tabView]; 
    215215         
    216         [tabController setDefaultWebView: [self newWebView]]; 
     216        [tabController setDefaultWebView: [self createWebView]]; 
    217217         
    218218         
     
    269269{ 
    270270        NSTabViewItem*  firstTab        = [tabView tabViewItemAtIndex: 0]; 
    271         WebView*                newWebView      = [self newWebView]; 
     271        WebView*                newWebView      = [self createWebView]; 
    272272         
    273273        [firstTab setView: newWebView]; 
     
    294294 
    295295- (void)handleNewTabRequest:(NSNotification *)notification { 
    296         WebView *newWebView = [self newWebView]; 
     296        WebView *newWebView = [self createWebView]; 
    297297        if ([[NSUserDefaults standardUserDefaults] boolForKey:kSelectNewTabs]) 
    298298                [tabController newTabWithWebView:newWebView select:YES]; 
     
    379379                } 
    380380                [self setURLText:targetURL]; 
    381                 WebView *w = [self newWebView]; 
     381                WebView *w = [self createWebView]; 
    382382                [tabController newTabWithWebView:w select:YES]; 
    383383                DBTab* tab = [tabController tabWithWebView:w]; 
     
    422422        if ([[currentWebView mainFrame] dataSource] != nil || [[currentWebView mainFrame] provisionalDataSource] != nil) 
    423423        { 
    424                 webViewToLoadURL = [self newWebView]; 
     424                webViewToLoadURL = [self createWebView]; 
    425425                 
    426426                [tabController newTabWithWebView: webViewToLoadURL select: YES URLString: urlString]; 
     
    469469        BOOL isHidden = [bookmarkBar isHidden]; 
    470470         
    471         float height = [bookmarkBar frame].size.height; 
     471        CGFloat height = [bookmarkBar frame].size.height; 
    472472        NSRect wvf = [currentWebView frame]; 
    473473         
     
    629629        NSMenu*        mainMenu        = [NSApp mainMenu]; 
    630630        NSMenu*        appMenu            = [[mainMenu itemAtIndex: 0]  submenu]; 
    631         int            indexOfQuitItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(terminate:)]; 
    632                 int            indexOfHideItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(hide:)]; 
     631        NSInteger            indexOfQuitItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(terminate:)]; 
     632                NSInteger            indexOfHideItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(hide:)]; 
    633633                NSMenuItem*    quitMenuItem    = [appMenu itemAtIndex: indexOfQuitItem]; 
    634634                NSMenuItem*    hideMenuItem    = [appMenu itemAtIndex: indexOfHideItem]; 
     
    649649        NSMenu*        mainMenu        = [NSApp mainMenu]; 
    650650        NSMenu*        appMenu            = [[mainMenu itemAtIndex: 0]  submenu]; 
    651         int            indexOfQuitItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(terminate:)]; 
    652                 int            indexOfHideItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(hide:)]; 
     651        NSInteger            indexOfQuitItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(terminate:)]; 
     652                NSInteger            indexOfHideItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(hide:)]; 
    653653                NSMenuItem*    quitMenuItem    = [appMenu itemAtIndex: indexOfQuitItem]; 
    654654                NSMenuItem*    hideMenuItem    = [appMenu itemAtIndex: indexOfHideItem]; 
     
    675675        { 
    676676                DBTab*                  tab                     = [tabController tabWithWebView: currentWebView]; 
    677                 NSTextField*    field           = [self URLField]; 
    678677                NSURL*                  URL                     = [NSURL URLWithString: [DBURLFormatter formatAndReturnStringWithString: URLString]]; 
    679678                NSURLRequest*   URLRequest      = [NSURLRequest requestWithURL: URL cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: 60.0]; 
     
    812811 
    813812- (IBAction)loadURL:(id)sender { 
    814         DBTab*                  tab             = [tabController tabWithWebView: currentWebView]; 
     813        //DBTab*                        tab             = [tabController tabWithWebView: currentWebView]; 
    815814        NSTextField*    field   = [self URLField]; 
    816815        NSString *URLString; 
     
    879878                                // ip address 
    880879                                [self loadURLString:@"about:blank"]; 
    881                                 NSString *privateip = [NSString stringWithCString:GetPrivateIP()]; 
     880                                NSString *privateip = [NSString stringWithUTF8String:GetPrivateIP()]; 
    882881                                NSString *tmpFile = [NSString stringWithFormat:@"/Users/%@/.dbiptmp", NSUserName()]; 
    883882                                NSString *command = [NSString stringWithFormat:@"curl http://www.whatismyip.org -o \"%@\"", tmpFile]; 
     
    946945        if ([kw isEqualTo:slideWindow] || [kw isEqualTo:websposeWindow]) { 
    947946                NSSavePanel *sp = [NSSavePanel savePanel]; 
    948                 int result = NSCancelButton; 
     947                NSInteger result = NSCancelButton; 
    949948                NSString *file = nil; 
    950949                NSString *source = nil; 
     
    999998- (IBAction) addBookmark: (id) sender 
    1000999{ 
    1001         NSWindow*       currentWindow   = [self currentWindow]; 
    10021000        NSURL*          bookmarkURL             = nil; 
    10031001        NSString*       bookmarkTitle   = nil; 
     
    10761074        if (![[searchString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] isEqualToString:@""]) { 
    10771075                // if the search is not nothing, then: 
    1078                 NSString *query = [[NSString alloc] init]; 
    1079                  
    1080                 query = [[searchString componentsSeparatedByString:@" "] componentsJoinedByString:@"+"]; // replace spaces with pluses 
     1076                 
     1077                NSString* query = [[searchString componentsSeparatedByString:@" "] componentsJoinedByString:@"+"]; // replace spaces with pluses 
    10811078                query = [query stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; 
    10821079                query = [NSString stringWithFormat:@"http://www.google.com/search?q=%@", query]; 
    10831080                 
    10841081                [self loadURLString: query]; 
    1085                  
    1086                 [query release]; 
    10871082        } 
    10881083} 
     
    12411236 
    12421237- (IBAction)newBlankTab:(id)sender { 
    1243         WebView*                newView         = [self newWebView]; 
     1238        WebView*                newView         = [self createWebView]; 
    12441239        NSUserDefaults* defaults        = [NSUserDefaults standardUserDefaults]; 
    12451240         
     
    13861381                decisionListener:(id<WebPolicyDecisionListener>)listener { 
    13871382         
    1388         int modifierKeys = [[info objectForKey:WebActionModifierFlagsKey] intValue]; 
    1389         int actionType = [[info objectForKey:WebActionNavigationTypeKey] intValue]; 
     1383        NSInteger modifierKeys = [[info objectForKey:WebActionModifierFlagsKey] intValue]; 
     1384        NSInteger actionType = [[info objectForKey:WebActionNavigationTypeKey] intValue]; 
    13901385         
    13911386        if (actionType == WebNavigationTypeLinkClicked) { 
    1392                 WebView *new = [self newWebView]; 
     1387                WebView *new = [self createWebView]; 
    13931388                if (modifierKeys & NSCommandKeyMask) { 
    13941389                        [tabController newTabWithWebView:new select:YES]; 
     
    14581453*/ 
    14591454 
    1460 - (WebView*) newWebView 
     1455- (WebView*) createWebView 
    14611456{ 
    14621457        WebView*                newWebView      = [[[WebView alloc] initWithFrame: [tabView frame]] autorelease]; 
     
    17421737                if ([[currentWebView mainFrame] dataSource] != nil || [[currentWebView mainFrame] provisionalDataSource] != nil) 
    17431738                { 
    1744                         WebView*                newWebView                      = [self newWebView]; 
     1739                        WebView*                newWebView                      = [self createWebView]; 
    17451740                        NSURL*                  homePageURL                     = [NSURL URLWithString: [DBURLFormatter formatAndReturnStringWithString: homePage]]; 
    17461741                        NSURLRequest*   homePageURLRequest      = [NSURLRequest requestWithURL: homePageURL cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: 60.0]; 
     
    17681763        // Enter SlideBrowse or Webposé mode if the user wants to 
    17691764         
    1770         int browserMode  = [userDefaults integerForKey: kBrowserMode]; 
     1765        NSInteger browserMode    = [userDefaults integerForKey: kBrowserMode]; 
    17711766         
    17721767        if(browserMode == 1) // SlideBrowse 
     
    18441839                        NSArray *lines = [contents componentsSeparatedByString:@"\n"]; 
    18451840                        NSString *current = nil; 
    1846                         int i; 
     1841                        NSInteger i; 
    18471842                        for (i=0; i<[lines count]; i++) { 
    18481843                                current = [lines objectAtIndex:i]; 
     
    18571852                if ([[currentWebView mainFrame] dataSource] != nil || [[currentWebView mainFrame] provisionalDataSource] != nil) 
    18581853                { 
    1859                         webViewToLoadFile = [self newWebView]; 
     1854                        webViewToLoadFile = [self createWebView]; 
    18601855                         
    18611856                        [tabController newTabWithWebView: webViewToLoadFile select: YES URLString: formattedFileName]; 
     
    18681863 
    18691864/* 
    1870         int i; 
     1865        NSInteger i; 
    18711866        NSString *file = nil; 
    18721867        NSURL *furl = nil; 
     
    20472042        DBTab* tab = [tabController tabWithWebView: sender]; 
    20482043         
    2049         int code = [error code]; 
     2044        NSInteger code = [error code]; 
    20502045         
    20512046        if(tab) 
     
    20652060        NSURL *url; 
    20662061        NSAlert *msg; 
    2067         int result; 
     2062        NSInteger result; 
    20682063         
    20692064        switch (code) { 
     
    21602155- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame { 
    21612156        DBTab* tab = [tabController tabWithWebView: sender]; 
    2162         int code = [error code]; 
     2157        NSInteger code = [error code]; 
    21632158         
    21642159        if(tab) 
     
    21782173        NSURL *url; 
    21792174        NSAlert *msg; 
    2180         int result; 
     2175        NSInteger result; 
    21812176         
    21822177        switch (code) { 
     
    23572352 
    23582353- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request { 
    2359         WebView                 *newView = [self newWebView]; 
     2354        WebView                 *newView = [self createWebView]; 
    23602355        NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; 
    23612356         
     
    24522447         
    24532448        // Display alert panel 
    2454         int result; 
     2449        NSInteger result; 
    24552450        result = [alert runModal]; 
    24562451         
     
    24612456//- (NSWindow *)downloadWindowForAuthenticationSheet:(WebDownload *)download {} 
    24622457 
    2463 - (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInfo modifierFlags:(unsigned int)modifierFlags 
     2458- (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInfo modifierFlags:(NSUInteger)modifierFlags 
    24642459{ 
    24652460        if(sender == currentWebView) // if this is the visible webview 
     
    24932488                 
    24942489        // Display open panel 
    2495         int result; 
     2490        NSInteger result; 
    24962491        result = [openPanel runModal]; 
    24972492         
  • Source/NSBezierPathRoundRects.h

    r1 r13  
    1313@interface NSBezierPath (RoundRects) 
    1414 
    15 +(void)         fillRoundRectInRect:(NSRect)rect radius:(float) radius; 
    16 +(void)         strokeRoundRectInRect:(NSRect)rect radius:(float) radius; 
    17 +(NSBezierPath*)        bezierPathWithRoundRectInRect:(NSRect)rect radius:(float) radius; 
     15+(void)         fillRoundRectInRect:(NSRect)rect radius:(CGFloat) radius; 
     16+(void)         strokeRoundRectInRect:(NSRect)rect radius:(CGFloat) radius; 
     17+(NSBezierPath*)        bezierPathWithRoundRectInRect:(NSRect)rect radius:(CGFloat) radius; 
    1818NSPoint  UKCenterOfRect( NSRect rect ); 
    1919NSPoint  UKTopCenterOfRect( NSRect rect ); 
  • Source/NSBezierPathRoundRects.m

    r1 r13  
    1313@implementation NSBezierPath (RoundRects) 
    1414  
    15 +(void)         fillRoundRectInRect:(NSRect)rect radius:(float) radius 
     15+(void)         fillRoundRectInRect:(NSRect)rect radius:(CGFloat) radius 
    1616{ 
    1717        NSBezierPath*   p = [self bezierPathWithRoundRectInRect: rect radius: radius]; 
     
    2020  
    2121  
    22 +(void)         strokeRoundRectInRect:(NSRect)rect radius:(float) radius 
     22+(void)         strokeRoundRectInRect:(NSRect)rect radius:(CGFloat) radius 
    2323{ 
    2424        NSBezierPath*   p = [self bezierPathWithRoundRectInRect: rect radius: radius]; 
     
    3737// ----------------------------------------------------------------------------- 
    3838  
    39 +(NSBezierPath*)        bezierPathWithRoundRectInRect:(NSRect)rect radius:(float) radius 
     39+(NSBezierPath*)        bezierPathWithRoundRectInRect:(NSRect)rect radius:(CGFloat) radius 
    4040{ 
    4141        // Make sure radius doesn't exceed a maximum size to avoid artifacts: 
  • Source/NSDataExtension.m

    r1 r13  
    66{ 
    77        /* First valid character that can be indexed in decode lookup table */ 
    8         static int charDigitsBase = '2'; 
     8        static NSInteger charDigitsBase = '2'; 
    99 
    1010        /* Lookup table used to decode() characters in encoded strings */ 
    11         static int charDigits[] = 
     11        static NSInteger charDigits[] = 
    1212        {       26,27,28,29,30,31,-1,-1,-1,-1,-1,-1,-1,-1                // 23456789:;<=>? 
    1313                ,-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14 // @ABCDEFGHIJKLMNO 
     
    1818 
    1919        if (! [encoded canBeConvertedToEncoding:NSASCIIStringEncoding]) return nil; 
    20         const char *chars = [encoded cString]; // avoids using characterAtIndex. 
    21         int charsLen = [encoded cStringLength]; 
     20        const char *chars = [encoded UTF8String]; // avoids using characterAtIndex. 
     21        NSInteger charsLen = [encoded length]; 
    2222 
    2323        // Note that the code below could detect non canonical Base32 length within the loop. However canonical Base32 length can be tested before entering the loop. 
     
    3232                        return nil; // non-canonical length 
    3333        } 
    34         int charDigitsLen = sizeof(charDigits); 
    35         int bytesLen = (charsLen * 5) >> 3; 
     34        NSInteger charDigitsLen = sizeof(charDigits); 
     35        NSInteger bytesLen = (charsLen * 5) >> 3; 
    3636        Byte bytes[bytesLen]; 
    37         int bytesOffset = 0, charsOffset = 0; 
     37        NSInteger bytesOffset = 0, charsOffset = 0; 
    3838        // Also the code below does test that other discarded bits 
    3939        // (1 to 4 bits at end) are effectively 0. 
    4040        while (charsLen > 0) 
    4141        { 
    42                 int digit, lastDigit; 
     42                NSInteger digit, lastDigit; 
    4343                // STEP n = 0: Read the 1st Char in a 8-Chars subblock 
    4444                // Leave 5 bits, asserting there's another encoding Char 
    45                 if ((digit = (int)chars[charsOffset] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
     45                if ((digit = (NSInteger)chars[charsOffset] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
    4646                        return nil; // invalid character 
    4747                lastDigit = digit << 3; 
    4848                // STEP n = 5: Read the 2nd Char in a 8-Chars subblock 
    4949                // Insert 3 bits, leave 2 bits, possibly trailing if no more Char 
    50                 if ((digit = (int)chars[charsOffset + 1] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
     50                if ((digit = (NSInteger)chars[charsOffset + 1] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
    5151                        return nil; // invalid character 
    5252                bytes[bytesOffset] = (Byte)((digit >> 2) | lastDigit); 
     
    5858                // STEP n = 2: Read the 3rd Char in a 8-Chars subblock 
    5959                // Leave 7 bits, asserting there's another encoding Char 
    60                 if ((digit = (int)chars[charsOffset + 2] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
     60                if ((digit = (NSInteger)chars[charsOffset + 2] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
    6161                        return nil; // invalid character 
    6262                lastDigit |= (Byte)(digit << 1); 
    6363                // STEP n = 7: Read the 4th Char in a 8-chars Subblock 
    6464                // Insert 1 bit, leave 4 bits, possibly trailing if no more Char 
    65                 if ((digit = (int)chars[charsOffset + 3] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
     65                if ((digit = (NSInteger)chars[charsOffset + 3] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
    6666                        return nil; // invalid character 
    6767                bytes[bytesOffset + 1] = (Byte)((digit >> 4) | lastDigit); 
     
    7373                // STEP n = 4: Read the 5th Char in a 8-Chars subblock 
    7474                // Insert 4 bits, leave 1 bit, possibly trailing if no more Char 
    75                 if ((digit = (int)chars[charsOffset + 4] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
     75                if ((digit = (NSInteger)chars[charsOffset + 4] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
    7676                        return nil; // invalid character 
    7777                bytes[bytesOffset + 2] = (Byte)((digit >> 1) | lastDigit); 
     
    8383                // STEP n = 1: Read the 6th Char in a 8-Chars subblock 
    8484                // Leave 6 bits, asserting there's another encoding Char 
    85                 if ((digit = (int)chars[charsOffset + 5] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
     85                if ((digit = (NSInteger)chars[charsOffset + 5] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
    8686                        return nil; // invalid character 
    8787                lastDigit |= (Byte)(digit << 2); 
    8888                // STEP n = 6: Read the 7th Char in a 8-Chars subblock 
    8989                // Insert 2 bits, leave 3 bits, possibly trailing if no more Char 
    90                 if ((digit = (int)chars[charsOffset + 6] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
     90                if ((digit = (NSInteger)chars[charsOffset + 6] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
    9191                        return nil; // invalid character 
    9292                bytes[bytesOffset + 3] = (Byte)((digit >> 3) | lastDigit); 
     
    9898                // STEP n = 3: Read the 8th Char in a 8-Chars subblock 
    9999                // Insert 5 bits, leave 0 bit, next encoding Char may not exist 
    100                 if ((digit = (int)chars[charsOffset + 7] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
     100                if ((digit = (NSInteger)chars[charsOffset + 7] - charDigitsBase) < 0 || digit >= charDigitsLen || (digit = charDigits[digit]) == -1) 
    101101                        return nil; // invalid character 
    102102                bytes[bytesOffset + 4] = (Byte)(digit | lastDigit); 
     
    119119        }; 
    120120        const Byte *bytes = [self bytes]; 
    121         int bytesOffset = 0, bytesLen = [self length]; 
    122         int charsOffset = 0, charsLen = ((bytesLen << 3) + 4) / 5; 
     121        NSInteger bytesOffset = 0, bytesLen = [self length]; 
     122        NSInteger charsOffset = 0, charsLen = ((bytesLen << 3) + 4) / 5; 
    123123        char chars[charsLen]; 
    124124        while (bytesLen != 0) { 
    125                 int digit, lastDigit; 
     125                NSInteger digit, lastDigit; 
    126126                // INVARIANTS FOR EACH STEP n in [0..5[; digit in [0..31[; 
    127127                // The remaining n bits are already aligned on top positions 
     
    170170                bytesLen -= 5; 
    171171        } 
    172         return [NSString stringWithCString:chars length:sizeof(chars)]; 
     172        return [NSString stringWithUTF8String:chars]; 
    173173} 
    174174 
  • Source/NSFileManagerSGSAdditions.m

    r1 r13  
    1919                NSArray*                        pathComponents  = [[filePath stringByExpandingTildeInPath] pathComponents]; 
    2020                 
    21                 int i; 
     21                NSInteger i; 
    2222                for(i = 0; i < [pathComponents count]; i++) 
    2323                { 
     
    5151        NSString*       fileExtension   = [filePath pathExtension]; 
    5252         
    53         int i; 
     53        NSInteger i; 
    5454        for(i = 1; i < 999; i++) 
    5555        { 
  • Source/NSStringAdditions.h

    r1 r13  
    1010@interface NSString (SGSAdditions) 
    1111 
    12 - (NSString*) truncatedToWidth: (float) width withAttributes: (NSDictionary*) attributes; 
     12- (NSString*) truncatedToWidth: (CGFloat) width withAttributes: (NSDictionary*) attributes; 
    1313 
    1414@end 
  • Source/NSStringAdditions.m

    r1 r13  
    1010@implementation NSString (SGSAdditions) 
    1111 
    12 - (NSString*) truncatedToWidth: (float) width withAttributes: (NSDictionary*) attributes 
     12- (NSString*) truncatedToWidth: (CGFloat) width withAttributes: (NSDictionary*) attributes 
    1313{ 
    1414        NSString*       fixedString             = self; 
     
    1818        if (stringSize.width > width) 
    1919        { 
    20                 int i = [self length]; 
     20                NSInteger i = [self length]; 
    2121                while ([currentString sizeWithAttributes: attributes].width > width) 
    2222                { 
  • Source/NSWindowFade.m

    r1 r13  
    88#import "NSWindowFade.h" 
    99 
    10 static NSMutableDictionary *fadeInfo = nil; 
    11  
    12 @interface NSWindow (FadePrivate) 
    13  
    14 - (void)fadeInWindow:(NSTimer *)theTimer; 
    15 - (void)fadeOutWindow:(NSTimer *)theTimer; 
    16  
    17 @end 
    1810 
    1911@implementation NSWindow (Fade) 
    2012 
    2113-(void)fadeIn { 
    22         if (!fadeInfo) { 
    23                 fadeInfo = [[NSMutableDictionary alloc] init]; 
    24         } else { 
    25                 if ([(NSString *)[fadeInfo objectForKey:@"status"] isEqualToString:@"inprogress"]) { // check status 
    26                         if ([(NSString *)[fadeInfo objectForKey:@"type"] isEqualToString:@"fadeOut"]) { 
    27                                 NSWindow *target = [fadeInfo objectForKey:@"target"]; 
    28                                 if ([self windowNumber] == [target windowNumber]) { 
    29                                         NSTimer *aTimer = (NSTimer *)[fadeInfo objectForKey:@"timer"]; 
    30                                         [aTimer invalidate]; 
    31                                         [aTimer release]; 
    32                                 } 
    33                         } 
    34                 } 
    35         } 
    36         NSTimer *timer = [[NSTimer scheduledTimerWithTimeInterval:0.02 target:self selector:@selector(fadeInWindow:) userInfo:nil repeats:YES] retain]; 
    37         [fadeInfo setObject:self forKey:@"target"]; 
    38         [fadeInfo setObject:timer forKey:@"timer"]; 
    39         [fadeInfo setObject:@"fadeIn" forKey:@"type"]; 
    40         [fadeInfo setObject:@"inprogress" forKey:@"status"]; 
     14        [self setAlphaValue:0.0f]; 
     15        [[self animator] setAlphaValue:1.0f]; 
    4116} 
    4217 
    4318-(void)fadeOut { 
    44         if (!fadeInfo) { 
    45                 fadeInfo = [[NSMutableDictionary alloc] init]; 
    46         } else { 
    47                 if ([(NSString *)[fadeInfo objectForKey:@"status"] isEqualToString:@"inprogress"]) { // check status 
    48                         if ([(NSString *)[fadeInfo objectForKey:@"type"] isEqualToString:@"fadeIn"]) { 
    49                                 NSWindow *target = [fadeInfo objectForKey:@"target"]; 
    50                                 if ([self windowNumber] == [target windowNumber]) { 
    51                                         NSTimer *aTimer = (NSTimer *)[fadeInfo objectForKey:@"timer"]; 
    52                                         [aTimer invalidate]; 
    53                                         [aTimer release]; 
    54                                 } 
    55                         } 
    56                 } 
    57         } 
    58         NSTimer *timer = [[NSTimer scheduledTimerWithTimeInterval:0.02 target:self selector:@selector(fadeOutWindow:) userInfo:nil repeats:YES] retain]; 
    59         [fadeInfo setObject:self forKey:@"target"]; 
    60         [fadeInfo setObject:timer forKey:@"timer"]; 
    61         [fadeInfo setObject:@"fadeOut" forKey:@"type"]; 
    62         [fadeInfo setObject:@"inprogress" forKey:@"status"]; 
     19        [[self animator] setAlphaValue:0.0f]; 
    6320} 
    6421 
    65 - (void)fadeInWindow:(NSTimer *)theTimer { 
    66         if ([self alphaValue] < 1.0) { 
    67                 float av = [self alphaValue]; 
    68                 [self setAlphaValue:av + 0.2]; 
    69         } else { 
    70                 [theTimer invalidate]; 
    71                 [theTimer release]; 
    72                 [fadeInfo removeObjectForKey:@"target"]; 
    73                 [fadeInfo removeObjectForKey:@"timer"]; 
    74                 [fadeInfo setObject:@"" forKey:@"type"]; 
    75                 [fadeInfo setObject:@"done" forKey:@"status"]; 
    76         } 
    77 } 
    78  
    79 - (void)fadeOutWindow:(NSTimer *)theTimer { 
    80         if ([self alphaValue] > 0.0) { 
    81                 float av = [self alphaValue]; 
    82                 [self setAlphaValue:av - 0.2]; 
    83         } else { 
    84                 [theTimer invalidate]; 
    85                 [theTimer release]; 
    86                 [fadeInfo removeObjectForKey:@"target"]; 
    87                 [fadeInfo removeObjectForKey:@"timer"]; 
    88                 [fadeInfo setObject:@"" forKey:@"type"]; 
    89                 [fadeInfo setObject:@"done" forKey:@"status"]; 
    90                 [self orderOut:nil]; 
    91         } 
    92 } 
    93  
    94  
    9522@end 
  • Source/WebKitEx.h

    r1 r13  
    1919+ (void)emptyCache; 
    2020+ (void)setCacheDisabled:(BOOL)fp8; 
    21 + (int)javaScriptObjectsCount; 
    22 + (int)javaScriptInterpretersCount; 
    23 + (int)javaScriptNoGCAllowedObjectsCount; 
    24 + (int)javaScriptReferencedObjectsCount; 
     21+ (NSInteger)javaScriptObjectsCount; 
     22+ (NSInteger)javaScriptInterpretersCount; 
     23+ (NSInteger)javaScriptNoGCAllowedObjectsCount; 
     24+ (NSInteger)javaScriptReferencedObjectsCount; 
    2525+ (id)javaScriptRootObjectClasses; 
    2626+ (void)garbageCollectJavaScriptObjects; 
     
    3232@interface WebKitStatistics : NSObject {} 
    3333 
    34 + (int)webViewCount; 
    35 + (int)frameCount; 
    36 + (int)dataSourceCount; 
    37 + (int)viewCount; 
    38 + (int)bridgeCount; 
    39 + (int)HTMLRepresentationCount; 
     34+ (NSInteger)webViewCount; 
     35+ (NSInteger)frameCount; 
     36+ (NSInteger)dataSourceCount; 
     37+ (NSInteger)viewCount; 
     38+ (NSInteger)bridgeCount; 
     39+ (NSInteger)HTMLRepresentationCount; 
    4040 
    4141@end 
     
    7676- (id)_createFrameNamed:(id)fp8 inParent:(id)fp12 allowsScrolling:(BOOL)fp16; 
    7777- (void)_finishedLoadingResourceFromDataSource:(id)fp8; 
    78 - (void)_mainReceivedBytesSoFar:(unsigned int)fp8 fromDataSource:(id)fp12 complete:(BOOL)fp16; 
     78- (void)_mainReceivedBytesSoFar:(NSUInteger)fp8 fromDataSource:(id)fp12 complete:(BOOL)fp16; 
    7979- (void)_receivedError:(id)fp8 fromDataSource:(id)fp12; 
    8080- (void)_mainReceivedError:(id)fp8 fromDataSource:(id)fp12 complete:(BOOL)fp16; 
     
    8888- (id)_openNewWindowWithRequest:(id)fp8; 
    8989- (id)_menuForElement:(id)fp8; 
    90 - (void)_mouseDidMoveOverElement:(id)fp8 modifierFlags:(unsigned int)fp12; 
    91 - (void)_goToItem:(id)fp8 withLoadType:(int)fp12; 
     90- (void)_mouseDidMoveOverElement:(id)fp8 modifierFlags:(NSUInteger)fp12; 
     91- (void)_goToItem:(id)fp8 withLoadType:(NSInteger)fp12; 
    9292- (void)_loadItem:(id)fp8; 
    9393- (void)_loadBackForwardListFromOtherView:(id)fp8; 
     
    139139- (void)_addScrollerDashboardRegions:(id)fp8; 
    140140- (id)_dashboardRegions; 
    141 - (void)_setDashboardBehavior:(int)fp8 to:(BOOL)fp12; 
    142 - (BOOL)_dashboardBehavior:(int)fp8; 
     141- (void)_setDashboardBehavior:(NSInteger)fp8 to:(BOOL)fp12; 
     142- (BOOL)_dashboardBehavior:(NSInteger)fp8; 
    143143- (void)handleAuthenticationForResource:(id)fp8 challenge:(id)fp12 fromDataSource:(id)fp16; 
    144144 
  • Source/main.m

    r1 r13  
    77#import <Cocoa/Cocoa.h> 
    88 
    9 int main(int argc, char *argv[]) 
     9NSInteger main(NSInteger argc, char *argv[]) 
    1010{ 
    1111    return NSApplicationMain(argc,  (const char **) argv);