adium 3074:c867117688bb: Resolve implicit 64->32 bit castings in...
commits at adium.im
commits at adium.im
Mon Dec 28 18:52:20 UTC 2009
details: http://hg.adium.im/adium/rev/c867117688bb
revision: 3074:c867117688bb
author: Stephen Holt <sholt at adium.im>
date: Mon Dec 28 13:51:48 2009 -0500
Resolve implicit 64->32 bit castings in Adium.framework
Subject: adium 3075:d26a554c0645: Reveal shadowed symbols in Adium.framework.
details: http://hg.adium.im/adium/rev/d26a554c0645
revision: 3075:d26a554c0645
author: Stephen Holt <sholt at adium.im>
date: Mon Dec 28 13:51:48 2009 -0500
Reveal shadowed symbols in Adium.framework.
Subject: adium 3076:c398037eb6d3: Declare previously undeclared selectors in Adium.framework
details: http://hg.adium.im/adium/rev/c398037eb6d3
revision: 3076:c398037eb6d3
author: Stephen Holt <sholt at adium.im>
date: Mon Dec 28 13:51:48 2009 -0500
Declare previously undeclared selectors in Adium.framework
Subject: adium 3077:8e23376a39e6: Resolve new warnings in UnitTests.
details: http://hg.adium.im/adium/rev/8e23376a39e6
revision: 3077:8e23376a39e6
author: Stephen Holt <sholt at adium.im>
date: Mon Dec 28 13:51:48 2009 -0500
Resolve new warnings in UnitTests.
diffs (truncated from 3641 to 1000 lines):
diff -r 601a5c302322 -r 8e23376a39e6 Adium.pch
--- a/Adium.pch Thu Dec 24 02:19:26 2009 -0500
+++ b/Adium.pch Mon Dec 28 13:51:48 2009 -0500
@@ -23,3 +23,5 @@
#import <Adium/AIPreferenceControllerProtocol.h> //Just about everyone needs prefs
#import <Adium/AIPlugin.h> //We use plugins for almost everything
#endif
+
+#include <AIUtilities/AIMathCompatibility.h>
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/AIUtilities Framework/Source/AIAlternatingRowOutlineView.h
--- a/Frameworks/AIUtilities Framework/Source/AIAlternatingRowOutlineView.h Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIAlternatingRowOutlineView.h Mon Dec 28 13:51:48 2009 -0500
@@ -48,7 +48,7 @@
* @param row An integer row
* @return An <tt>NSColor</tt> used to draw the background for <b>row</b>
*/
-- (NSColor *)backgroundColorForRow:(int)row;
+- (NSColor *)backgroundColorForRow:(NSInteger)row;
@property (readwrite, nonatomic) BOOL drawsGradientSelection;
@end
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/AIUtilities Framework/Source/AIAlternatingRowOutlineView.m
--- a/Frameworks/AIUtilities Framework/Source/AIAlternatingRowOutlineView.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIAlternatingRowOutlineView.m Mon Dec 28 13:51:48 2009 -0500
@@ -114,7 +114,7 @@
}
//Returns the color which will be drawn behind the specified row
-- (NSColor *)backgroundColorForRow:(int)row
+- (NSColor *)backgroundColorForRow:(NSInteger)row
{
return ((row % 2) ? [self backgroundColor] : [self alternatingRowColor]);
}
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/AIUtilities Framework/Source/AIMathCompatibility.h
--- a/Frameworks/AIUtilities Framework/Source/AIMathCompatibility.h Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIMathCompatibility.h Mon Dec 28 13:51:48 2009 -0500
@@ -16,12 +16,14 @@
#define AIceil( X ) ceil((X))
#define AIfloor( X ) floor((X))
#define AIfmod( X, Y ) fmod((X),(Y))
+ #define AIfmin( X, Y ) fmin((X),(Y))
#else
#define AIfabs( X ) fabsf((X))
#define AIround( X ) roundf((X))
#define AIceil( X ) ceilf((X))
#define AIfloor( X ) floorf((X))
#define AIfmod( X, Y ) fmodf((X),(Y))
+ #define AIfmin( X, Y ) fminf((X),(Y))
#endif
#endif
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/AIUtilities Framework/Source/AIStringAdditions.h
--- a/Frameworks/AIUtilities Framework/Source/AIStringAdditions.h Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIStringAdditions.h Mon Dec 28 13:51:48 2009 -0500
@@ -38,7 +38,7 @@
- (NSString *)safeFilenameString;
-- (NSString *)stringWithEllipsisByTruncatingToLength:(unsigned int)length;
+- (NSString *)stringWithEllipsisByTruncatingToLength:(NSUInteger)length;
- (NSString *)string;
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/AIUtilities Framework/Source/AIStringAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIStringAdditions.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIStringAdditions.m Mon Dec 28 13:51:48 2009 -0500
@@ -248,7 +248,7 @@
}
-- (NSString *)stringWithEllipsisByTruncatingToLength:(unsigned int)length
+- (NSString *)stringWithEllipsisByTruncatingToLength:(NSUInteger)length
{
NSString *returnString;
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/AIUtilities Framework/Source/AIStringFormatter.h
--- a/Frameworks/AIUtilities Framework/Source/AIStringFormatter.h Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIStringFormatter.h Mon Dec 28 13:51:48 2009 -0500
@@ -21,11 +21,11 @@
*/
@interface AIStringFormatter : NSFormatter {
NSCharacterSet *characters;
- int length;
+ NSInteger length;
BOOL caseSensitive;
NSString *errorMessage;
- int errorCount;
+ NSInteger errorCount;
}
/*!
@@ -38,6 +38,6 @@
* @param errorMessage A message to be displayed to the user after 3 invalid input attempts. If nil, no error message is displayed.
* @return An <tt>AIStringFormatter</tt> object
*/
-+ (id)stringFormatterAllowingCharacters:(NSCharacterSet *)inCharacters length:(int)inLength caseSensitive:(BOOL)inCaseSensitive errorMessage:(NSString *)errorMessage;
++ (id)stringFormatterAllowingCharacters:(NSCharacterSet *)inCharacters length:(NSInteger)inLength caseSensitive:(BOOL)inCaseSensitive errorMessage:(NSString *)errorMessage;
@end
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/AIUtilities Framework/Source/AIStringFormatter.m
--- a/Frameworks/AIUtilities Framework/Source/AIStringFormatter.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIStringFormatter.m Mon Dec 28 13:51:48 2009 -0500
@@ -19,17 +19,17 @@
#define ERRORS_BEFORE_DIALOG 3 //Number of mistakes that can be made before an error dialog will appear
@interface AIStringFormatter ()
-- (id)initAllowingCharacters:(NSCharacterSet *)inCharacters length:(int)inLength caseSensitive:(BOOL)inCaseSensitive errorMessage:(NSString *)inErrorMessage;
+- (id)initAllowingCharacters:(NSCharacterSet *)inCharacters length:(NSInteger)inLength caseSensitive:(BOOL)inCaseSensitive errorMessage:(NSString *)inErrorMessage;
@end
@implementation AIStringFormatter
-+ (id)stringFormatterAllowingCharacters:(NSCharacterSet *)inCharacters length:(int)inLength caseSensitive:(BOOL)inCaseSensitive errorMessage:(NSString *)inErrorMessage
++ (id)stringFormatterAllowingCharacters:(NSCharacterSet *)inCharacters length:(NSInteger)inLength caseSensitive:(BOOL)inCaseSensitive errorMessage:(NSString *)inErrorMessage
{
return [[[self alloc] initAllowingCharacters:inCharacters length:inLength caseSensitive:inCaseSensitive errorMessage:inErrorMessage] autorelease];
}
-- (id)initAllowingCharacters:(NSCharacterSet *)inCharacters length:(int)inLength caseSensitive:(BOOL)inCaseSensitive errorMessage:(NSString *)inErrorMessage
+- (id)initAllowingCharacters:(NSCharacterSet *)inCharacters length:(NSInteger)inLength caseSensitive:(BOOL)inCaseSensitive errorMessage:(NSString *)inErrorMessage
{
if ((self = [super init])) {
errorMessage = [inErrorMessage retain];
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIAbstractAccount.m
--- a/Frameworks/Adium Framework/Source/AIAbstractAccount.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAbstractAccount.m Mon Dec 28 13:51:48 2009 -0500
@@ -49,6 +49,16 @@
@interface AIAccount (Abstract_PRIVATE)
- (void)passwordReturnedForConnect:(NSString *)inPassword returnCode:(AIPasswordPromptReturn)returnCode context:(id)inContext;
+- (void)requestImmediateDynamicContentUpdate:(NSNotification *)notification;
+- (void)adiumDidLoad:(NSNotification *)inNotification;
+- (void)_endSilenceAllUpdates;
+- (void)_delayedUpdateStatusTimer:(NSTimer *)inTimer;
+- (void)gotFilteredOutgoingContent:(NSAttributedString *)filteredValue context:(NSDictionary *)contextDict;
+- (void)_refreshAttributedStrings:(NSTimer *)inTimer;
+- (void)performAutoreconnect;
+- (void)fastUserSwitchLeave:(NSNotification *)notification;
+- (void)fastUserSwitchReturn:(NSNotification *)notification;
+- (void)gotProxyServerPassword:(NSString *)inPassword returnCode:(AIPasswordPromptReturn)returnCode proxyConfiguration:(NSMutableDictionary *)proxyConfiguration;
@end
/*!
@@ -235,7 +245,7 @@
*/
- (int)port
{
- return [[self preferenceForKey:KEY_CONNECT_PORT group:GROUP_ACCOUNT_STATUS] integerValue];
+ return [(NSNumber *)[self preferenceForKey:KEY_CONNECT_PORT group:GROUP_ACCOUNT_STATUS] intValue];
}
/*!
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIAbstractListController.m
--- a/Frameworks/Adium Framework/Source/AIAbstractListController.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAbstractListController.m Mon Dec 28 13:51:48 2009 -0500
@@ -65,6 +65,10 @@
@interface AIAbstractListController ()
- (LIST_POSITION)pillowsFittedIconPositionForIconPosition:(LIST_POSITION)iconPosition contentCellAlignment:(NSTextAlignment)contentCellAlignment;
+- (void)listControllerDragEnded:(NSNotification *)notification;
+- (void)performExpandItem:(NSNotification *)notification;
+- (void)performCollapseItem:(NSNotification *)notification;
+- (void)displayableContainedObjectsDidChange:(NSNotification *)notification;
@end
@implementation AIAbstractListController
@@ -87,7 +91,7 @@
showTooltips = YES;
showTooltipsInBackground = NO;
useContactListGroups = YES;
- backgroundOpacity = 1.0;
+ backgroundOpacity = 1.0f;
//Watch for drags ending so we can clear any cached drag data
[[NSNotificationCenter defaultCenter] addObserver:self
@@ -604,17 +608,17 @@
//Outline View data source ---------------------------------------------------------------------------------------------
#pragma mark Outline View data source
-- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(AIProxyListObject *)item
+- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)idx ofItem:(AIProxyListObject *)item
{
AIProxyListObject *proxyListObject;
if (item) {
AIListObject<AIContainingObject> *listObject = item.listObject;
- proxyListObject = [AIProxyListObject proxyListObjectForListObject:[listObject visibleObjectAtIndex:index]
+ proxyListObject = [AIProxyListObject proxyListObjectForListObject:[listObject visibleObjectAtIndex:idx]
inListObject:listObject];
} else if (hideRoot)
- proxyListObject = [AIProxyListObject proxyListObjectForListObject:[contactList visibleObjectAtIndex:index]
+ proxyListObject = [AIProxyListObject proxyListObjectForListObject:[contactList visibleObjectAtIndex:idx]
inListObject:contactList];
else
proxyListObject = [AIProxyListObject proxyListObjectForListObject:contactList
@@ -710,7 +714,7 @@
- (NSMenu *)outlineView:(NSOutlineView *)outlineView menuForEvent:(NSEvent *)theEvent
{
NSPoint location;
- int row;
+ NSInteger row;
id item;
//Get the clicked item
@@ -860,7 +864,7 @@
return YES;
}
-- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(AIProxyListObject *)item childIndex:(NSInteger)index
+- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>)info item:(AIProxyListObject *)item childIndex:(NSInteger)idx
{
//Post a notification that the drag ended so any other list controllers which have cached the drag can clear it
[[NSNotificationCenter defaultCenter] postNotificationName:@"AIListControllerDragEnded"
@@ -880,7 +884,7 @@
* @param index The index within item into which the drag would currently drop. It may be a 0-based index inside item or may be NSOutlineViewDropOnItemIndex.
* @result The drag operation we will allow
*/
-- (NSDragOperation)outlineView:(NSOutlineView*)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(AIProxyListObject *)item proposedChildIndex:(NSInteger)index
+- (NSDragOperation)outlineView:(NSOutlineView*)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(AIProxyListObject *)item proposedChildIndex:(NSInteger)idx
{
return NSDragOperationMove;
}
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIAbstractListObjectMenu.m
--- a/Frameworks/Adium Framework/Source/AIAbstractListObjectMenu.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAbstractListObjectMenu.m Mon Dec 28 13:51:48 2009 -0500
@@ -164,8 +164,8 @@
//Render the image
NSImage *composite = [[NSImage alloc] initWithSize:compositeSize];
[composite lockFocus];
- [statusIcon drawInRect:compositeRect atSize:[statusIcon size] position:IMAGE_POSITION_LEFT fraction:1.0];
- [secondaryIcon drawInRect:compositeRect atSize:[secondaryIcon size] position:IMAGE_POSITION_RIGHT fraction:1.0];
+ [statusIcon drawInRect:compositeRect atSize:[statusIcon size] position:IMAGE_POSITION_LEFT fraction:1.0f];
+ [secondaryIcon drawInRect:compositeRect atSize:[secondaryIcon size] position:IMAGE_POSITION_RIGHT fraction:1.0f];
[composite unlockFocus];
return [composite autorelease];
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIAccount.m
--- a/Frameworks/Adium Framework/Source/AIAccount.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccount.m Mon Dec 28 13:51:48 2009 -0500
@@ -50,7 +50,7 @@
@property (readwrite, retain, nonatomic) id userData;
-- (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo;
+- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
@end
@@ -80,7 +80,7 @@
[alert beginSheetModalForWindow:window modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:NULL];
}
-- (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo {
+- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo {
[account alertForAccountDeletion:self didReturn:returnCode];
}
@@ -513,7 +513,7 @@
*/
- (float)delayedUpdateStatusInterval
{
- return 0.5;
+ return 0.5f;
}
/*!
@@ -1053,13 +1053,13 @@
return newContact;
}
-- (void)insertObject:(AIListObject *)contact inContactsAtIndex:(int)index
+- (void)insertObject:(AIListObject *)contact inContactsAtIndex:(int)idx
{
//Intentially unimplemented. This should never be called (contacts are created a different way), but is required for KVC-compliance.
}
-- (void)removeObjectFromContactsAtIndex:(NSInteger)index
+- (void)removeObjectFromContactsAtIndex:(NSInteger)idx
{
- AIListObject *object = [self.contacts objectAtIndex:index];
+ AIListObject *object = [self.contacts objectAtIndex:idx];
for (AIListGroup *group in object.groups) {
[object removeFromGroup:group];
@@ -1099,7 +1099,7 @@
return nil;
}
AIMessageWindowController *chatWindowController = nil;
- int index = -1; //at end by default
+ NSInteger idx = -1; //at end by default
if ([resolvedKeyDictionary objectForKey:@"newChatWindow"]) {
//I need to put this in a new chat window
chatWindowController = [adium.interfaceController openContainerWithID:nil name:nil];
@@ -1108,7 +1108,7 @@
//NSLog(@"Here is the info about the location specifier: %@",[resolvedKeyDictionary objectForKey:@"Location"]);
NSPositionalSpecifier *location = [resolvedKeyDictionary objectForKey:@"Location"];
AIMessageWindow *chatWindow = [location insertionContainer];
- index = [location insertionIndex];
+ idx = [location insertionIndex];
chatWindowController = (AIMessageWindowController *)[chatWindow windowController];
}
@@ -1120,7 +1120,7 @@
AIChat *newChat = [adium.chatController chatWithContact:contact];
// NSLog(@"Making new chat %@ in chat window %@:%@",newChat,chatWindowController,[chatWindowController containerID]);
- [adium.interfaceController openChat:newChat inContainerWithID:[chatWindowController containerID] atIndex:index];
+ [adium.interfaceController openChat:newChat inContainerWithID:[chatWindowController containerID] atIndex:idx];
return newChat;
} else {
if (![self.service canCreateGroupChats]) {
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIAccountMenu.m
--- a/Frameworks/Adium Framework/Source/AIAccountMenu.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccountMenu.m Mon Dec 28 13:51:48 2009 -0500
@@ -49,6 +49,10 @@
- (NSMenu *)actionsMenuForAccount:(AIAccount *)inAccount;
- (void)menuNeedsUpdate:(NSMenu*)menu;
- (void)rebuildActionsSubmenu:(NSMenu*)actionsSubmenu withAccount:(AIAccount*)account;
+- (void)toggleAccountEnabled:(id)sender;
+- (void)dummyAction:(id)sender;
+- (void)editAccount:(id)sender;
+- (void)toggleAccountEnabled:(id)sender;
@end
static NSMenu *socialNetworkingSubmenuForAccount(AIAccount *account, id target, SEL action, id self);
@@ -773,8 +777,8 @@
{
NSMutableArray *newMenuItems = [NSMutableArray array];
NSArray *accountMenuItems = [self menuItems];
- unsigned int accountMenuItemsCount = [accountMenuItems count];
- unsigned int i;
+ NSUInteger accountMenuItemsCount = [accountMenuItems count];
+ NSUInteger i;
//Add status items only if we have more than one account
if (accountMenuItemsCount <= 1) return;
@@ -804,8 +808,8 @@
NSMenu *thisItemSubmenu;
if ((thisItemSubmenu = [menuItem submenu])) {
- unsigned int thisItemSubmenuCount = [thisItemSubmenu numberOfItems];
- unsigned int j;
+ NSUInteger thisItemSubmenuCount = [thisItemSubmenu numberOfItems];
+ NSUInteger j;
for (j = 0; j < thisItemSubmenuCount; j++) {
menuItem = [thisItemSubmenu itemAtIndex:j];
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIAccountPlusFieldPromptController.m
--- a/Frameworks/Adium Framework/Source/AIAccountPlusFieldPromptController.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccountPlusFieldPromptController.m Mon Dec 28 13:51:48 2009 -0500
@@ -117,7 +117,7 @@
NSString *accountID = [adium.preferenceController preferenceForKey:[NSString stringWithFormat:@"AccountPlusFieldLastAccountID:%@", [self lastAccountIDKey]]
group:ACCOUNT_PLUS_FIELD_GROUP];
AIAccount *account = [adium.accountController accountWithInternalObjectID:accountID];
- int accountIndex = (account ? [[popUp_service menu] indexOfItemWithRepresentedObject:account] : -1);
+ NSInteger accountIndex = (account ? [[popUp_service menu] indexOfItemWithRepresentedObject:account] : -1);
if (accountIndex != -1) {
[popUp_service selectItemAtIndex:accountIndex];
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIAccountViewController.m
--- a/Frameworks/Adium Framework/Source/AIAccountViewController.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccountViewController.m Mon Dec 28 13:51:48 2009 -0500
@@ -311,7 +311,7 @@
group:GROUP_ACCOUNT_STATUS];
//Encryption
- [account setPreference:[NSNumber numberWithInt:[[popUp_encryption selectedItem] tag]]
+ [account setPreference:[NSNumber numberWithInteger:[[popUp_encryption selectedItem] tag]]
forKey:KEY_ENCRYPTED_CHAT_PREFERENCE
group:GROUP_ENCRYPTION];
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIAddressBookController.m
--- a/Frameworks/Adium Framework/Source/AIAddressBookController.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAddressBookController.m Mon Dec 28 13:51:48 2009 -0500
@@ -58,6 +58,11 @@
- (void)addToAddressBookDict:(NSArray *)people;
- (void)removeFromAddressBookDict:(NSArray *)UIDs;
- (void)installAddressBookActions;
+
+- (void)adiumFinishedLaunching:(NSNotification *)notification;
+- (void)addToAddressBook;
+- (void)addressBookChanged:(NSNotification *)notification;
+- (void)accountListChanged:(NSNotification *)notification;
@end
/*!
@@ -509,7 +514,7 @@
//load new displayFormat
enableImport = [[prefDict objectForKey:KEY_AB_ENABLE_IMPORT] boolValue];
- displayFormat = [[prefDict objectForKey:KEY_AB_DISPLAYFORMAT] integerValue];
+ displayFormat = (NameStyle)[[prefDict objectForKey:KEY_AB_DISPLAYFORMAT] integerValue];
automaticUserIconSync = [[prefDict objectForKey:KEY_AB_IMAGE_SYNC] boolValue];
useNickName = [[prefDict objectForKey:KEY_AB_USE_NICKNAME] boolValue];
useMiddleName = [[prefDict objectForKey:KEY_AB_USE_MIDDLE] boolValue];
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIAuthorizationRequestsWindowController.m
--- a/Frameworks/Adium Framework/Source/AIAuthorizationRequestsWindowController.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAuthorizationRequestsWindowController.m Mon Dec 28 13:51:48 2009 -0500
@@ -21,8 +21,8 @@
#import <AIUtilities/AIAttributedStringAdditions.h>
#import <AIUtilities/MVMenuButton.h>
-#define MINIMUM_ROW_HEIGHT 42.0 // It's, like, the answer.
-#define MAXIMUM_ROW_HEIGHT 300.0
+#define MINIMUM_ROW_HEIGHT 42.0f // It's, like, the answer.
+#define MAXIMUM_ROW_HEIGHT 300.0f
#define MINIMUM_CELL_SPACING 4
@interface AIAuthorizationRequestsWindowController()
@@ -31,6 +31,15 @@
- (void)configureToolbar;
- (void)applyResponse:(AIAuthorizationResponse)response;
+
+- (void)authorize:(id)sender;
+- (void)getInfo:(id)sender;
+- (void)deny:(id)sender;
+- (void)denyBlock:(id)sender;
+- (void)ignore:(id)sender;
+- (void)ignoreBlock:(id)sender;
+- (void)authorize:(id)sender;
+- (void)authorizeAdd:(id)sender;
@end
@implementation AIAuthorizationRequestsWindowController
@@ -540,7 +549,7 @@
{
NSNumber *cachedHeight = [requiredHeightDict objectForKey:[NSNumber numberWithInteger:row]];
if (cachedHeight) {
- return [cachedHeight doubleValue];
+ return (CGFloat)[cachedHeight doubleValue];
}
// The row should be cached, so this shouldn't be hit.
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIChat.m
--- a/Frameworks/Adium Framework/Source/AIChat.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIChat.m Mon Dec 28 13:51:48 2009 -0500
@@ -310,7 +310,7 @@
*/
- (AIGroupChatFlags)flagsForContact:(AIListObject *)contact
{
- return [[participatingContactsFlags objectForKey:contact.UID] integerValue];
+ return [(NSNumber *)[participatingContactsFlags objectForKey:contact.UID] intValue];
}
/*!
@@ -584,16 +584,16 @@
- (void)incrementUnviewedContentCount
{
- int currentUnviewed = [self integerValueForProperty:KEY_UNVIEWED_CONTENT];
- [self setValue:[NSNumber numberWithInt:(currentUnviewed+1)]
+ NSInteger currentUnviewed = [self integerValueForProperty:KEY_UNVIEWED_CONTENT];
+ [self setValue:[NSNumber numberWithInteger:(currentUnviewed+1)]
forProperty:KEY_UNVIEWED_CONTENT
notify:NotifyNow];
}
- (void)incrementUnviewedMentionCount
{
- int currentUnviewed = [self integerValueForProperty:KEY_UNVIEWED_MENTION];
- [self setValue:[NSNumber numberWithInt:(currentUnviewed+1)]
+ NSInteger currentUnviewed = [self integerValueForProperty:KEY_UNVIEWED_MENTION];
+ [self setValue:[NSNumber numberWithInteger:(currentUnviewed+1)]
forProperty:KEY_UNVIEWED_MENTION
notify:NotifyNow];
}
@@ -632,9 +632,9 @@
return [participatingContacts containsObjectIdenticalTo:inObject];
}
-- (id)visibleObjectAtIndex:(NSUInteger)index
+- (id)visibleObjectAtIndex:(NSUInteger)idx
{
- return [participatingContacts objectAtIndex:index];
+ return [participatingContacts objectAtIndex:idx];
}
- (NSUInteger)visibleIndexOfObject:(AIListObject *)obj
@@ -726,7 +726,7 @@
//Not used
- (float)smallestOrder { return 0; }
-- (float)largestOrder { return 1E10; }
+- (float)largestOrder { return 1E10f; }
- (float)orderIndexForObject:(AIListObject *)listObject { return 0; }
- (void)listObject:(AIListObject *)listObject didSetOrderIndex:(float)inOrderIndex {};
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIContactMenu.m
--- a/Frameworks/Adium Framework/Source/AIContactMenu.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIContactMenu.m Mon Dec 28 13:51:48 2009 -0500
@@ -20,6 +20,7 @@
- (NSArray *)contactMenusForListObjects:(NSArray *)listObjects;
- (NSArray *)listObjectsForMenuFromArrayOfListObjects:(NSArray *)listObjects;
- (void)_updateMenuItem:(NSMenuItem *)menuItem;
+- (void)contactOrderChanged:(NSNotification *)notification;
@end
@implementation AIContactMenu
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIContextMenuTextView.m
--- a/Frameworks/Adium Framework/Source/AIContextMenuTextView.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIContextMenuTextView.m Mon Dec 28 13:51:48 2009 -0500
@@ -65,7 +65,7 @@
if ([itemsArray count] > 0) {
[contextualMenu addItem:[NSMenuItem separatorItem]];
- int i = [(NSMenu *)contextualMenu numberOfItems];
+ NSInteger i = [(NSMenu *)contextualMenu numberOfItems];
for (menuItem in itemsArray) {
//We're going to be copying; call menu needs update now since it won't be called later.
NSMenu *submenu = [menuItem submenu];
@@ -85,7 +85,7 @@
//Set our string, preserving the selected range
- (void)setAttributedString:(NSAttributedString *)inAttributedString
{
- int length = [inAttributedString length];
+ NSInteger length = [inAttributedString length];
NSRange oldRange = [self selectedRange];
//Change our string
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIEditStateWindowController.m
--- a/Frameworks/Adium Framework/Source/AIEditStateWindowController.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIEditStateWindowController.m Mon Dec 28 13:51:48 2009 -0500
@@ -34,12 +34,15 @@
@interface AIEditStateWindowController ()
- (id)initWithWindowNibName:(NSString *)windowNibName forType:(AIStatusType)inStatusType andAccount:(AIAccount *)inAccount customState:(AIStatus *)inStatusState notifyingTarget:(id)inTarget showSaveCheckbox:(BOOL)inShowSaveCheckbox;
-- (id)_positionControl:(id)control relativeTo:(id)guide height:(int *)height;
+- (id)_positionControl:(id)control relativeTo:(id)guide height:(CGFloat *)height;
- (void)configureStateMenu;
- (void)setOriginalStatusState:(AIStatus *)inState forType:(AIStatusType)inStatusType;
- (void)setAccount:(AIAccount *)inAccount;
- (void)configureForAccountAndWorkingStatusState;
+
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
+- (void)notifyOfStateChange;
@end
/*!
@@ -70,7 +73,7 @@
{
AIEditStateWindowController *controller;
- NSNumber *targetHash = [NSNumber numberWithUnsignedInt:[inTarget hash]];
+ NSNumber *targetHash = [NSNumber numberWithUnsignedInteger:[inTarget hash]];
if ((controller = [controllerDict objectForKey:targetHash])) {
[controller setAccount:inAccount];
@@ -277,7 +280,7 @@
[super windowWillClose:sender];
//Stop tracking with the controllerDict
- NSNumber *targetHash = [NSNumber numberWithUnsignedInt:[target hash]];
+ NSNumber *targetHash = [NSNumber numberWithUnsignedInteger:[target hash]];
[controllerDict removeObjectForKey:targetHash];
[self autorelease];
@@ -289,7 +292,7 @@
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
//Stop tracking with the controllerDict
- NSNumber *targetHash = [NSNumber numberWithUnsignedInt:[target hash]];
+ NSNumber *targetHash = [NSNumber numberWithUnsignedInteger:[target hash]];
[controllerDict removeObjectForKey:targetHash];
[sheet orderOut:nil];
@@ -453,7 +456,7 @@
NSString *stringWithSavedFrame;
NSRect frame = [window frame];
- float delta = 0;
+ CGFloat delta = 0;
delta += ([scrollView_autoReply isHidden] ? ([scrollView_autoReply frame].size.height + CONTROL_SPACING) : 0);
delta += ([checkbox_customAutoReply isHidden] ? ([checkbox_customAutoReply frame].size.height + CONTROL_SPACING) : 0);
delta += ([box_idle isHidden] ? ([box_idle frame].size.height + CONTROL_SPACING) : 0);
@@ -473,7 +476,7 @@
{
NSRect savedFrame = [super savedFrameFromString:frameString];
- float delta = 0;
+ CGFloat delta = 0;
delta += ([scrollView_autoReply isHidden] ? ([scrollView_autoReply frame].size.height + CONTROL_SPACING) : 0);
delta += ([checkbox_customAutoReply isHidden] ? ([checkbox_customAutoReply frame].size.height + CONTROL_SPACING) : 0);
delta += ([box_idle isHidden] ? ([box_idle frame].size.height + CONTROL_SPACING) : 0);
@@ -506,7 +509,7 @@
//Sizing
//XXX - This is quick & dirty -ai
id current = box_title;
- int height = WINDOW_HEIGHT_PADDING + [current frame].size.height;
+ CGFloat height = WINDOW_HEIGHT_PADDING + [current frame].size.height;
current = [self _positionControl:box_separatorLine relativeTo:current height:&height];
current = [self _positionControl:box_state relativeTo:current height:&height];
@@ -535,7 +538,7 @@
* @param height A pointer to the total control height, which will be updated to include control
* @return Returns control if it's visible, otherwise returns guide
*/
-- (id)_positionControl:(id)control relativeTo:(id)guide height:(int *)height
+- (id)_positionControl:(id)control relativeTo:(id)guide height:(CGFloat *)height
{
if (![control isHidden]) {
NSRect frame = [control frame];
@@ -565,16 +568,16 @@
{
//State menu
NSString *description;
- int index;
+ NSUInteger idx;
if (needToRebuildPopUpState) {
[self configureStateMenu];
}
description = [adium.statusController descriptionForStateOfStatus:statusState];
- index = (description ? [popUp_state indexOfItemWithTitle:description] : -1);
- if (index != -1) {
- [popUp_state selectItemAtIndex:index];
+ idx = (description ? [popUp_state indexOfItemWithTitle:description] : -1);
+ if (idx != -1) {
+ [popUp_state selectItemAtIndex:idx];
} else {
if (description) {
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIHTMLDecoder.m
--- a/Frameworks/Adium Framework/Source/AIHTMLDecoder.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIHTMLDecoder.m Mon Dec 28 13:51:48 2009 -0500
@@ -214,7 +214,7 @@
//Setup the incoming message as a regular string, and get its length
NSString *inMessageString = [inMessage string];
- unsigned messageLength = [inMessageString length];
+ NSUInteger messageLength = [inMessageString length];
//Setup the destination HTML string
NSMutableString *string = [NSMutableString string];
@@ -252,12 +252,12 @@
NSString *currentFamily = [@"Helvetica" retain];
NSString *currentColor = nil;
NSString *currentBackColor = nil;
- int currentSize = 12;
+ CGFloat currentSize = 12;
BOOL currentItalic = NO;
BOOL currentBold = NO;
BOOL currentUnderline = NO;
BOOL currentStrikethrough = NO;
- NSString *link = nil;
+ NSString *newLink = nil;
NSString *oldLink = nil;
//Append the body tag (If there is a background color)
@@ -279,7 +279,7 @@
NSString *color = (thingsToInclude.colorTags ? [[attributes objectForKey:NSForegroundColorAttributeName] hexString] : nil);
NSString *backColor = (thingsToInclude.colorTags ? [[attributes objectForKey:NSBackgroundColorAttributeName] hexString] : nil);
NSString *familyName = [font familyName];
- float pointSize = [font pointSize];
+ CGFloat pointSize = [font pointSize];
NSFontTraitMask traits = [fontManager traitsOfFont:font];
BOOL hasUnderline = [[attributes objectForKey:NSUnderlineStyleAttributeName] intValue];
@@ -287,11 +287,11 @@
BOOL isBold = (traits & NSBoldFontMask);
BOOL isItalic = (traits & NSItalicFontMask);
- link = [[attributes objectForKey:NSLinkAttributeName] absoluteString];
+ newLink = [[attributes objectForKey:NSLinkAttributeName] absoluteString];
//If we had a link on the last pass, and we don't now or we have a different one, close the link tag
if (oldLink &&
- (!link || (([link length] != 0) && ![oldLink isEqualToString:link]))) {
+ (!newLink || (([newLink length] != 0) && ![oldLink isEqualToString:newLink]))) {
//Close Link
[string appendString:@"</a>"];
@@ -406,8 +406,8 @@
}
//Link
- if (!oldLink && link && [link length] != 0) {
- NSString *linkString = ([link isKindOfClass:[NSURL class]] ? [(NSURL *)link absoluteString] : link);
+ if (!oldLink && newLink && [newLink length] != 0) {
+ NSString *linkString = ([newLink isKindOfClass:[NSURL class]] ? [(NSURL *)newLink absoluteString] : newLink);
/* For incoming messages, javascript urls are both dangerous and useless.
* If thingsToInclude.allowJavascriptURLs is NO, we refuse to create <a> tags for links starting with javascript.
@@ -539,7 +539,7 @@
if (chunk) {
NSRange fullRange;
- unsigned int replacements;
+ NSUInteger replacements;
//Escape special HTML characters.
fullRange = NSMakeRange(0, [chunk length]);
@@ -609,8 +609,8 @@
* character, replacing any non-ascii characters with the designated SGML escape sequence.
*/
if (thingsToInclude.nonASCII) {
- unsigned length = [chunk length];
- for (unsigned i = 0; i < length; i++) {
+ NSUInteger length = [chunk length];
+ for (NSUInteger i = 0; i < length; i++) {
unichar currentChar = [chunk characterAtIndex:i];
if (currentChar < 32) {
//Control character.
@@ -748,8 +748,8 @@
NSTextAttachmentCell *cell = (NSTextAttachmentCell *)[attachmentValue attachmentCell];
NSSize size = [cell cellSize];
- [imageElement setValue:[[NSNumber numberWithFloat:size.width] stringValue] forAttribute:@"width"];
- [imageElement setValue:[[NSNumber numberWithFloat:size.height] stringValue] forAttribute:@"height"];
+ [imageElement setValue:[[NSNumber numberWithDouble:size.width] stringValue] forAttribute:@"width"];
+ [imageElement setValue:[[NSNumber numberWithDouble:size.height] stringValue] forAttribute:@"height"];
NSString *path = [extension path];
if (path) {
@@ -830,7 +830,7 @@
//Setup the incoming message as a regular string, and get its length
NSString *inMessageString = [inMessage string];
- unsigned messageLength = [inMessageString length];
+ NSUInteger messageLength = [inMessageString length];
NSSet *emptySet = [NSSet set];
@@ -944,7 +944,7 @@
//Sort the keys by the length of their range.
//First, we build a list of [length, attribute-name] arrays.
NSMutableArray *startedKeysArray = [[startedKeys allObjects] mutableCopy];
- for (unsigned i = 0, count = [startedKeysArray count]; i < count; ++i) {
+ for (NSUInteger i = 0, count = [startedKeysArray count]; i < count; ++i) {
NSRange attributeRange;
NSString *attributeName = [startedKeysArray objectAtIndex:i];
[inMessage attribute:attributeName
@@ -953,7 +953,7 @@
inRange:searchRange];
NSMutableArray *item = [[NSMutableArray alloc] initWithCapacity:2];
- [item addObject:[NSNumber numberWithUnsignedInt:attributeRange.length]];
+ [item addObject:[NSNumber numberWithUnsignedInteger:attributeRange.length]];
[item addObject:attributeName];
[startedKeysArray replaceObjectAtIndex:i withObject:item];
[item release];
@@ -962,12 +962,12 @@
[startedKeysArray sortUsingSelector:@selector(compare:)];
//Consolidate keys by length.
- for (unsigned i = 0, count = [startedKeysArray count]; i < count; ++i) {
+ for (NSUInteger i = 0, count = [startedKeysArray count]; i < count; ++i) {
NSMutableSet *itemKeys = [NSMutableSet setWithCapacity:1];
[itemKeys addObject:[[startedKeysArray objectAtIndex:i] objectAtIndex:1]];
//Eat any equal keys that follow.
- unsigned j = i + 1;
+ NSUInteger j = i + 1;
while (
(j < count)
&& ([[[startedKeysArray objectAtIndex:i] objectAtIndex:0] unsignedIntValue] == [[[startedKeysArray objectAtIndex:j] objectAtIndex:0] unsignedIntValue])
@@ -1130,7 +1130,7 @@
//Process the tag
if ([scanner scanCharactersFromSet:tagCharStart intoString:&tagOpen]) { //If a tag wasn't found, we don't process.
- unsigned scanLocation = [scanner scanLocation]; //Remember our location (if this is an invalid tag we'll need to move back)
+ NSUInteger scanLocation = [scanner scanLocation]; //Remember our location (if this is an invalid tag we'll need to move back)
if ([tagOpen isEqualToString:@"<"]) { // HTML <tag>
BOOL validTag = [scanner scanUpToCharactersFromSet:tagEnd intoString:&chunkString]; //Get the tag
@@ -1198,7 +1198,7 @@
}
} else if ([chunkString caseInsensitiveCompare:@"/FONT"] == NSOrderedSame) {
- int changedAttributesCount = [fontTagChangedAttributesQueue count];
+ NSInteger changedAttributesCount = [fontTagChangedAttributesQueue count];
if (changedAttributesCount) {
[self restoreAttributesFromDict:[fontTagChangedAttributesQueue lastObject] intoAttributes:textAttributes];
[fontTagChangedAttributesQueue removeObjectAtIndex:([fontTagChangedAttributesQueue count] - 1)];
@@ -1214,7 +1214,7 @@
}
} else if ([chunkString caseInsensitiveCompare:@"/SPAN"] == NSOrderedSame) {
- int changedAttributesCount = [spanTagChangedAttributesQueue count];
+ NSInteger changedAttributesCount = [spanTagChangedAttributesQueue count];
if (changedAttributesCount) {
[self restoreAttributesFromDict:[spanTagChangedAttributesQueue lastObject] intoAttributes:textAttributes];
[spanTagChangedAttributesQueue removeObjectAtIndex:([spanTagChangedAttributesQueue count] - 1)];
@@ -1487,14 +1487,14 @@
static int pointSizes[] = { 9, 10, 12, 14, 18, 24, 48, 72 };
int size = (absSize <= 8 ? pointSizes[absSize-1] : 12);
- [originalAttributes setObject:[NSNumber numberWithInt:[textAttributes fontSize]]
+ [originalAttributes setObject:[NSNumber numberWithDouble:[textAttributes fontSize]]
forKey:@"setFontSizeFromNumber:"];
[textAttributes setFontSize:size];
}
} else if ([arg caseInsensitiveCompare:@"absz"] == NSOrderedSame) {
- [originalAttributes setObject:[NSNumber numberWithInt:[textAttributes fontSize]]
+ [originalAttributes setObject:[NSNumber numberWithDouble:[textAttributes fontSize]]
forKey:@"setFontSizeFromNumber:"];
[textAttributes setFontSize:[[inArgs objectForKey:arg] intValue]];
@@ -1525,13 +1525,13 @@
[originalAttributes setObject:([textAttributes textColor] ? (id)[textAttributes textColor] : (id)[NSNull null])
forKey:@"setTextColor:"];
- [textAttributes setTextColor:[NSColor colorWithCalibratedRed:0.0 green:0.5 blue:0.0 alpha:1.0]];
+ [textAttributes setTextColor:[NSColor colorWithCalibratedRed:0.0f green:0.5f blue:0.0f alpha:1.0f]];
} else if (inDiv && receive) {
[originalAttributes setObject:([textAttributes textColor] ? (id)[textAttributes textColor] : (id)[NSNull null])
forKey:@"setTextColor:"];
- [textAttributes setTextColor:[NSColor colorWithCalibratedRed:0.0 green:0.0 blue:0.5 alpha:1.0]];
+ [textAttributes setTextColor:[NSColor colorWithCalibratedRed:0.0f green:0.0f blue:0.5f alpha:1.0f]];
}
}
}
@@ -1561,17 +1561,17 @@
if (inDiv && send) {
[originalAttributes setObject:([textAttributes textColor] ? (id)[textAttributes textColor] : (id)[NSNull null])
forKey:@"setTextColor:"];
- [textAttributes setTextColor:[NSColor colorWithCalibratedRed:0.0
- green:0.5
- blue:0.0
- alpha:1.0]];
+ [textAttributes setTextColor:[NSColor colorWithCalibratedRed:0.0f
+ green:0.5f
+ blue:0.0f
+ alpha:1.0f]];
} else if (inDiv && receive) {
[originalAttributes setObject:([textAttributes textColor] ? (id)[textAttributes textColor] : (id)[NSNull null])
forKey:@"setTextColor:"];
- [textAttributes setTextColor:[NSColor colorWithCalibratedRed:0.0
- green:0.0
- blue:0.5
- alpha:1.0]];
+ [textAttributes setTextColor:[NSColor colorWithCalibratedRed:0.0f
+ green:0.0f
+ blue:0.5f
+ alpha:1.0f]];
}
} else if ([class caseInsensitiveCompare:@"timestamp"] == NSOrderedSame) {
@@ -1590,7 +1590,7 @@
{
[styleScanner scanString:@";" intoString:nil];
- int styleLength = [style length];
+ NSUInteger styleLength = [style length];
attributeRange = [style rangeOfString:@"font-family:" options:NSCaseInsensitiveSearch];
if (attributeRange.location != NSNotFound) {
@@ -1636,7 +1636,7 @@
}
}
- [originalAttributes setObject:[NSNumber numberWithInt:[textAttributes fontSize]]
+ [originalAttributes setObject:[NSNumber numberWithDouble:[textAttributes fontSize]]
forKey:@"setFontSizeFromNumber:"];
[textAttributes setFontSize:size];
}
@@ -1646,7 +1646,7 @@
NSString *fontWeight = [[style substringWithRange:NSMakeRange(NSMaxRange(attributeRange), styleLength - NSMaxRange(attributeRange))]
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
- [originalAttributes setObject:[NSNumber numberWithUnsignedInt:[textAttributes traits]]
+ [originalAttributes setObject:[NSNumber numberWithUnsignedInteger:[textAttributes traits]]
forKey:@"setTraits:"];
if (([fontWeight caseInsensitiveCompare:@"bold"] == NSOrderedSame) ||
([fontWeight caseInsensitiveCompare:@"bolder"] == NSOrderedSame) ||
@@ -1662,7 +1662,7 @@
NSString *fontStyle = [[style substringWithRange:NSMakeRange(NSMaxRange(attributeRange), styleLength - NSMaxRange(attributeRange))]
stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
- [originalAttributes setObject:[NSNumber numberWithUnsignedInt:[textAttributes traits]]
+ [originalAttributes setObject:[NSNumber numberWithUnsignedInteger:[textAttributes traits]]
forKey:@"setTraits:"];
if (([fontStyle caseInsensitiveCompare:@"italic"] == NSOrderedSame) ||
([fontStyle caseInsensitiveCompare:@"oblique"] == NSOrderedSame)) {
@@ -2271,7 +2271,7 @@
NSData *utf8Data = [self dataUsingEncoding:NSUTF8StringEncoding];
const char *utf8String = [utf8Data bytes];
- unsigned sourceLength = [utf8Data length];
+ NSUInteger sourceLength = [utf8Data length];
for (int i = 0; i < sourceLength; i++) {
unichar ch = utf8String[i];
@@ -2339,7 +2339,7 @@
NSData *utf8Data = [self dataUsingEncoding:NSUTF8StringEncoding];
const char *utf8String = [utf8Data bytes];
- unsigned sourceLength = [utf8Data length];
+ NSUInteger sourceLength = [utf8Data length];
for (int i = 0; i < sourceLength; i++) {
unichar ch = utf8String[i];
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIIconState.h
--- a/Frameworks/Adium Framework/Source/AIIconState.h Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIIconState.h Mon Dec 28 13:51:48 2009 -0500
@@ -24,10 +24,10 @@
//Animated
NSMutableArray *imageArray;
- float delay;
+ CGFloat delay;
BOOL looping;
- int currentFrame;
- int numberOfFrames;
+ NSInteger currentFrame;
+ NSInteger numberOfFrames;
//Animated w/ delayed rendering
NSArray *iconRendering_states;
@@ -35,19 +35,19 @@
AIIconState *iconRendering_animationState;
}
-- (id)initWithImages:(NSArray *)inImages delay:(float)inDelay looping:(BOOL)inLooping overlay:(BOOL)inOverlay;
+- (id)initWithImages:(NSArray *)inImages delay:(CGFloat)inDelay looping:(BOOL)inLooping overlay:(BOOL)inOverlay;
- (id)initWithImage:(NSImage *)inImage overlay:(BOOL)inOverlay;
- (id)initByCompositingStates:(NSArray *)inIconStates;
- (BOOL)animated;
-- (float)animationDelay;
+- (CGFloat)animationDelay;
- (BOOL)looping;
- (BOOL)overlay;
- (NSArray *)imageArray;
- (NSImage *)image;
-- (NSImage *)_compositeStates:(NSArray *)iconStateArray withBaseState:(AIIconState *)baseState animatingState:(AIIconState *)animatingState forFrame:(int)frame;
-- (int)currentFrame;
+- (NSImage *)_compositeStates:(NSArray *)iconStateArray withBaseState:(AIIconState *)baseState animatingState:(AIIconState *)animatingState forFrame:(NSInteger)frame;
+- (NSInteger)currentFrame;
- (void)nextFrame;
-- (int)numberOfFrames;
+- (NSInteger)numberOfFrames;
@end
diff -r 601a5c302322 -r 8e23376a39e6 Frameworks/Adium Framework/Source/AIIconState.m
--- a/Frameworks/Adium Framework/Source/AIIconState.m Thu Dec 24 02:19:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIIconState.m Mon Dec 28 13:51:48 2009 -0500
@@ -22,7 +22,7 @@
@implementation AIIconState
-- (id)initWithImages:(NSArray *)inImages delay:(float)inDelay looping:(BOOL)inLooping overlay:(BOOL)inOverlay
+- (id)initWithImages:(NSArray *)inImages delay:(CGFloat)inDelay looping:(BOOL)inLooping overlay:(BOOL)inOverlay
{
//init
if ((self = [super init]))
@@ -134,7 +134,7 @@
iconRendering_baseState = nil;
iconRendering_animationState = nil;
- delay = 1.0;
+ delay = 1.0f;
looping = NO;
overlay = NO;
currentFrame = 0;
@@ -152,7 +152,7 @@
[super dealloc];
}
-- (int)currentFrame
+- (NSInteger)currentFrame
{
return currentFrame;
}
@@ -160,7 +160,7 @@
- (void)nextFrame
{
if (animated) {
- unsigned imageArrayCount = [imageArray count];
+ NSUInteger imageArrayCount = [imageArray count];
//Next frame
if (++currentFrame >= numberOfFrames) {
@@ -197,11 +197,11 @@
return animated;
}
-- (float)animationDelay{
+- (CGFloat)animationDelay{
return delay;
}
-- (int)numberOfFrames{
+- (NSInteger)numberOfFrames{
return numberOfFrames;
}
@@ -221,11 +221,11 @@
return image;
}
-- (NSImage *)_compositeStates:(NSArray *)iconStateArray withBaseState:(AIIconState *)baseState animatingState:(AIIconState *)animatingState forFrame:(int)frame
+- (NSImage *)_compositeStates:(NSArray *)iconStateArray withBaseState:(AIIconState *)baseState animatingState:(AIIconState *)animatingState forFrame:(NSInteger)frame
More information about the commits
mailing list