Changeset 13
- Timestamp:
- 09/22/09 23:46:55 (3 years ago)
- Files:
-
- 67 modified
-
DeskBrowse.xcodeproj/project.pbxproj (modified) (9 diffs)
-
Source/DBActionMenuView.h (modified) (1 diff)
-
Source/DBActionMenuWindow.m (modified) (1 diff)
-
Source/DBAntiPhisingValidator.m (modified) (1 diff)
-
Source/DBApplication.m (modified) (1 diff)
-
Source/DBBetterOutlineView.m (modified) (2 diffs)
-
Source/DBBezelController.m (modified) (1 diff)
-
Source/DBBezelOutlineView.m (modified) (2 diffs)
-
Source/DBBezelTableView.h (modified) (1 diff)
-
Source/DBBezelTableView.m (modified) (2 diffs)
-
Source/DBBezelWindow.m (modified) (2 diffs)
-
Source/DBBookmarkActionCell.h (modified) (1 diff)
-
Source/DBBookmarkActionCell.m (modified) (2 diffs)
-
Source/DBBookmarkBar.h (modified) (1 diff)
-
Source/DBBookmarkBar.m (modified) (12 diffs)
-
Source/DBBookmarkBarCell.h (modified) (1 diff)
-
Source/DBBookmarkBarCell.m (modified) (1 diff)
-
Source/DBBookmarkBarPopUpButton.m (modified) (5 diffs)
-
Source/DBBookmarkController.h (modified) (2 diffs)
-
Source/DBBookmarkController.m (modified) (22 diffs)
-
Source/DBBookmarkMenuCell.m (modified) (2 diffs)
-
Source/DBBookmarkTableDataSource.m (modified) (5 diffs)
-
Source/DBBookmarkWindowController.m (modified) (2 diffs)
-
Source/DBDownloadController.h (modified) (2 diffs)
-
Source/DBDownloadController.m (modified) (9 diffs)
-
Source/DBDownloadObject.h (modified) (2 diffs)
-
Source/DBDownloadObject.m (modified) (3 diffs)
-
Source/DBHTMLParser.m (modified) (2 diffs)
-
Source/DBHistoryController.h (modified) (2 diffs)
-
Source/DBHistoryController.m (modified) (12 diffs)
-
Source/DBHistoryView.h (modified) (2 diffs)
-
Source/DBHistoryView.m (modified) (9 diffs)
-
Source/DBKeyStuff.h (modified) (1 diff)
-
Source/DBKeyStuff.m (modified) (2 diffs)
-
Source/DBKeychainAccess.m (modified) (2 diffs)
-
Source/DBLeveledWindow.m (modified) (2 diffs)
-
Source/DBLocationTextFieldCell.m (modified) (1 diff)
-
Source/DBPreferenceController.h (modified) (1 diff)
-
Source/DBPreferenceController.m (modified) (5 diffs)
-
Source/DBQuickDownload.h (modified) (1 diff)
-
Source/DBQuickDownload.m (modified) (1 diff)
-
Source/DBSlideWindow.h (modified) (1 diff)
-
Source/DBSlideWindow.m (modified) (4 diffs)
-
Source/DBStatusItemController.m (modified) (1 diff)
-
Source/DBSystemProfiler.m (modified) (1 diff)
-
Source/DBTab.m (modified) (8 diffs)
-
Source/DBTabController.h (modified) (2 diffs)
-
Source/DBTabController.m (modified) (13 diffs)
-
Source/DBURLFormatter.m (modified) (1 diff)
-
Source/DBViewSourceWindowController.m (modified) (4 diffs)
-
Source/DBWebsposePassword.m (modified) (1 diff)
-
Source/DBWebsposeWindow.m (modified) (1 diff)
-
Source/DBWindowLevel.h (modified) (1 diff)
-
Source/DBWindowLevel.m (modified) (1 diff)
-
Source/DeskBrowseConstants.h (modified) (1 diff)
-
Source/DeskBrowseConstants.m (modified) (1 diff)
-
Source/DeskBrowseController.h (modified) (2 diffs)
-
Source/DeskBrowseController.m (modified) (31 diffs)
-
Source/NSBezierPathRoundRects.h (modified) (1 diff)
-
Source/NSBezierPathRoundRects.m (modified) (3 diffs)
-
Source/NSDataExtension.m (modified) (9 diffs)
-
Source/NSFileManagerSGSAdditions.m (modified) (2 diffs)
-
Source/NSStringAdditions.h (modified) (1 diff)
-
Source/NSStringAdditions.m (modified) (2 diffs)
-
Source/NSWindowFade.m (modified) (1 diff)
-
Source/WebKitEx.h (modified) (5 diffs)
-
Source/main.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
DeskBrowse.xcodeproj/project.pbxproj
r11 r13 31 31 5DC2C45B0EC2158800BD0054 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 5DC2C4560EC2158800BD0054 /* Credits.rtf */; }; 32 32 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 */; };36 33 5DC2C4670EC215F500BD0054 /* DefaultLocationFieldIcon.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 5DC2C4640EC215F500BD0054 /* DefaultLocationFieldIcon.tiff */; }; 37 34 5DC2C4680EC215F500BD0054 /* Generic.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5DC2C4650EC215F500BD0054 /* Generic.icns */; }; … … 250 247 5DC2C4560EC2158800BD0054 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = Credits.rtf; path = Resources/Credits.rtf; sourceTree = "<group>"; }; 251 248 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>"; };255 249 5DC2C4640EC215F500BD0054 /* DefaultLocationFieldIcon.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = DefaultLocationFieldIcon.tiff; path = Resources/Images/DefaultLocationFieldIcon.tiff; sourceTree = "<group>"; }; 256 250 5DC2C4650EC215F500BD0054 /* Generic.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Generic.icns; path = Resources/Images/Generic.icns; sourceTree = "<group>"; }; … … 580 574 isa = PBXGroup; 581 575 children = ( 582 5D1F467B09DF5D3100F7B99A /* applescript */,583 576 5DC2C68D0EC22AEA00BD0054 /* nibs */, 584 577 5DC2C53E0EC21DC000BD0054 /* images */, … … 723 716 ); 724 717 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;735 718 sourceTree = "<group>"; 736 719 }; … … 1074 1057 5DC2C45B0EC2158800BD0054 /* Credits.rtf in Resources */, 1075 1058 5DC2C45D0EC2158800BD0054 /* main.dbmenu in Resources */, 1076 5DC2C4610EC215D400BD0054 /* DeskBrowse.scriptSuite in Resources */,1077 5DC2C4620EC215D400BD0054 /* DeskBrowse.scriptTerminology in Resources */,1078 1059 5DC2C4670EC215F500BD0054 /* DefaultLocationFieldIcon.tiff in Resources */, 1079 1060 5DC2C4680EC215F500BD0054 /* Generic.icns in Resources */, … … 1196 1177 buildActionMask = 2147483647; 1197 1178 files = ( 1198 5DC2C4630EC215D400BD0054 /* Scripting.r in Rez */,1199 1179 ); 1200 1180 runOnlyForDeploymentPostprocessing = 0; … … 1432 1412 GCC_OPTIMIZATION_LEVEL = 0; 1433 1413 MACOSX_DEPLOYMENT_TARGET = 10.3; 1434 SDKROOT = /Developer/SDKs/MacOSX10. 4u.sdk;1414 SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; 1435 1415 }; 1436 1416 name = Development; … … 1443 1423 i386, 1444 1424 ); 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; 1447 1428 }; 1448 1429 name = Deployment; … … 1456 1437 ); 1457 1438 MACOSX_DEPLOYMENT_TARGET = 10.3; 1458 SDKROOT = /Developer/SDKs/MacOSX10. 4u.sdk;1439 SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; 1459 1440 }; 1460 1441 name = Default; -
Source/DBActionMenuView.h
r1 r13 12 12 @interface DBActionMenuView : NSView { 13 13 NSImage *bgImage; 14 float opacity;14 CGFloat opacity; 15 15 DBActionMenuItem *history; 16 16 DBActionMenuItem *downloads; -
Source/DBActionMenuWindow.m
r1 r13 11 11 @implementation DBActionMenuWindow 12 12 13 - (id) initWithContentRect: (NSRect) contentRect styleMask: ( unsigned int) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag13 - (id) initWithContentRect: (NSRect) contentRect styleMask: (NSUInteger) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag 14 14 { 15 15 if (self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: NO]) -
Source/DBAntiPhisingValidator.m
r1 r13 19 19 20 20 + (BOOL)validateLink:(NSURL *)urlLink { 21 NSString *u = [urlLink absoluteString];21 //NSString *u = [urlLink absoluteString]; 22 22 return YES; 23 23 } -
Source/DBApplication.m
r1 r13 83 83 { 84 84 NSString* characters = [theEvent charactersIgnoringModifiers]; 85 NSString* characters1 = [theEvent characters];85 //NSString* characters1 = [theEvent characters]; 86 86 87 unsigned intmodifiers = [theEvent modifierFlags];87 NSUInteger modifiers = [theEvent modifierFlags]; 88 88 89 89 /* -
Source/DBBetterOutlineView.m
r1 r13 24 24 NSDictionary* userInfo = [notification userInfo]; 25 25 NSString* textMovementKey = @"NSTextMovement"; 26 intwhyEnd = [[userInfo objectForKey: textMovementKey] intValue];26 NSInteger whyEnd = [[userInfo objectForKey: textMovementKey] intValue]; 27 27 BOOL calledSuper = NO; 28 28 … … 61 61 if (selectedRow != NSNotFound && selectedRow < numberOfRows) 62 62 { 63 intcolumnToEdit = 0;64 intnumberOfColumns = [self numberOfColumns];63 NSInteger columnToEdit = 0; 64 NSInteger numberOfColumns = [self numberOfColumns]; 65 65 66 66 if (columnToEdit >= 0 && columnToEdit < numberOfColumns) -
Source/DBBezelController.m
r1 r13 15 15 if (self) { 16 16 NSRect screen = [[NSScreen mainScreen] frame]; 17 float width = 220;18 float height = 186;17 CGFloat width = 220; 18 CGFloat height = 186; 19 19 bezel = [[NSWindow alloc] initWithContentRect:NSMakeRect(((screen.size.width/2) - (width/2)), ((screen.size.height/2) - height), width, height) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; 20 20 [bezel setOpaque:NO]; -
Source/DBBezelOutlineView.m
r1 r13 28 28 29 29 30 inti;30 NSInteger i; 31 31 NSArray* tableColumns = [self tableColumns]; 32 32 NSTableColumn* currentTableColumn = nil; … … 67 67 if (character == NSDeleteFunctionKey || character == 0x7F) 68 68 { 69 [[self delegate] tableViewDeleteKeyPressed:self];69 [[self delegate] performSelector:@selector(tableViewDeleteKeyPressed:) withObject:self]; 70 70 handled = YES; 71 71 } -
Source/DBBezelTableView.h
r1 r13 12 12 13 13 14 static float kDragImageAlpha = 0.55f;14 static CGFloat kDragImageAlpha = 0.55f; 15 15 16 16 @interface DBBezelTableView : NSTableView -
Source/DBBezelTableView.m
r9 r13 69 69 if ([delegate respondsToSelector: @selector(tableViewDeleteKeyPressed:)]) 70 70 { 71 [delegate tableViewDeleteKeyPressed: self];71 [delegate performSelector:@selector(tableViewDeleteKeyPressed:) withObject:self]; 72 72 handled = YES; 73 73 } … … 123 123 }*/ 124 124 125 - ( unsigned int) draggingSourceOperationMaskForLocal: (BOOL) isLocal125 - (NSUInteger) draggingSourceOperationMaskForLocal: (BOOL) isLocal 126 126 { 127 unsigned intoperation = NSDragOperationNone;127 NSUInteger operation = NSDragOperationNone; 128 128 129 129 if (isLocal) -
Source/DBBezelWindow.m
r1 r13 11 11 12 12 13 - (id) initWithContentRect: (NSRect) contentRect styleMask: ( unsigned int) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag13 - (id) initWithContentRect: (NSRect) contentRect styleMask: (NSUInteger) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag 14 14 { 15 15 if (self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask backing: bufferingType defer: flag]) 16 16 { 17 // [self setAboveMainWindowLevel: YES]; // Only use this if you want the bezel windows to float17 // [self setAboveMainWindowLevel: YES]; // Only use this if you want the bezel windows to CGFloat 18 18 [self setOpaque: NO]; 19 19 [self setBackgroundColor: [NSColor clearColor]]; … … 90 90 newOrigin.y = origin.y + newLocation.y - dragStartLocation.y; 91 91 92 float maxHeight;92 CGFloat maxHeight; 93 93 94 94 if ([self level] < NSMainMenuWindowLevel) // if our level is less than the main menu level -
Source/DBBookmarkActionCell.h
r1 r13 6 6 7 7 #import <Cocoa/Cocoa.h> 8 #import "DBBookmarkBarCell.h" 8 9 9 10 @protocol DBBookmarkBarCell;11 10 12 11 @interface DBBookmarkActionCell : NSActionCell <DBBookmarkBarCell> -
Source/DBBookmarkActionCell.m
r8 r13 116 116 if (stringSize.width < textFrame.size.width) 117 117 { 118 float extraWidth = textFrame.size.width - stringSize.width;118 CGFloat extraWidth = textFrame.size.width - stringSize.width; 119 119 textFrame.origin.x = textFrame.origin.x + extraWidth / 2; 120 120 } … … 240 240 NSDictionary* stringAttributes = [self textAttributes]; 241 241 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; 244 244 245 245 [self setFrame: NSMakeRect(frame.origin.x, frame.origin.y, newWidth, frame.size.height)]; -
Source/DBBookmarkBar.h
r1 r13 21 21 22 22 BOOL mDragging; 23 float mLastMouseX;23 CGFloat mLastMouseX; 24 24 25 25 NSRect mLastFrame; -
Source/DBBookmarkBar.m
r1 r13 13 13 14 14 15 const float kDistanceBetweenBookmarks = 5;15 const CGFloat kDistanceBetweenBookmarks = 5; 16 16 17 17 @interface DBBookmarkBar (Private) 18 18 19 - ( float) maxRightEdgeForCells;19 - (CGFloat) maxRightEdgeForCells; 20 20 21 21 - (void) drawBackgroundInRect: (NSRect) rect; … … 119 119 [mBookmarkCells removeAllObjects]; 120 120 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]; 128 122 129 123 NSEnumerator* bookmarkEnumerator = [mBookmarkController bookmarkEnumerator]; … … 154 148 id <DBBookmarkBarCell> bookmarkCell = nil; 155 149 156 float maxRightEdge = [self maxRightEdgeForCells];150 CGFloat maxRightEdge = [self maxRightEdgeForCells]; 157 151 158 152 NSEnumerator* cellEnumerator = [mBookmarkCells objectEnumerator]; … … 184 178 unsigned returnIndex = 0; 185 179 186 float maxRightEdge = [self maxRightEdgeForCells];180 CGFloat maxRightEdge = [self maxRightEdgeForCells]; 187 181 NSRect lastCellFrame = NSZeroRect; 188 182 … … 242 236 if (clickedCell != nil) 243 237 { 244 intindexOfCellInArray = [mBookmarkCells indexOfObject: clickedCell];238 NSInteger indexOfCellInArray = [mBookmarkCells indexOfObject: clickedCell]; 245 239 NSNumber* numberIndexOfCell = [NSNumber numberWithInt: indexOfCellInArray]; 246 240 … … 266 260 BOOL fillNow = NO; 267 261 268 float maxRightEdge = [self maxRightEdgeForCells];262 CGFloat maxRightEdge = [self maxRightEdgeForCells]; 269 263 270 264 NSEnumerator* cellEnumerator = [mBookmarkCells objectEnumerator]; … … 316 310 } 317 311 318 - ( unsigned int) draggingEntered: (id <NSDraggingInfo>) sender312 - (NSUInteger) draggingEntered: (id <NSDraggingInfo>) sender 319 313 { 320 314 NSDragOperation returnOperation = NSDragOperationNone; … … 363 357 } 364 358 365 return operation;359 return returnOperation; 366 360 } 367 361 … … 420 414 421 415 422 - ( float) maxRightEdgeForCells423 { 424 float maxRightEdge = 0;416 - (CGFloat) maxRightEdgeForCells 417 { 418 CGFloat maxRightEdge = 0; 425 419 NSRect frameRect = [self frame]; 426 420 … … 453 447 NSPoint mouseLocation = [[self window] convertScreenToBase: [NSEvent mouseLocation]];//[self convertPoint: [[[NSApp mainWindow] currentEvent] locationInWindow] fromView: nil]; 454 448 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]; 458 452 NSRect lastCellFrame = NSZeroRect; 459 453 … … 469 463 if (mouseLocation.x < NSMidX(cellFrame) && mouseLocation.x > NSMidX(lastCellFrame)) 470 464 { 471 float positionOfIndicator = NSMaxX(lastCellFrame) + (NSMinX(cellFrame) - NSMaxX(lastCellFrame)) / 2;465 CGFloat positionOfIndicator = NSMaxX(lastCellFrame) + (NSMinX(cellFrame) - NSMaxX(lastCellFrame)) / 2; 472 466 NSRect rectForDragIndicator = NSMakeRect(positionOfIndicator, 0, 1, NSHeight(frameRect) - 2); 473 467 … … 507 501 508 502 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); 510 504 511 505 unsigned currentCellIndex = 0; -
Source/DBBookmarkBarCell.h
r1 r13 9 9 10 10 extern NSString* DBBookmarkCellPboardType; 11 extern float DBBookmarkCellMaximumWidth;12 extern float DBPaddingOnSidesOfTextFrame;11 extern CGFloat DBBookmarkCellMaximumWidth; 12 extern CGFloat DBPaddingOnSidesOfTextFrame; 13 13 14 14 @protocol DBBookmarkBarCell -
Source/DBBookmarkBarCell.m
r6 r13 6 6 7 7 NSString* DBBookmarkCellPboardType = @"BookmarkCellType"; 8 float DBBookmarkCellMaximumWidth = 120.0;9 float DBPaddingOnSidesOfTextFrame = 10.0;8 CGFloat DBBookmarkCellMaximumWidth = 120.0; 9 CGFloat DBPaddingOnSidesOfTextFrame = 10.0; -
Source/DBBookmarkBarPopUpButton.m
r1 r13 6 6 7 7 #import "DBBookmarkBarPopUpButton.h" 8 #import "DBBookmarkBar.h" 8 9 9 10 #import "NSBezierPathRoundRects.h" … … 64 65 if (stringSize.width < textFrame.size.width) 65 66 { 66 float extraWidth = textFrame.size.width - stringSize.width;67 CGFloat extraWidth = textFrame.size.width - stringSize.width; 67 68 textFrame.origin.x = textFrame.origin.x + extraWidth / 2; 68 69 } … … 81 82 [self removeAllItems]; 82 83 83 NSArray* menuItems = [ [self superview]menuItemsForPopUpButton: self];84 NSArray* menuItems = [((DBBookmarkBar*)[self superview]) menuItemsForPopUpButton: self]; 84 85 85 86 if ([menuItems count] > 0) … … 87 88 NSMenu* menu = [self menu]; 88 89 NSEnumerator* menuItemEnumerator = [menuItems objectEnumerator]; 89 id<NSMenuItem>currentMenuItem = nil;90 NSMenuItem* currentMenuItem = nil; 90 91 91 92 while ((currentMenuItem = [menuItemEnumerator nextObject]) != nil) … … 103 104 - (void) deselectItems 104 105 { 105 intnumberOfItems = [self numberOfItems];106 NSInteger numberOfItems = [self numberOfItems]; 106 107 107 108 if (numberOfItems > 0) 108 109 { 109 110 NSMenu* menu = [self menu]; 110 intnumberOfMenuItems = [menu numberOfItems];111 NSInteger numberOfMenuItems = [menu numberOfItems]; 111 112 112 113 if (numberOfMenuItems > 0) -
Source/DBBookmarkController.h
r11 r13 58 58 // View methods 59 59 - (void) setTableView: (NSTableView*) tableView; 60 - ( int) numberOfRows;61 - (NSString*) stringForRow: ( int) row;60 - (NSInteger) numberOfRows; 61 - (NSString*) stringForRow: (NSInteger) row; 62 62 - (void) tableViewDoubleClick; 63 63 - (void) tableViewDeleteKeyPressed: (NSTableView*) tableView; 64 - (void) loadBookmarkAtIndex: ( int) index;64 - (void) loadBookmarkAtIndex: (NSInteger) index; 65 65 - (void) bookmarkDelete: (NSNotification*) notification; 66 66 - (void) deleteBookmark: (DBBookmark*) bookmark; 67 - (void) deleteBookmarkAtIndex: ( int) index;67 - (void) deleteBookmarkAtIndex: (NSInteger) index; 68 68 69 69 // Main window … … 74 74 - (NSArray*) bookmarks; 75 75 - (NSEnumerator*) bookmarkEnumerator; 76 - (void) bookmarkDraggedFromIndex: ( int) index toIndex: (int) newIndex;76 - (void) bookmarkDraggedFromIndex: (NSInteger) index toIndex: (NSInteger) newIndex; 77 77 78 78 // Bookmark editing window -
Source/DBBookmarkController.m
r11 r13 32 32 @interface NSMutableArray (SGSAdditions) 33 33 34 - ( int) moveObjectsAtIndexes: (NSIndexSet*) indexSet toIndex: (int) index;34 - (NSInteger) moveObjectsAtIndexes: (NSIndexSet*) indexSet toIndex: (NSInteger) index; 35 35 36 36 @end … … 91 91 NSMenu* bookmarksRoot = [[[NSApp mainMenu] itemWithTitle:@"Bookmarks"] submenu]; 92 92 93 intoffset = 3;93 NSInteger offset = 3; 94 94 unsigned count = [[bookmarksRoot itemArray] count]; 95 95 unsigned i; … … 333 333 - (IBAction) loadSelectedBookmark: (id) sender 334 334 { 335 intselectedRow = [mBookmarkTableView selectedRow];335 NSInteger selectedRow = [mBookmarkTableView selectedRow]; 336 336 337 337 if (selectedRow > -1 && selectedRow < [mBookmarkTableView numberOfRows]) … … 343 343 - (IBAction) deleteSelectedBookmark: (id) sender 344 344 { 345 intselectedRow = [mBookmarkTableView selectedRow];345 NSInteger selectedRow = [mBookmarkTableView selectedRow]; 346 346 347 347 if (selectedRow > -1 && selectedRow < [mBookmarkTableView numberOfRows]) … … 411 411 } 412 412 413 - ( int) numberOfRows414 { 415 intnumberOfRows = [mBookmarks count];413 - (NSInteger) numberOfRows 414 { 415 NSInteger numberOfRows = [mBookmarks count]; 416 416 417 417 return numberOfRows; 418 418 } 419 419 420 - (NSString*) stringForRow: ( int) row420 - (NSString*) stringForRow: (NSInteger) row 421 421 { 422 422 NSString* string = nil; … … 443 443 - (void) tableViewDoubleClick 444 444 { 445 introw = [mBookmarkTableView selectedRow];445 NSInteger row = [mBookmarkTableView selectedRow]; 446 446 447 447 if (row > -1 && row < [mBookmarks count]) … … 455 455 if (tableView == mBookmarkTableView) 456 456 { 457 introw = [mBookmarkTableView selectedRow];457 NSInteger row = [mBookmarkTableView selectedRow]; 458 458 459 459 if (row > -1 && row < [mBookmarks count]) … … 464 464 } 465 465 466 - (void) loadBookmarkAtIndex: ( int) index466 - (void) loadBookmarkAtIndex: (NSInteger) index 467 467 { 468 468 if (index < [mBookmarks count]) … … 489 489 - (void) deleteBookmark: (DBBookmark*) bookmark 490 490 { 491 intindex = [mBookmarks indexOfObject: bookmark];491 NSInteger index = [mBookmarks indexOfObject: bookmark]; 492 492 493 493 if (index != NSNotFound) … … 502 502 } 503 503 504 - (void) deleteBookmarkAtIndex: ( int) index504 - (void) deleteBookmarkAtIndex: (NSInteger) index 505 505 { 506 506 DBBookmark* bookmark = [mBookmarks objectAtIndex: index]; … … 545 545 } 546 546 547 - (void) bookmarkDraggedFromIndex: ( int) index toIndex: (int) newIndex547 - (void) bookmarkDraggedFromIndex: (NSInteger) index toIndex: (NSInteger) newIndex 548 548 { 549 549 DBBookmark* draggedBookmark = [[mBookmarks objectAtIndex: index] retain]; … … 575 575 #pragma mark - 576 576 577 - (id) outlineView: (NSOutlineView*) outlineView child: ( int) index ofItem: (id) item577 - (id) outlineView: (NSOutlineView*) outlineView child: (NSInteger) index ofItem: (id) item 578 578 { 579 579 id childItem = nil; … … 603 603 } 604 604 605 - ( int) outlineView: (NSOutlineView*) outlineView numberOfChildrenOfItem: (id) item606 { 607 intnumberOfChildren = 0;605 - (NSInteger) outlineView: (NSOutlineView*) outlineView numberOfChildrenOfItem: (id) item 606 { 607 NSInteger numberOfChildren = 0; 608 608 609 609 if (item == nil) … … 643 643 #pragma mark NSTableView Data Source Methods 644 644 645 - ( int) numberOfRowsInTableView: (NSTableView*) tableView645 - (NSInteger) numberOfRowsInTableView: (NSTableView*) tableView 646 646 { 647 647 return [self numberOfRows]; 648 648 } 649 649 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]; 658 653 } 659 654 … … 662 657 #pragma mark NSTableView Delegate Methods 663 658 664 - (void) tableView: (NSTableView*) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn*) tableColumn row: ( int) row659 - (void) tableView: (NSTableView*) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn*) tableColumn row: (NSInteger) row 665 660 { 666 661 [cell setFont: [NSFont systemFontOfSize: 10.0]]; … … 706 701 707 702 708 - (NSDragOperation) tableView: (NSTableView*) tableView validateDrop: (id <NSDraggingInfo>) info proposedRow: ( int) row proposedDropOperation: (NSTableViewDropOperation) operation703 - (NSDragOperation) tableView: (NSTableView*) tableView validateDrop: (id <NSDraggingInfo>) info proposedRow: (NSInteger) row proposedDropOperation: (NSTableViewDropOperation) operation 709 704 { 710 705 if (row == -1) … … 725 720 726 721 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; 728 723 { 729 724 BOOL accepted = NO; 730 725 NSPasteboard* pboard = [info draggingPasteboard]; 731 NSDragOperation srcMask = [info draggingSourceOperationMask];732 726 733 727 if (tableView == mBookmarkTableView) … … 748 742 [tableView deselectAll: self]; 749 743 750 intindex = [rowIndexes lastIndex];744 NSInteger index = [rowIndexes lastIndex]; 751 745 752 746 while (index != NSNotFound) … … 788 782 { 789 783 NSMutableArray* arrayOfIndexes = [NSMutableArray array]; 790 intindex = [self lastIndex];784 NSInteger index = [self lastIndex]; 791 785 NSNumber* number = nil; 792 786 … … 814 808 NSEnumerator* arrayEnumerator = [array objectEnumerator]; 815 809 NSNumber* currentNumber = nil; 816 intnewIndex = 0;810 NSInteger newIndex = 0; 817 811 818 812 while ((currentNumber = [arrayEnumerator nextObject]) != nil) … … 835 829 836 830 837 - ( int) moveObjectsAtIndexes: (NSIndexSet*) indexSet toIndex: (int) index838 { 839 int returnVal = index;831 - (NSInteger) moveObjectsAtIndexes: (NSIndexSet*) indexSet toIndex: (NSInteger) index 832 { 833 NSInteger returnVal = 0; 840 834 NSMutableArray* objectsToMove = (NSMutableArray*)[self objectsAtIndexes: indexSet]; 841 835 NSEnumerator* objectEnumerator = [objectsToMove reverseObjectEnumerator]; … … 844 838 while ((currentObject = [objectEnumerator nextObject]) != nil) 845 839 { 846 intindexOfCurrentObject = [self indexOfObject: currentObject];840 NSInteger indexOfCurrentObject = [self indexOfObject: currentObject]; 847 841 848 842 [self removeObjectAtIndex: indexOfCurrentObject]; -
Source/DBBookmarkMenuCell.m
r7 r13 101 101 if (stringSize.width < textFrame.size.width) 102 102 { 103 float extraWidth = textFrame.size.width - stringSize.width;103 CGFloat extraWidth = textFrame.size.width - stringSize.width; 104 104 textFrame.origin.x = textFrame.origin.x + extraWidth / 2; 105 105 } … … 246 246 NSDictionary* stringAttributes = [self textAttributes]; 247 247 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; 250 250 251 251 [self setFrame: NSMakeRect(frame.origin.x, frame.origin.y, newWidth, frame.size.height)]; -
Source/DBBookmarkTableDataSource.m
r11 r13 38 38 39 39 40 - ( int) numberOfRowsInTableView: (NSTableView*) tableView40 - (NSInteger) numberOfRowsInTableView: (NSTableView*) tableView 41 41 { 42 42 return [mBookmarkController numberOfBookmarks]; 43 43 } 44 44 45 - (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) tableColumn row: ( int) row45 - (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) tableColumn row: (NSInteger) row 46 46 { 47 47 id value = nil; … … 86 86 87 87 88 - ( int) outlineView: (NSOutlineView*) outlineView numberOfChildrenOfItem: (id) item89 { 90 intnumberOfChildren = 0;88 - (NSInteger) outlineView: (NSOutlineView*) outlineView numberOfChildrenOfItem: (id) item 89 { 90 NSInteger numberOfChildren = 0; 91 91 92 92 if (item != nil && [item respondsToSelector: @selector(subBookmarks)]) … … 111 111 112 112 113 - (id) outlineView: (NSOutlineView*) outlineView child: ( int) index ofItem: (id) item113 - (id) outlineView: (NSOutlineView*) outlineView child: (NSInteger) index ofItem: (id) item 114 114 { 115 115 id child = nil; … … 175 175 } 176 176 177 - (NSDragOperation) outlineView: (NSOutlineView*) olv validateDrop: (id <NSDraggingInfo>) info proposedItem: (id) item proposedChildIndex: ( int) index177 - (NSDragOperation) outlineView: (NSOutlineView*) olv validateDrop: (id <NSDraggingInfo>) info proposedItem: (id) item proposedChildIndex: (NSInteger) index 178 178 { 179 179 NSDragOperation operation = NSDragOperationGeneric; … … 182 182 } 183 183 184 - (BOOL) outlineView: (NSOutlineView*) olv acceptDrop: (id <NSDraggingInfo>) info item: (id) item childIndex: ( int) index184 - (BOOL) outlineView: (NSOutlineView*) olv acceptDrop: (id <NSDraggingInfo>) info item: (id) item childIndex: (NSInteger) index 185 185 { 186 186 BOOL acceptDrop = NO; 187 187 188 NSPasteboard* draggingPboard = [info draggingPasteboard];188 //NSPasteboard* draggingPboard = [info draggingPasteboard]; 189 189 NSDragOperation draggingMask = [info draggingSourceOperationMask]; 190 190 191 191 if (draggingMask == NSTableViewDropAbove) 192 192 { 193 NSDictionary* bdict = [draggingPboard propertyListForType: kBookmarkDragType];193 //NSDictionary* bdict = [draggingPboard propertyListForType: kBookmarkDragType]; 194 194 //DBBookmark* newBookmark = [[DBBookmark alloc] initWithDictionary: bdict]; 195 195 //[item addBookmark: newBookmark]; 196 inti = [mDraggingBookmarks count];196 NSInteger i = [mDraggingBookmarks count]; 197 197 while (i--) 198 198 { -
Source/DBBookmarkWindowController.m
r1 r13 76 76 - (IBAction) remove: (id) sender 77 77 { 78 intselectedRow = [mTableView selectedRow];78 NSInteger selectedRow = [mTableView selectedRow]; 79 79 80 80 if (selectedRow > -1 && selectedRow < [mTableView numberOfRows]) … … 88 88 - (IBAction) load: (id) sender 89 89 { 90 intselectedRow = [mTableView selectedRow];90 NSInteger selectedRow = [mTableView selectedRow]; 91 91 92 92 if (selectedRow > -1 && selectedRow < [mTableView numberOfRows]) -
Source/DBDownloadController.h
r1 r13 25 25 NSMutableArray* mDownloads; 26 26 27 intmNumloads;28 intmNumloadsfinished;27 NSInteger mNumloads; 28 NSInteger mNumloadsfinished; 29 29 30 30 double mLastUpdate; … … 48 48 - (void) tableViewDoubleClick; 49 49 50 - ( int) downloadsInProgress;50 - (NSInteger) downloadsInProgress; 51 51 - (BOOL) deskBrowseShouldTerminate; 52 52 -
Source/DBDownloadController.m
r5 r13 108 108 if (mDownloadTableView != nil) 109 109 { 110 introw = [mDownloadTableView selectedRow];110 NSInteger row = [mDownloadTableView selectedRow]; 111 111 DBDownloadObject* object = nil; 112 112 … … 140 140 } 141 141 142 - (void) alertDidEnd: (NSAlert*) alert returnCode: ( int) returnCode contextInfo: (void*) contextInfo142 - (void) alertDidEnd: (NSAlert*) alert returnCode: (NSInteger) returnCode contextInfo: (void*) contextInfo 143 143 { 144 144 if (returnCode == NSOKButton) … … 172 172 if (mDownloadTableView != nil) 173 173 { 174 introw = [mDownloadTableView selectedRow];174 NSInteger row = [mDownloadTableView selectedRow]; 175 175 176 176 if (row > -1 && row < [mDownloads count]) … … 186 186 } 187 187 188 - ( int) downloadsInProgress188 - (NSInteger) downloadsInProgress 189 189 { 190 190 return mNumloads; … … 199 199 - (void) tableViewDoubleClick 200 200 { 201 introw = [mDownloadTableView selectedRow];201 NSInteger row = [mDownloadTableView selectedRow]; 202 202 203 203 if (row > -1 && row < [mDownloads count]) … … 211 211 212 212 213 - ( int) numberOfRowsInTableView: (NSTableView*) tableView213 - (NSInteger) numberOfRowsInTableView: (NSTableView*) tableView 214 214 { 215 215 return [mDownloads count]; 216 216 } 217 217 218 - (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) column row: ( int) row218 - (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) column row: (NSInteger) row 219 219 { 220 220 id value = nil; … … 236 236 #pragma mark - 237 237 238 - (void) tableView: (NSTableView*) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn*) tableColumn row: ( int) row238 - (void) tableView: (NSTableView*) tableView willDisplayCell: (id) cell forTableColumn: (NSTableColumn*) tableColumn row: (NSInteger) row 239 239 { 240 240 [(NSCell*)cell setFont: [NSFont systemFontOfSize: 10.0]]; … … 366 366 NSString* downloadedFilePath = [downloadObject downloadedFilePath]; 367 367 NSString* nameOfDownloadedFile = [downloadedFilePath lastPathComponent]; 368 NSWorkspace* workspace = [NSWorkspace sharedWorkspace];369 368 NSFileManager* fileManager = [NSFileManager defaultManager]; 370 369 … … 517 516 informativeTextWithFormat: @"You have %@ in progress. Quitting will stop all downloads. Do you still want to quit?", alertMessage]; 518 517 519 intresponse = [downloadAlert runModal];518 NSInteger response = [downloadAlert runModal]; 520 519 521 520 if (response == NSOKButton) -
Source/DBDownloadObject.h
r1 r13 36 36 DBDownloadStatus mStatus; 37 37 38 float mBytesLoaded;39 float mExpectedLength;38 CGFloat mBytesLoaded; 39 CGFloat mExpectedLength; 40 40 } 41 41 … … 56 56 57 57 - (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; 61 61 62 62 - (NSString *)stringStatus; -
Source/DBDownloadObject.m
r1 r13 201 201 202 202 203 - ( float) bytesLoaded203 - (CGFloat) bytesLoaded 204 204 { 205 205 return mBytesLoaded; 206 206 } 207 207 208 - (void) setBytesLoaded: ( float) bytes208 - (void) setBytesLoaded: (CGFloat) bytes 209 209 { 210 210 mBytesLoaded = bytes; … … 212 212 } 213 213 214 - ( int) percentComplete215 { 216 int percentComplete = (mBytesLoaded / (float) mExpectedLength) * 100.0;214 - (NSInteger) percentComplete 215 { 216 NSInteger percentComplete = (mBytesLoaded / (CGFloat) mExpectedLength) * 100.0; 217 217 218 218 if(percentComplete < 0) … … 240 240 if (mExpectedLength != NSURLResponseUnknownLength) 241 241 { 242 fileSize = [NSNumber numberWithInt: (mExpectedLength / 1024)]; // kilobytes242 //fileSize = [NSNumber numberWithInt: (mExpectedLength / 1024)]; // kilobytes 243 243 stringStatus = [NSString stringWithFormat: @"%i%%", [self percentComplete]]; 244 244 } -
Source/DBHTMLParser.m
r1 r13 61 61 NSScanner* linkScanner = [NSScanner scannerWithString: HTMLString]; 62 62 NSCharacterSet* quotesCharacterSet = [NSCharacterSet characterSetWithCharactersInString: kQuoteCharacters]; 63 intlengthOfHTMLString = [HTMLString length];64 intlengthOfAOpen = [kAOpen length];65 intlengthOfHREF = [kHREF length];63 NSInteger lengthOfHTMLString = [HTMLString length]; 64 NSInteger lengthOfAOpen = [kAOpen length]; 65 NSInteger lengthOfHREF = [kHREF length]; 66 66 67 67 while (![linkScanner isAtEnd]) 68 68 { 69 69 NSString* intoString = nil; 70 intscanLocation = [linkScanner scanLocation];71 intlengthOfRemainingString = lengthOfHTMLString - scanLocation;70 NSInteger scanLocation = [linkScanner scanLocation]; 71 NSInteger lengthOfRemainingString = lengthOfHTMLString - scanLocation; 72 72 73 73 NSRange rangeOfAOpen = NSMakeRange(scanLocation, lengthOfAOpen); … … 167 167 - (NSString*) pReplaceHTMLCodesInString: (NSString*) HTMLString 168 168 { 169 NSMutableString* newString= [[HTMLString mutableCopy] autorelease];170 NSRange currentRange = NSMakeRange(NSNotFound, 0);169 NSMutableString* newString = [[HTMLString mutableCopy] autorelease]; 170 NSRange currentRange; 171 171 172 172 -
Source/DBHistoryController.h
r1 r13 18 18 id view; 19 19 WebHistory* webHistory; 20 intnumberOfDaysToDisplay;20 NSInteger numberOfDaysToDisplay; 21 21 } 22 22 … … 38 38 39 39 // 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; 48 48 49 49 - (NSMenu *)menuForHistory; -
Source/DBHistoryController.m
r2 r13 196 196 - (void) loadSelected 197 197 { 198 intselectedRow = [view selectedRow];198 NSInteger selectedRow = [view selectedRow]; 199 199 200 200 if(selectedRow > -1) … … 214 214 - (void) removeSelected 215 215 { 216 intselectedRow = [view selectedRow] - 1;216 NSInteger selectedRow = [view selectedRow] - 1; 217 217 NSArray* itemsToRemove = nil; 218 218 … … 289 289 // 290 290 291 - ( int) numberOfDates292 { 293 intnumber;291 - (NSInteger) numberOfDates 292 { 293 NSInteger number; 294 294 295 295 number = [[webHistory orderedLastVisitedDays] count]; … … 303 303 // 304 304 305 - ( int) numberOfRows306 { 307 intnumber = 0;305 - (NSInteger) numberOfRows 306 { 307 NSInteger number = 0; 308 308 NSArray* dates = [webHistory orderedLastVisitedDays]; 309 309 NSCalendarDate* currentDate = nil; 310 310 311 inti;311 NSInteger i; 312 312 for(i = 0; i < [dates count]; i++) 313 313 { … … 326 326 // 327 327 328 - ( int) numberOfItemsForDate: (NSCalendarDate*) date329 { 330 intnumber;328 - (NSInteger) numberOfItemsForDate: (NSCalendarDate*) date 329 { 330 NSInteger number; 331 331 332 332 number = [[webHistory orderedItemsLastVisitedOnDay: date] count]; … … 340 340 // 341 341 342 - (BOOL) isDateAtIndex: ( int) index342 - (BOOL) isDateAtIndex: (NSInteger) index 343 343 { 344 344 BOOL isDate = NO; 345 345 346 346 NSMutableArray* dateIndexes = [[NSMutableArray alloc] init]; 347 intcurrentIndex = 0;348 349 inti;347 NSInteger currentIndex = 0; 348 349 NSInteger i; 350 350 for(i = 0; i < [self numberOfDates]; i++) 351 351 { 352 352 [dateIndexes addObject: [NSNumber numberWithInt: currentIndex]]; 353 353 354 intj;354 NSInteger j; 355 355 for(j = 0; j < [self numberOfItemsForDate: [self dateAtIndex: i]]; j++) 356 356 { … … 380 380 // 381 381 382 - (NSCalendarDate*) dateAtIndex: ( int) index382 - (NSCalendarDate*) dateAtIndex: (NSInteger) index 383 383 { 384 384 NSCalendarDate* date = nil; … … 395 395 // 396 396 397 - (id) itemAtIndex: ( int) index397 - (id) itemAtIndex: (NSInteger) index 398 398 { 399 399 id item = nil; 400 400 401 intcurrentIndex = -1;401 NSInteger currentIndex = -1; 402 402 NSArray* dates = [webHistory orderedLastVisitedDays]; 403 403 NSArray* currentItems = nil; … … 407 407 if(index > -1) 408 408 { 409 inti;409 NSInteger i; 410 410 for(i = 0; i < [dates count]; i++) 411 411 { … … 421 421 currentItems = [webHistory orderedItemsLastVisitedOnDay: currentDate]; 422 422 423 intj;423 NSInteger j; 424 424 for(j = 0; j < [currentItems count]; j++) 425 425 { … … 444 444 // 445 445 446 - (id) objectForDate: (NSCalendarDate*) date index: ( int) index446 - (id) objectForDate: (NSCalendarDate*) date index: (NSInteger) index 447 447 { 448 448 NSArray* items = nil; … … 475 475 // 476 476 477 - (void) rowClicked: ( int) row477 - (void) rowClicked: (NSInteger) row 478 478 { 479 479 if(row > -1 && ![self isDateAtIndex: row]) -
Source/DBHistoryView.h
r1 r13 16 16 NSColor* selectedTextColor; 17 17 NSColor* finishedTextColor; 18 inttextSize;19 intselectedRow;18 NSInteger textSize; 19 NSInteger selectedRow; 20 20 NSMutableDictionary* textAttributes; 21 float rowHeight;22 float topPadding;21 CGFloat rowHeight; 22 CGFloat topPadding; 23 23 } 24 24 … … 27 27 // 28 28 29 - (NSString*) string: (NSString*) string withAttributes: (NSDictionary*) attributes constrainedToWidth: ( float) width;29 - (NSString*) string: (NSString*) string withAttributes: (NSDictionary*) attributes constrainedToWidth: (CGFloat) width; 30 30 - (void) setTextColor: (NSColor*) color; 31 - (void) setTextSize: ( int) size;31 - (void) setTextSize: (NSInteger) size; 32 32 33 33 // 34 - ( int) selectedRow;34 - (NSInteger) selectedRow; 35 35 - (void) updateSelectedRow; 36 36 - (void) reloadData; -
Source/DBHistoryView.m
r1 r13 91 91 NSRect pageArea = NSMakeRect(displayArea.origin.x + 20, displayArea.origin.y, displayArea.size.width - 20, displayArea.size.height); 92 92 93 intdates = [delegate numberOfDates];94 95 intitemsForCurrentDate = 0;96 intcurrentDrawRow = 1;93 NSInteger dates = [delegate numberOfDates]; 94 95 NSInteger itemsForCurrentDate = 0; 96 NSInteger currentDrawRow = 1; 97 97 NSCalendarDate* currentDate = nil; 98 98 NSString* pageString = nil; 99 99 NSString* dateString = nil; 100 100 101 inti;102 intj;101 NSInteger i; 102 NSInteger j; 103 103 104 104 // Draw history items … … 150 150 ////------------------------------------------------- 151 151 152 - (NSString*) string: (NSString*) string withAttributes: (NSDictionary*) attributes constrainedToWidth: ( float) width152 - (NSString*) string: (NSString*) string withAttributes: (NSDictionary*) attributes constrainedToWidth: (CGFloat) width 153 153 { 154 154 NSString* fixedString = string; … … 158 158 if(stringSize.width > width) 159 159 { 160 inti = [string length];160 NSInteger i = [string length]; 161 161 while([currentString sizeWithAttributes: attributes].width > width) 162 162 { … … 197 197 ////------------------------------------------------- 198 198 199 - (void) setTextSize: ( int) size199 - (void) setTextSize: (NSInteger) size 200 200 { 201 201 textSize = size; … … 213 213 if(delegate != nil) 214 214 { 215 NSPoint origin = [self frame].origin;216 215 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; 218 217 219 218 selectedRow = ceil(clickPointY / rowHeight); … … 243 242 - (void) keyDown: (NSEvent*) theEvent 244 243 { 245 introw = [self selectedRow];246 intkeyCode = [theEvent keyCode];244 NSInteger row = [self selectedRow]; 245 NSInteger keyCode = [theEvent keyCode]; 247 246 unichar character = [DBKeyStuff characterForKeyCode: keyCode]; 248 247 … … 267 266 [self updateSelectedRow]; 268 267 269 float newHeight = ([delegate numberOfRows] * rowHeight);268 CGFloat newHeight = ([delegate numberOfRows] * rowHeight); 270 269 271 270 if ([[self enclosingScrollView] frame].size.height > newHeight) … … 284 283 } 285 284 286 - ( int) selectedRow285 - (NSInteger) selectedRow 287 286 { 288 287 return selectedRow; … … 291 290 - (void) updateSelectedRow 292 291 { 293 intnumberOfRows = [delegate numberOfRows];292 NSInteger numberOfRows = [delegate numberOfRows]; 294 293 295 294 if(selectedRow > numberOfRows - 1 || [delegate isDateAtIndex: selectedRow - 1]) -
Source/DBKeyStuff.h
r1 r13 21 21 22 22 + (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; 25 25 + (NSString*) stringForKeyCode: (unsigned short) keyCode; 26 26 -
Source/DBKeyStuff.m
r1 r13 94 94 // -------------------------------------- 95 95 96 + (NSString*) stringForKeyCode: (unsigned short) keyCode modifiers: ( unsigned int) modifiers96 + (NSString*) stringForKeyCode: (unsigned short) keyCode modifiers: (NSUInteger) modifiers 97 97 { 98 98 NSString* result = nil; … … 457 457 // -------------------------------------- 458 458 459 + (NSString*) stringForModifiers: ( unsigned int) modifiers459 + (NSString*) stringForModifiers: (NSUInteger) modifiers 460 460 { 461 461 NSMutableString* stringResult = [NSMutableString string]; -
Source/DBKeychainAccess.m
r1 r13 58 58 { 59 59 NSString* password = nil; 60 intnumberOfAttributes = (name != nil) + (account != nil);60 NSInteger numberOfAttributes = (name != nil) + (account != nil); 61 61 62 62 if (numberOfAttributes > 0) … … 67 67 SecKeychainAttribute attributes[numberOfAttributes]; 68 68 69 intindex = 0;69 NSInteger index = 0; 70 70 71 71 if (name != nil) -
Source/DBLeveledWindow.m
r1 r13 13 13 14 14 15 - (id) initWithContentRect: (NSRect) contentRect styleMask: ( unsigned int) styleMask backing: (NSBackingStoreType) backingType defer: (BOOL) flag15 - (id) initWithContentRect: (NSRect) contentRect styleMask: (NSUInteger) styleMask backing: (NSBackingStoreType) backingType defer: (BOOL) flag 16 16 { 17 17 if (self = [super initWithContentRect: contentRect styleMask: styleMask backing: backingType defer: flag]) … … 45 45 - (void) windowLevelChanged: (NSNotification*) notification 46 46 { 47 intwindowLevel = [DBWindowLevel windowLevel];47 NSInteger windowLevel = [DBWindowLevel windowLevel]; 48 48 49 49 if (mAboveMainWindowLevel) -
Source/DBLocationTextFieldCell.m
r5 r13 151 151 #pragma mark - 152 152 153 - (void) selectWithFrame: (NSRect) frame inView: (NSView*) controlView editor: (NSText*) editor delegate: (id) delegate start: ( int) selStart length: (int) selLength153 - (void) selectWithFrame: (NSRect) frame inView: (NSView*) controlView editor: (NSText*) editor delegate: (id) delegate start: (NSInteger) selStart length: (NSInteger) selLength 154 154 { 155 155 [super selectWithFrame: [self textRectForFrame: frame] inView: controlView editor: editor delegate: delegate start: selStart length: selLength]; -
Source/DBPreferenceController.h
r1 r13 64 64 - (IBAction) changeDownloadLocation: (id) sender; 65 65 66 - (void) setLevel: ( int) newLevel;66 - (void) setLevel: (NSInteger) newLevel; 67 67 - (void) syncViewWithUserPrefs; 68 68 -
Source/DBPreferenceController.m
r12 r13 10 10 #import "DBHotKeyController.h" 11 11 12 intstateFromBool(BOOL aBool); // declaration13 int oppositeBoolInt(intbi);14 intstateFromBool(BOOL aBool) {12 NSInteger stateFromBool(BOOL aBool); // declaration 13 NSInteger oppositeBoolInt(NSInteger bi); 14 NSInteger stateFromBool(BOOL aBool) { 15 15 if (aBool) { 16 16 return NSOnState; … … 20 20 } 21 21 22 int oppositeBoolInt(intbi) {22 NSInteger oppositeBoolInt(NSInteger bi) { 23 23 if (bi == 0) 24 24 return 1; … … 286 286 if(defaultPrefs) 287 287 { 288 userDefaults = [NSUserDefaults standardUserDefaults];288 //userDefaults = [NSUserDefaults standardUserDefaults]; 289 289 290 290 [showMenuBarAndDock setState: [[defaultPrefs valueForKey: kShowMenuBarAndDock] boolValue]]; … … 417 417 // ----------------------------------- 418 418 419 - (void) setLevel: ( int) newLevel419 - (void) setLevel: (NSInteger) newLevel 420 420 { 421 421 [[self window] setLevel: newLevel]; … … 441 441 } 442 442 443 - (void) openPanelDidEnd: (NSOpenPanel*) sheet returnCode: ( int) returnCode contextInfo: (void*) contextInfo443 - (void) openPanelDidEnd: (NSOpenPanel*) sheet returnCode: (NSInteger) returnCode contextInfo: (void*) contextInfo 444 444 { 445 445 if (sheet != nil && returnCode == NSOKButton) -
Source/DBQuickDownload.h
r1 r13 22 22 WebDownload *download; 23 23 24 intreceivedContentLength;25 intexpectedContentLength;24 NSInteger receivedContentLength; 25 NSInteger expectedContentLength; 26 26 27 27 NSString *_filename; -
Source/DBQuickDownload.m
r1 r13 112 112 } else { 113 113 NSSavePanel *sp = [NSSavePanel savePanel]; 114 intreturnCode = [sp runModalForDirectory:NSHomeDirectory() file:filename];114 NSInteger returnCode = [sp runModalForDirectory:NSHomeDirectory() file:filename]; 115 115 if (returnCode == NSOKButton) { 116 116 [download setDestination:[sp filename] allowOverwrite:YES]; -
Source/DBSlideWindow.h
r1 r13 25 25 { 26 26 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 */ 28 28 BOOL snapping; /* whether we're currently snapping to an edge */ 29 29 NSPoint dragStartLocation; /* keeps track of last drag's mousedown point */ 30 float padding;31 float minWidth;30 CGFloat padding; 31 CGFloat minWidth; 32 32 NSSize clickDistanceFromWindowEdge; 33 33 DBDragMode currentDragMode; -
Source/DBSlideWindow.m
r1 r13 9 9 @implementation DBSlideWindow 10 10 11 typedef intCGSConnection;12 typedef intCGSWindow;11 typedef NSInteger CGSConnection; 12 typedef NSInteger CGSWindow; 13 13 extern CGSConnection _CGSDefaultConnection(); 14 extern OSStatus CGSGetWindowTags(const CGSConnection cid, const CGSWindow wid, int *tags, intthirtyTwo);15 extern OSStatus CGSSetWindowTags(const CGSConnection cid, const CGSWindow wid, int *tags, intthirtyTwo);16 extern OSStatus CGSClearWindowTags(const CGSConnection cid, const CGSWindow wid, int *tags, intthirtyTwo);14 extern OSStatus CGSGetWindowTags(const CGSConnection cid, const CGSWindow wid, NSInteger *tags, NSInteger thirtyTwo); 15 extern OSStatus CGSSetWindowTags(const CGSConnection cid, const CGSWindow wid, NSInteger *tags, NSInteger thirtyTwo); 16 extern OSStatus CGSClearWindowTags(const CGSConnection cid, const CGSWindow wid, NSInteger *tags, NSInteger thirtyTwo); 17 17 18 18 - (void)setSticky:(BOOL)flag { 19 19 CGSConnection connectionID = _CGSDefaultConnection(); 20 20 CGSWindow winNumber = [self windowNumber]; 21 intallTags[0];22 inttheTags[2] = {0x0002, 0};21 NSInteger allTags[0]; 22 NSInteger theTags[2] = {0x0002, 0}; 23 23 24 24 if(!CGSGetWindowTags(connectionID, winNumber, allTags, 32)) { … … 33 33 #pragma mark - 34 34 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 { 36 36 if(self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]) 37 37 { … … 316 316 { 317 317 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]; 321 321 322 322 NSRect newFrame = NSMakeRect(-width, y, width, height); … … 333 333 { 334 334 NSRect frame = [self frame]; 335 NSRect newFrame = frame;335 NSRect newFrame = NSZeroRect; 336 336 NSPoint origin = frame.origin; 337 337 NSSize size = frame.size; -
Source/DBStatusItemController.m
r1 r13 63 63 [websp autorelease]; 64 64 65 return menu;65 return [menu autorelease]; 66 66 } 67 67 -
Source/DBSystemProfiler.m
r1 r13 13 13 CFTypeID propID; 14 14 UInt8 *data; 15 unsigned inti, bufSize;15 NSUInteger i, bufSize; 16 16 UInt8 *s, *t; 17 17 UInt8 firstPart[64], secondPart[64]; -
Source/DBTab.m
r6 r13 243 243 - (void) drawTabInRect: (NSRect) rect 244 244 { 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; 248 248 249 249 NSColor* bgColor = [NSColor colorWithCalibratedWhite:0.75 alpha:1.0]; … … 261 261 [[NSGraphicsContext currentContext] restoreGraphicsState]; 262 262 263 /* float newFillWidth = size.width - ([selectedTabLeft size].width + [selectedTabRight size].width);263 /*CGFloat newFillWidth = size.width - ([selectedTabLeft size].width + [selectedTabRight size].width); 264 264 265 265 … … 363 363 364 364 NSRect bounds = [self bounds]; 365 float topOfTabImage = bounds.size.height;365 //CGFloat topOfTabImage = bounds.size.height; 366 366 367 367 /*if (selected) … … 410 410 { 411 411 NSMutableDictionary* labelAttributes = [NSMutableDictionary dictionary]; 412 float drawY = 5;412 CGFloat drawY = 5; 413 413 414 414 [labelAttributes setValue: [NSFont systemFontOfSize: 11] forKey: NSFontAttributeName]; … … 416 416 417 417 NSString* stringToDraw = [label truncatedToWidth: rect.size.width withAttributes: labelAttributes]; 418 NSSize stringSize = [stringToDraw sizeWithAttributes: labelAttributes];418 //NSSize stringSize = [stringToDraw sizeWithAttributes: labelAttributes]; 419 419 NSPoint drawPoint = NSMakePoint(rect.origin.x, rect.origin.y + drawY); 420 420 … … 484 484 485 485 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]; 488 488 NSRect trackingRect = [self rectForCloseButton]; 489 489 … … 538 538 { 539 539 NSPoint clickPoint = [self convertPoint: [theEvent locationInWindow] fromView: nil]; 540 NSPoint origin = [self frame].origin;540 //NSPoint origin = [self frame].origin; 541 541 542 542 if ([self pointInCloseButton: clickPoint]) … … 563 563 { 564 564 NSPoint clickPoint = [self convertPoint: [theEvent locationInWindow] fromView: nil]; 565 NSPoint origin = [self frame].origin;565 //NSPoint origin = [self frame].origin; 566 566 567 567 if ([self pointInCloseButton: clickPoint]) -
Source/DBTabController.h
r1 r13 19 19 WebView* defaultWebView; 20 20 21 float tabWidth;21 CGFloat tabWidth; 22 22 } 23 23 … … 44 44 - (DBTabBar *)tabBar; 45 45 46 - ( int)tabCount;46 - (NSInteger)tabCount; 47 47 48 48 - (void)reloadTab; -
Source/DBTabController.m
r1 r13 146 146 DBTab *currentTab; 147 147 DBTab *newTab; 148 inti;149 intindexOfTab = [tabs indexOfObject: tab];150 intselectedTab = [tabs indexOfObject: [self selectedTab]];151 intindexOfTabToSelect = selectedTab;148 NSInteger i; 149 NSInteger indexOfTab = [tabs indexOfObject: tab]; 150 NSInteger selectedTab = [tabs indexOfObject: [self selectedTab]]; 151 NSInteger indexOfTabToSelect = selectedTab; 152 152 153 153 if (indexOfTab != NSNotFound) … … 194 194 NSMutableArray* tabsToRemove = [[NSMutableArray alloc] init]; 195 195 196 inti;196 NSInteger i; 197 197 for(i = 0; i < [tabs count]; i++) 198 198 { … … 217 217 - (void) updateTabSize 218 218 { 219 float tabWidthToFit = [tabBar frame].size.width / [tabs count];219 CGFloat tabWidthToFit = [tabBar frame].size.width / [tabs count]; 220 220 221 221 if (tabWidth >= tabWidthToFit) … … 244 244 newSize = NSMakeSize(tabWidth, 29); 245 245 246 inti;246 NSInteger i; 247 247 for(i = 0; i < [tabs count]; i++) 248 248 { … … 259 259 { 260 260 BOOL canFit = YES; 261 float tabWidthToFit = [tabBar frame].size.width / [tabs count];261 CGFloat tabWidthToFit = [tabBar frame].size.width / [tabs count]; 262 262 263 263 if (tabWidthToFit < 50.0) … … 276 276 DBTab* currentTab = nil; 277 277 278 inti;278 NSInteger i; 279 279 for(i = 0; i < [tabs count]; i++) 280 280 { … … 313 313 - (void) selectTabRight 314 314 { 315 intindexOfTabToSelect;315 NSInteger indexOfTabToSelect; 316 316 DBTab* tabToSelect = nil; 317 317 DBTab* selectedTab = [self selectedTab]; 318 intindexOfSelectedTab = [tabs indexOfObject: selectedTab];319 inttabCount = [tabs count];318 NSInteger indexOfSelectedTab = [tabs indexOfObject: selectedTab]; 319 NSInteger tabCount = [tabs count]; 320 320 321 321 if (tabCount > 1) … … 344 344 - (void) selectTabLeft 345 345 { 346 intindexOfTabToSelect;346 NSInteger indexOfTabToSelect; 347 347 DBTab* tabToSelect = nil; 348 348 DBTab* selectedTab = [self selectedTab]; 349 intindexOfSelectedTab = [tabs indexOfObject: selectedTab];350 inttabCount = [tabs count];349 NSInteger indexOfSelectedTab = [tabs indexOfObject: selectedTab]; 350 NSInteger tabCount = [tabs count]; 351 351 352 352 if (tabCount > 1) … … 376 376 DBTab *currentTab = nil; 377 377 DBTab *returnTab = nil; 378 inti;378 NSInteger i; 379 379 for(i = 0; i < [tabs count]; i++) { 380 380 currentTab = [tabs objectAtIndex: i]; … … 395 395 DBTab* currentTab = nil; 396 396 397 inti;397 NSInteger i; 398 398 for(i = 0; i < [tabs count]; i++) 399 399 { 400 currentTab = [tabs objectAtIndex: i];401 402 400 if (webView == [[tabView tabViewItemAtIndex: i] view]) 403 401 { … … 410 408 } 411 409 412 - ( int)tabCount {410 - (NSInteger)tabCount { 413 411 return [tabs count]; 414 412 } … … 416 414 - (void)reloadTab { 417 415 DBTab *sel = [self selectedTab]; 418 inti;419 intindex = -1;416 NSInteger i; 417 NSInteger index = -1; 420 418 for (i=0; i<[tabs count]; i++) { 421 419 if (sel == [tabs objectAtIndex:i]) { … … 432 430 433 431 - (void)reloadAllTabs { 434 inti;432 NSInteger i; 435 433 WebView *wv; 436 434 for (i=0; i<[tabs count]; i++) { -
Source/DBURLFormatter.m
r1 r13 71 71 // there is no dot (ie: http://google ) 72 72 // add www 73 intloc = [newURL rangeOfString:@"//"].location;73 NSInteger loc = [newURL rangeOfString:@"//"].location; 74 74 loc += 2; // skip past the slashes 75 75 NSString *scheme = [newURL substringToIndex:loc]; -
Source/DBViewSourceWindowController.m
r1 r13 7 7 #import "DBViewSourceWindowController.h" 8 8 9 static intcoloring = 0;9 static NSInteger coloring = 0; 10 10 11 11 @implementation DBViewSourceWindowController … … 58 58 59 59 // 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*) contextInfo60 - (void) savePanelDidEnd: (NSSavePanel*) sheet returnCode: (NSInteger) returnCode contextInfo: (void*) contextInfo 61 61 { 62 62 if (sheet != nil && returnCode == NSOKButton) … … 108 108 [[sourceView textStorage] removeAttribute:NSForegroundColorAttributeName range:range]; 109 109 110 intixLeft, ixRight;110 NSInteger ixLeft, ixRight; 111 111 NSDictionary *attsToUse; 112 112 NSString *tagType; … … 118 118 [scanner scanUpToString: @"<" intoString: nil]; 119 119 ixLeft = [scanner scanLocation]; 120 ixRight = [scanner scanLocation];120 //ixRight = [scanner scanLocation]; 121 121 122 122 if ((ixLeft+3) <= [source length]) { -
Source/DBWebsposePassword.m
r1 r13 24 24 // Get password from the keychain 25 25 26 password = [ [keychain passwordFromKeychainWithName: webpsosePasswordKeychainName account: webpsosePasswordKeychainAccount] retain];26 password = [keychain passwordFromKeychainWithName: webpsosePasswordKeychainName account: webpsosePasswordKeychainAccount]; 27 27 28 28 if (password == nil) -
Source/DBWebsposeWindow.m
r1 r13 11 11 12 12 13 - (id) initWithContentRect: (NSRect) contentRect styleMask: ( unsigned int) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag13 - (id) initWithContentRect: (NSRect) contentRect styleMask: (NSUInteger) aStyle backing: (NSBackingStoreType) bufferingType defer: (BOOL) flag 14 14 { 15 15 if(self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: NO]) -
Source/DBWindowLevel.h
r1 r13 16 16 } 17 17 18 + ( int) windowLevel;19 + (void) setWindowLevel: ( int) level;18 + (NSInteger) windowLevel; 19 + (void) setWindowLevel: (NSInteger) level; 20 20 21 21 @end -
Source/DBWindowLevel.m
r1 r13 8 8 9 9 10 static intsWindowLevel;10 static NSInteger sWindowLevel; 11 11 12 12 @implementation DBWindowLevel 13 13 14 14 15 + ( int) windowLevel15 + (NSInteger) windowLevel 16 16 { 17 17 return sWindowLevel; 18 18 } 19 19 20 + (void) setWindowLevel: ( int) level20 + (void) setWindowLevel: (NSInteger) level 21 21 { 22 22 BOOL isDifferentLevel = (level != sWindowLevel); -
Source/DeskBrowseConstants.h
r1 r13 36 36 extern NSString* kPathToDefaultPrefsFile; 37 37 38 extern float kCurrentVersionNumber;38 extern CGFloat kCurrentVersionNumber; 39 39 40 40 typedef enum _KeyCombination -
Source/DeskBrowseConstants.m
r1 r13 36 36 NSString* kPathToDefaultPrefsFile = @"/Contents/Resources/com.SGS-Software.DeskBrowse.DefaultPreferences.plist"; 37 37 38 float kCurrentVersionNumber = 1.4;38 CGFloat kCurrentVersionNumber = 1.4; -
Source/DeskBrowseController.h
r1 r13 78 78 NSString *homePage; // the home page 79 79 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) 81 81 82 82 BOOL spinnerEnabled; … … 189 189 - (void)viewPageSource; 190 190 - (void) updateButtons; 191 - (WebView*) newWebView;191 - (WebView*) createWebView; 192 192 - (void) tabChanged: (NSNotification*) notification; 193 193 - (BOOL)actionMenuVisible; -
Source/DeskBrowseController.m
r6 r13 70 70 // that they will receive. 71 71 72 if (self = [DeskBrowseController class])72 if (self == [DeskBrowseController class]) 73 73 { 74 74 NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; … … 214 214 tabController = [[DBTabController alloc] initWithTabBar: tabBar tabView: tabView]; 215 215 216 [tabController setDefaultWebView: [self newWebView]];216 [tabController setDefaultWebView: [self createWebView]]; 217 217 218 218 … … 269 269 { 270 270 NSTabViewItem* firstTab = [tabView tabViewItemAtIndex: 0]; 271 WebView* newWebView = [self newWebView];271 WebView* newWebView = [self createWebView]; 272 272 273 273 [firstTab setView: newWebView]; … … 294 294 295 295 - (void)handleNewTabRequest:(NSNotification *)notification { 296 WebView *newWebView = [self newWebView];296 WebView *newWebView = [self createWebView]; 297 297 if ([[NSUserDefaults standardUserDefaults] boolForKey:kSelectNewTabs]) 298 298 [tabController newTabWithWebView:newWebView select:YES]; … … 379 379 } 380 380 [self setURLText:targetURL]; 381 WebView *w = [self newWebView];381 WebView *w = [self createWebView]; 382 382 [tabController newTabWithWebView:w select:YES]; 383 383 DBTab* tab = [tabController tabWithWebView:w]; … … 422 422 if ([[currentWebView mainFrame] dataSource] != nil || [[currentWebView mainFrame] provisionalDataSource] != nil) 423 423 { 424 webViewToLoadURL = [self newWebView];424 webViewToLoadURL = [self createWebView]; 425 425 426 426 [tabController newTabWithWebView: webViewToLoadURL select: YES URLString: urlString]; … … 469 469 BOOL isHidden = [bookmarkBar isHidden]; 470 470 471 float height = [bookmarkBar frame].size.height;471 CGFloat height = [bookmarkBar frame].size.height; 472 472 NSRect wvf = [currentWebView frame]; 473 473 … … 629 629 NSMenu* mainMenu = [NSApp mainMenu]; 630 630 NSMenu* appMenu = [[mainMenu itemAtIndex: 0] submenu]; 631 intindexOfQuitItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(terminate:)];632 intindexOfHideItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(hide:)];631 NSInteger indexOfQuitItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(terminate:)]; 632 NSInteger indexOfHideItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(hide:)]; 633 633 NSMenuItem* quitMenuItem = [appMenu itemAtIndex: indexOfQuitItem]; 634 634 NSMenuItem* hideMenuItem = [appMenu itemAtIndex: indexOfHideItem]; … … 649 649 NSMenu* mainMenu = [NSApp mainMenu]; 650 650 NSMenu* appMenu = [[mainMenu itemAtIndex: 0] submenu]; 651 intindexOfQuitItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(terminate:)];652 intindexOfHideItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(hide:)];651 NSInteger indexOfQuitItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(terminate:)]; 652 NSInteger indexOfHideItem = [appMenu indexOfItemWithTarget: NSApp andAction: @selector(hide:)]; 653 653 NSMenuItem* quitMenuItem = [appMenu itemAtIndex: indexOfQuitItem]; 654 654 NSMenuItem* hideMenuItem = [appMenu itemAtIndex: indexOfHideItem]; … … 675 675 { 676 676 DBTab* tab = [tabController tabWithWebView: currentWebView]; 677 NSTextField* field = [self URLField];678 677 NSURL* URL = [NSURL URLWithString: [DBURLFormatter formatAndReturnStringWithString: URLString]]; 679 678 NSURLRequest* URLRequest = [NSURLRequest requestWithURL: URL cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: 60.0]; … … 812 811 813 812 - (IBAction)loadURL:(id)sender { 814 DBTab* tab = [tabController tabWithWebView: currentWebView];813 //DBTab* tab = [tabController tabWithWebView: currentWebView]; 815 814 NSTextField* field = [self URLField]; 816 815 NSString *URLString; … … 879 878 // ip address 880 879 [self loadURLString:@"about:blank"]; 881 NSString *privateip = [NSString stringWith CString:GetPrivateIP()];880 NSString *privateip = [NSString stringWithUTF8String:GetPrivateIP()]; 882 881 NSString *tmpFile = [NSString stringWithFormat:@"/Users/%@/.dbiptmp", NSUserName()]; 883 882 NSString *command = [NSString stringWithFormat:@"curl http://www.whatismyip.org -o \"%@\"", tmpFile]; … … 946 945 if ([kw isEqualTo:slideWindow] || [kw isEqualTo:websposeWindow]) { 947 946 NSSavePanel *sp = [NSSavePanel savePanel]; 948 intresult = NSCancelButton;947 NSInteger result = NSCancelButton; 949 948 NSString *file = nil; 950 949 NSString *source = nil; … … 999 998 - (IBAction) addBookmark: (id) sender 1000 999 { 1001 NSWindow* currentWindow = [self currentWindow];1002 1000 NSURL* bookmarkURL = nil; 1003 1001 NSString* bookmarkTitle = nil; … … 1076 1074 if (![[searchString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] isEqualToString:@""]) { 1077 1075 // 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 1081 1078 query = [query stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]; 1082 1079 query = [NSString stringWithFormat:@"http://www.google.com/search?q=%@", query]; 1083 1080 1084 1081 [self loadURLString: query]; 1085 1086 [query release];1087 1082 } 1088 1083 } … … 1241 1236 1242 1237 - (IBAction)newBlankTab:(id)sender { 1243 WebView* newView = [self newWebView];1238 WebView* newView = [self createWebView]; 1244 1239 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; 1245 1240 … … 1386 1381 decisionListener:(id<WebPolicyDecisionListener>)listener { 1387 1382 1388 intmodifierKeys = [[info objectForKey:WebActionModifierFlagsKey] intValue];1389 intactionType = [[info objectForKey:WebActionNavigationTypeKey] intValue];1383 NSInteger modifierKeys = [[info objectForKey:WebActionModifierFlagsKey] intValue]; 1384 NSInteger actionType = [[info objectForKey:WebActionNavigationTypeKey] intValue]; 1390 1385 1391 1386 if (actionType == WebNavigationTypeLinkClicked) { 1392 WebView *new = [self newWebView];1387 WebView *new = [self createWebView]; 1393 1388 if (modifierKeys & NSCommandKeyMask) { 1394 1389 [tabController newTabWithWebView:new select:YES]; … … 1458 1453 */ 1459 1454 1460 - (WebView*) newWebView1455 - (WebView*) createWebView 1461 1456 { 1462 1457 WebView* newWebView = [[[WebView alloc] initWithFrame: [tabView frame]] autorelease]; … … 1742 1737 if ([[currentWebView mainFrame] dataSource] != nil || [[currentWebView mainFrame] provisionalDataSource] != nil) 1743 1738 { 1744 WebView* newWebView = [self newWebView];1739 WebView* newWebView = [self createWebView]; 1745 1740 NSURL* homePageURL = [NSURL URLWithString: [DBURLFormatter formatAndReturnStringWithString: homePage]]; 1746 1741 NSURLRequest* homePageURLRequest = [NSURLRequest requestWithURL: homePageURL cachePolicy: NSURLRequestUseProtocolCachePolicy timeoutInterval: 60.0]; … … 1768 1763 // Enter SlideBrowse or Webposé mode if the user wants to 1769 1764 1770 intbrowserMode = [userDefaults integerForKey: kBrowserMode];1765 NSInteger browserMode = [userDefaults integerForKey: kBrowserMode]; 1771 1766 1772 1767 if(browserMode == 1) // SlideBrowse … … 1844 1839 NSArray *lines = [contents componentsSeparatedByString:@"\n"]; 1845 1840 NSString *current = nil; 1846 inti;1841 NSInteger i; 1847 1842 for (i=0; i<[lines count]; i++) { 1848 1843 current = [lines objectAtIndex:i]; … … 1857 1852 if ([[currentWebView mainFrame] dataSource] != nil || [[currentWebView mainFrame] provisionalDataSource] != nil) 1858 1853 { 1859 webViewToLoadFile = [self newWebView];1854 webViewToLoadFile = [self createWebView]; 1860 1855 1861 1856 [tabController newTabWithWebView: webViewToLoadFile select: YES URLString: formattedFileName]; … … 1868 1863 1869 1864 /* 1870 inti;1865 NSInteger i; 1871 1866 NSString *file = nil; 1872 1867 NSURL *furl = nil; … … 2047 2042 DBTab* tab = [tabController tabWithWebView: sender]; 2048 2043 2049 intcode = [error code];2044 NSInteger code = [error code]; 2050 2045 2051 2046 if(tab) … … 2065 2060 NSURL *url; 2066 2061 NSAlert *msg; 2067 intresult;2062 NSInteger result; 2068 2063 2069 2064 switch (code) { … … 2160 2155 - (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame { 2161 2156 DBTab* tab = [tabController tabWithWebView: sender]; 2162 intcode = [error code];2157 NSInteger code = [error code]; 2163 2158 2164 2159 if(tab) … … 2178 2173 NSURL *url; 2179 2174 NSAlert *msg; 2180 intresult;2175 NSInteger result; 2181 2176 2182 2177 switch (code) { … … 2357 2352 2358 2353 - (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request { 2359 WebView *newView = [self newWebView];2354 WebView *newView = [self createWebView]; 2360 2355 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; 2361 2356 … … 2452 2447 2453 2448 // Display alert panel 2454 intresult;2449 NSInteger result; 2455 2450 result = [alert runModal]; 2456 2451 … … 2461 2456 //- (NSWindow *)downloadWindowForAuthenticationSheet:(WebDownload *)download {} 2462 2457 2463 - (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInfo modifierFlags:( unsigned int)modifierFlags2458 - (void)webView:(WebView *)sender mouseDidMoveOverElement:(NSDictionary *)elementInfo modifierFlags:(NSUInteger)modifierFlags 2464 2459 { 2465 2460 if(sender == currentWebView) // if this is the visible webview … … 2493 2488 2494 2489 // Display open panel 2495 intresult;2490 NSInteger result; 2496 2491 result = [openPanel runModal]; 2497 2492 -
Source/NSBezierPathRoundRects.h
r1 r13 13 13 @interface NSBezierPath (RoundRects) 14 14 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; 18 18 NSPoint UKCenterOfRect( NSRect rect ); 19 19 NSPoint UKTopCenterOfRect( NSRect rect ); -
Source/NSBezierPathRoundRects.m
r1 r13 13 13 @implementation NSBezierPath (RoundRects) 14 14 15 +(void) fillRoundRectInRect:(NSRect)rect radius:( float) radius15 +(void) fillRoundRectInRect:(NSRect)rect radius:(CGFloat) radius 16 16 { 17 17 NSBezierPath* p = [self bezierPathWithRoundRectInRect: rect radius: radius]; … … 20 20 21 21 22 +(void) strokeRoundRectInRect:(NSRect)rect radius:( float) radius22 +(void) strokeRoundRectInRect:(NSRect)rect radius:(CGFloat) radius 23 23 { 24 24 NSBezierPath* p = [self bezierPathWithRoundRectInRect: rect radius: radius]; … … 37 37 // ----------------------------------------------------------------------------- 38 38 39 +(NSBezierPath*) bezierPathWithRoundRectInRect:(NSRect)rect radius:( float) radius39 +(NSBezierPath*) bezierPathWithRoundRectInRect:(NSRect)rect radius:(CGFloat) radius 40 40 { 41 41 // Make sure radius doesn't exceed a maximum size to avoid artifacts: -
Source/NSDataExtension.m
r1 r13 6 6 { 7 7 /* First valid character that can be indexed in decode lookup table */ 8 static intcharDigitsBase = '2';8 static NSInteger charDigitsBase = '2'; 9 9 10 10 /* Lookup table used to decode() characters in encoded strings */ 11 static intcharDigits[] =11 static NSInteger charDigits[] = 12 12 { 26,27,28,29,30,31,-1,-1,-1,-1,-1,-1,-1,-1 // 23456789:;<=>? 13 13 ,-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14 // @ABCDEFGHIJKLMNO … … 18 18 19 19 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]; 22 22 23 23 // 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. … … 32 32 return nil; // non-canonical length 33 33 } 34 intcharDigitsLen = sizeof(charDigits);35 intbytesLen = (charsLen * 5) >> 3;34 NSInteger charDigitsLen = sizeof(charDigits); 35 NSInteger bytesLen = (charsLen * 5) >> 3; 36 36 Byte bytes[bytesLen]; 37 intbytesOffset = 0, charsOffset = 0;37 NSInteger bytesOffset = 0, charsOffset = 0; 38 38 // Also the code below does test that other discarded bits 39 39 // (1 to 4 bits at end) are effectively 0. 40 40 while (charsLen > 0) 41 41 { 42 intdigit, lastDigit;42 NSInteger digit, lastDigit; 43 43 // STEP n = 0: Read the 1st Char in a 8-Chars subblock 44 44 // 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) 46 46 return nil; // invalid character 47 47 lastDigit = digit << 3; 48 48 // STEP n = 5: Read the 2nd Char in a 8-Chars subblock 49 49 // 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) 51 51 return nil; // invalid character 52 52 bytes[bytesOffset] = (Byte)((digit >> 2) | lastDigit); … … 58 58 // STEP n = 2: Read the 3rd Char in a 8-Chars subblock 59 59 // 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) 61 61 return nil; // invalid character 62 62 lastDigit |= (Byte)(digit << 1); 63 63 // STEP n = 7: Read the 4th Char in a 8-chars Subblock 64 64 // 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) 66 66 return nil; // invalid character 67 67 bytes[bytesOffset + 1] = (Byte)((digit >> 4) | lastDigit); … … 73 73 // STEP n = 4: Read the 5th Char in a 8-Chars subblock 74 74 // 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) 76 76 return nil; // invalid character 77 77 bytes[bytesOffset + 2] = (Byte)((digit >> 1) | lastDigit); … … 83 83 // STEP n = 1: Read the 6th Char in a 8-Chars subblock 84 84 // 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) 86 86 return nil; // invalid character 87 87 lastDigit |= (Byte)(digit << 2); 88 88 // STEP n = 6: Read the 7th Char in a 8-Chars subblock 89 89 // 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) 91 91 return nil; // invalid character 92 92 bytes[bytesOffset + 3] = (Byte)((digit >> 3) | lastDigit); … … 98 98 // STEP n = 3: Read the 8th Char in a 8-Chars subblock 99 99 // 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) 101 101 return nil; // invalid character 102 102 bytes[bytesOffset + 4] = (Byte)(digit | lastDigit); … … 119 119 }; 120 120 const Byte *bytes = [self bytes]; 121 intbytesOffset = 0, bytesLen = [self length];122 intcharsOffset = 0, charsLen = ((bytesLen << 3) + 4) / 5;121 NSInteger bytesOffset = 0, bytesLen = [self length]; 122 NSInteger charsOffset = 0, charsLen = ((bytesLen << 3) + 4) / 5; 123 123 char chars[charsLen]; 124 124 while (bytesLen != 0) { 125 intdigit, lastDigit;125 NSInteger digit, lastDigit; 126 126 // INVARIANTS FOR EACH STEP n in [0..5[; digit in [0..31[; 127 127 // The remaining n bits are already aligned on top positions … … 170 170 bytesLen -= 5; 171 171 } 172 return [NSString stringWith CString:chars length:sizeof(chars)];172 return [NSString stringWithUTF8String:chars]; 173 173 } 174 174 -
Source/NSFileManagerSGSAdditions.m
r1 r13 19 19 NSArray* pathComponents = [[filePath stringByExpandingTildeInPath] pathComponents]; 20 20 21 inti;21 NSInteger i; 22 22 for(i = 0; i < [pathComponents count]; i++) 23 23 { … … 51 51 NSString* fileExtension = [filePath pathExtension]; 52 52 53 inti;53 NSInteger i; 54 54 for(i = 1; i < 999; i++) 55 55 { -
Source/NSStringAdditions.h
r1 r13 10 10 @interface NSString (SGSAdditions) 11 11 12 - (NSString*) truncatedToWidth: ( float) width withAttributes: (NSDictionary*) attributes;12 - (NSString*) truncatedToWidth: (CGFloat) width withAttributes: (NSDictionary*) attributes; 13 13 14 14 @end -
Source/NSStringAdditions.m
r1 r13 10 10 @implementation NSString (SGSAdditions) 11 11 12 - (NSString*) truncatedToWidth: ( float) width withAttributes: (NSDictionary*) attributes12 - (NSString*) truncatedToWidth: (CGFloat) width withAttributes: (NSDictionary*) attributes 13 13 { 14 14 NSString* fixedString = self; … … 18 18 if (stringSize.width > width) 19 19 { 20 inti = [self length];20 NSInteger i = [self length]; 21 21 while ([currentString sizeWithAttributes: attributes].width > width) 22 22 { -
Source/NSWindowFade.m
r1 r13 8 8 #import "NSWindowFade.h" 9 9 10 static NSMutableDictionary *fadeInfo = nil;11 12 @interface NSWindow (FadePrivate)13 14 - (void)fadeInWindow:(NSTimer *)theTimer;15 - (void)fadeOutWindow:(NSTimer *)theTimer;16 17 @end18 10 19 11 @implementation NSWindow (Fade) 20 12 21 13 -(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]; 41 16 } 42 17 43 18 -(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]; 63 20 } 64 21 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 95 22 @end -
Source/WebKitEx.h
r1 r13 19 19 + (void)emptyCache; 20 20 + (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; 25 25 + (id)javaScriptRootObjectClasses; 26 26 + (void)garbageCollectJavaScriptObjects; … … 32 32 @interface WebKitStatistics : NSObject {} 33 33 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; 40 40 41 41 @end … … 76 76 - (id)_createFrameNamed:(id)fp8 inParent:(id)fp12 allowsScrolling:(BOOL)fp16; 77 77 - (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; 79 79 - (void)_receivedError:(id)fp8 fromDataSource:(id)fp12; 80 80 - (void)_mainReceivedError:(id)fp8 fromDataSource:(id)fp12 complete:(BOOL)fp16; … … 88 88 - (id)_openNewWindowWithRequest:(id)fp8; 89 89 - (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; 92 92 - (void)_loadItem:(id)fp8; 93 93 - (void)_loadBackForwardListFromOtherView:(id)fp8; … … 139 139 - (void)_addScrollerDashboardRegions:(id)fp8; 140 140 - (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; 143 143 - (void)handleAuthenticationForResource:(id)fp8 challenge:(id)fp12 fromDataSource:(id)fp16; 144 144 -
Source/main.m
r1 r13 7 7 #import <Cocoa/Cocoa.h> 8 8 9 int main(intargc, char *argv[])9 NSInteger main(NSInteger argc, char *argv[]) 10 10 { 11 11 return NSApplicationMain(argc, (const char **) argv);