adium 5826:7b69af41e079: Use arc4random().
commits at adium.im
commits at adium.im
Wed Jan 8 20:28:06 UTC 2014
details: http://hg.adium.im/adium/rev/7b69af41e079
revision: 5826:7b69af41e079
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Wed Jan 08 12:40:57 2014 -0500
Use arc4random().
Subject: adium 5827:b39c2294d616: Remove some unused assignments.
details: http://hg.adium.im/adium/rev/b39c2294d616
revision: 5827:b39c2294d616
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Wed Jan 08 14:19:00 2014 -0500
Remove some unused assignments.
Subject: adium 5828:45371f759b13: TickCount is deprecated.
details: http://hg.adium.im/adium/rev/45371f759b13
revision: 5828:45371f759b13
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Wed Jan 08 15:24:13 2014 -0500
TickCount is deprecated.
Subject: adium 5829:8f08f2a98915: Deprecation updates for loadNibNamed.
details: http://hg.adium.im/adium/rev/8f08f2a98915
revision: 5829:8f08f2a98915
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Wed Jan 08 15:24:30 2014 -0500
Deprecation updates for loadNibNamed.
diffs (474 lines):
diff -r d978368583f9 -r 8f08f2a98915 Frameworks/AIUtilities Framework/Source/AIStringAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIStringAdditions.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AIStringAdditions.m Wed Jan 08 15:24:30 2014 -0500
@@ -15,7 +15,6 @@
*/
#import "AIStringAdditions.h"
-
#ifndef BSD_LICENSE_ONLY
#import "AIColorAdditions.h"
@@ -77,8 +76,6 @@
//Random alphanumeric string
+ (id)randomStringOfLength:(unsigned int)inLength
{
- srandom(TickCount());
-
if (!inLength) return [self string];
NSString *string = nil;
@@ -94,7 +91,7 @@
};
unsigned remaining = inLength;
while (remaining--) {
- buf[remaining] = alphanumeric[random() % sizeof(alphanumeric)];
+ buf[remaining] = alphanumeric[arc4random() % sizeof(alphanumeric)];
}
string = [self stringWithBytes:buf length:inLength encoding:NSASCIIStringEncoding];
free(buf);
diff -r d978368583f9 -r 8f08f2a98915 Frameworks/Adium Framework/Source/AIAccountViewController.m
--- a/Frameworks/Adium Framework/Source/AIAccountViewController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccountViewController.m Wed Jan 08 15:24:30 2014 -0500
@@ -60,7 +60,6 @@
- (id)init
{
NSBundle *ourBundle = [NSBundle bundleForClass:[AIAccountViewController class]];
- NSDictionary *nameTable = [NSDictionary dictionaryWithObject:self forKey:@"NSOwner"];
if ((self = [super init]))
{
@@ -69,14 +68,14 @@
//Load custom views for our subclass (If our subclass specifies a nib name)
if ([self nibName]) {
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
}
//Load our default views if necessary
- if (!view_setup) [ourBundle loadNibFile:@"AccountSetup" externalNameTable:nameTable withZone:nil];
- if (!view_profile) [ourBundle loadNibFile:@"AccountProfile" externalNameTable:nameTable withZone:nil];
- if (!view_options) [ourBundle loadNibFile:@"AccountOptions" externalNameTable:nameTable withZone:nil];
- if (!view_privacy) [ourBundle loadNibFile:@"AccountPrivacy" externalNameTable:nameTable withZone:nil];
+ if (!view_setup) [ourBundle loadNibNamed:@"AccountSetup" owner:self topLevelObjects:nil];
+ if (!view_profile) [ourBundle loadNibNamed:@"AccountProfile" owner:self topLevelObjects:nil];
+ if (!view_options) [ourBundle loadNibNamed:@"AccountOptions" owner:self topLevelObjects:nil];
+ if (!view_privacy) [ourBundle loadNibNamed:@"AccountPrivacy" owner:self topLevelObjects:nil];
[self localizeStrings];
}
diff -r d978368583f9 -r 8f08f2a98915 Frameworks/Adium Framework/Source/AIConsoleController.m
--- a/Frameworks/Adium Framework/Source/AIConsoleController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AIConsoleController.m Wed Jan 08 15:24:30 2014 -0500
@@ -31,9 +31,7 @@
- (IBAction)showWindow:(id)sender {
if (!consoleWindow) {
//Load the window if it's not already loaded
- [[NSBundle bundleForClass:[AIConsoleController class]] loadNibFile:@"AIConsole"
- externalNameTable:[NSDictionary dictionaryWithObject:self forKey:NSNibOwner]
- withZone:NULL];
+ [[NSBundle bundleForClass:[AIConsoleController class]] loadNibNamed:@"AIConsole" owner:self topLevelObjects:nil];
if (!consoleWindow) AILogWithSignature(@"Unable to load AIConsole!");
}
diff -r d978368583f9 -r 8f08f2a98915 Frameworks/Adium Framework/Source/AIMessageEntryTextView.m
--- a/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Wed Jan 08 15:24:30 2014 -0500
@@ -974,7 +974,7 @@
// Make the indicator and set its action. It is a button with no border.
pushIndicator = [[AIButtonWithCursor alloc] initWithFrame:NSMakeRect(0, 0, [pushIndicatorImage size].width, [pushIndicatorImage size].height)];
- [pushIndicator setButtonType:NSMomentaryPushButton];
+ [pushIndicator setButtonType:NSMomentaryLightButton];
[pushIndicator setCursor:[NSCursor arrowCursor]];
[pushIndicator setAutoresizingMask:(NSViewMinXMargin)];
[pushIndicator setImage:pushIndicatorImage];
diff -r d978368583f9 -r 8f08f2a98915 Frameworks/Adium Framework/Source/AIModularPane.m
--- a/Frameworks/Adium Framework/Source/AIModularPane.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AIModularPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -57,7 +57,7 @@
{
if (!view) {
//Load and configure our view
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
[self viewDidLoad];
[self localizePane];
if (![self resizable]) [view setAutoresizingMask:(NSViewMaxYMargin)];
diff -r d978368583f9 -r 8f08f2a98915 Frameworks/Adium Framework/Source/AISortController.m
--- a/Frameworks/Adium Framework/Source/AISortController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AISortController.m Wed Jan 08 15:24:30 2014 -0500
@@ -90,7 +90,7 @@
- (NSView *)configureView
{
if (!configureView)
- [NSBundle loadNibNamed:[self configureNibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self configureNibName] owner:self topLevelObjects:nil];
[self viewDidLoad];
diff -r d978368583f9 -r 8f08f2a98915 Frameworks/Adium Framework/Source/AIStatusGroup.m
--- a/Frameworks/Adium Framework/Source/AIStatusGroup.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Frameworks/Adium Framework/Source/AIStatusGroup.m Wed Jan 08 15:24:30 2014 -0500
@@ -120,7 +120,7 @@
{
//Pick a random contained status item
AIStatusItem *anyStatus = ([containedStatusItems count] ?
- [containedStatusItems objectAtIndex:(random() % [containedStatusItems count])] :
+ [containedStatusItems objectAtIndex:(arc4random() % [containedStatusItems count])] :
nil);
//If it's a status group, recurse into it
diff -r d978368583f9 -r 8f08f2a98915 Frameworks/Adium Framework/Source/DCJoinChatViewController.m
--- a/Frameworks/Adium Framework/Source/DCJoinChatViewController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Frameworks/Adium Framework/Source/DCJoinChatViewController.m Wed Jan 08 15:24:30 2014 -0500
@@ -48,7 +48,7 @@
NSString *nibName = [self nibName];
if (nibName)
{
- [NSBundle loadNibNamed:nibName owner:self];
+ [[NSBundle mainBundle] loadNibNamed:nibName owner:self topLevelObjects:nil];
}
}
diff -r d978368583f9 -r 8f08f2a98915 Plugins/Dual Window Interface/AIMessageViewController.m
--- a/Plugins/Dual Window Interface/AIMessageViewController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Plugins/Dual Window Interface/AIMessageViewController.m Wed Jan 08 15:24:30 2014 -0500
@@ -99,7 +99,7 @@
topBarControllers = [[NSMutableArray alloc] initWithCapacity:0];
//Load the view containing our controls
- [NSBundle loadNibNamed:MESSAGE_VIEW_NIB owner:self];
+ [[NSBundle mainBundle] loadNibNamed:MESSAGE_VIEW_NIB owner:self topLevelObjects:nil];
//Register for the various notification we need
[[NSNotificationCenter defaultCenter] addObserver:self
@@ -865,7 +865,7 @@
NSString *suffix = [self.chat.account suffixForAutocomplete:self.chat forPartialWordRange:charRange];
NSString *prefix = [self.chat.account prefixForAutocomplete:self.chat forPartialWordRange:charRange];
NSString *partialWord = [textView.textStorage.string substringWithRange:charRange];
- BOOL autoCompleteUID = [self.chat.account chatShouldAutocompleteUID:self.chat];
+ //BOOL autoCompleteUID = [self.chat.account chatShouldAutocompleteUID:self.chat];
// Check to see if the prefix is already present
if (charRange.location != 0 && charRange.location >= prefix.length) {
diff -r d978368583f9 -r 8f08f2a98915 Plugins/Emoticons/AIEmoticonPackPreviewController.m
--- a/Plugins/Emoticons/AIEmoticonPackPreviewController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Plugins/Emoticons/AIEmoticonPackPreviewController.m Wed Jan 08 15:24:30 2014 -0500
@@ -37,7 +37,7 @@
emoticonPack = inPack;
preferences = inPreferences;
- [NSBundle loadNibNamed:@"EmoticonPackPreview" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"EmoticonPackPreview" owner:self topLevelObjects:nil];
}
return self;
diff -r d978368583f9 -r 8f08f2a98915 Plugins/Purple Service/AMPurpleRequestFieldsController.m
--- a/Plugins/Purple Service/AMPurpleRequestFieldsController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Plugins/Purple Service/AMPurpleRequestFieldsController.m Wed Jan 08 15:24:30 2014 -0500
@@ -112,7 +112,7 @@
account = _account;
field = _field;
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
height = view.frame.size.height;
diff -r d978368583f9 -r 8f08f2a98915 Plugins/Purple Service/libpurple_extensions/ssl-cdsa.c
--- a/Plugins/Purple Service/libpurple_extensions/ssl-cdsa.c Wed Jan 01 20:30:55 2014 -0500
+++ b/Plugins/Purple Service/libpurple_extensions/ssl-cdsa.c Wed Jan 08 15:24:30 2014 -0500
@@ -180,7 +180,7 @@
err = SSLGetNegotiatedCipher(cdsa_data->ssl_ctx, &cipher);
if (err == noErr) {
- err = SSLGetNegotiatedProtocolVersion(cdsa_data->ssl_ctx, &protocol);
+ SSLGetNegotiatedProtocolVersion(cdsa_data->ssl_ctx, &protocol);
purple_debug_info("cdsa", "Your connection is using %s with %s encryption, using %s for message authentication and %s key exchange (%X).\n",
SSLVersionToString(protocol),
@@ -237,7 +237,6 @@
int sock;
OSStatus rtn = noErr;
ssize_t bytesRead;
- ssize_t rrtn;
assert( UINT_MAX >= (NSUInteger)connection );
sock = (int)(NSUInteger)connection;
@@ -245,9 +244,8 @@
*dataLength = 0;
for(;;) {
- bytesRead = 0;
- rrtn = read(sock, currData, bytesToGo);
- if (rrtn <= 0) {
+ bytesRead = read(sock, currData, bytesToGo);
+ if (bytesRead <= 0) {
/* this is guesswork... */
int theErr = errno;
switch(theErr) {
@@ -270,9 +268,6 @@
}
break;
}
- else {
- bytesRead = rrtn;
- }
bytesToGo -= bytesRead;
currData += bytesRead;
@@ -521,8 +516,8 @@
return;
}
- protoErr = SSLSetProtocolVersionEnabled(cdsa_data->ssl_ctx, kSSLProtocol3, true);
- protoErr = SSLSetProtocolVersionEnabled(cdsa_data->ssl_ctx, kTLSProtocol1, true);
+ SSLSetProtocolVersionEnabled(cdsa_data->ssl_ctx, kSSLProtocol3, true);
+ SSLSetProtocolVersionEnabled(cdsa_data->ssl_ctx, kTLSProtocol1, true);
}
if(gsc->host) {
diff -r d978368583f9 -r 8f08f2a98915 Source/AIAccountProxySettings.m
--- a/Source/AIAccountProxySettings.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIAccountProxySettings.m Wed Jan 08 15:24:30 2014 -0500
@@ -45,7 +45,7 @@
{
if ((self = [super init])) {
//Load our view
- [NSBundle loadNibNamed:@"AccountProxy" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"AccountProxy" owner:self topLevelObjects:nil];
//Setup our menu
[popUpButton_proxy setMenu:[self _proxyMenu]];
diff -r d978368583f9 -r 8f08f2a98915 Source/AIAddressBookInspectorPane.m
--- a/Source/AIAddressBookInspectorPane.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIAddressBookInspectorPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -31,7 +31,7 @@
- (id)init
{
if ((self = [super init])) {
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
[label_notes setLocalizedString:AILocalizedString(@"Notes:", "Label beside the field for contact notes in the Settings tab of the Get Info window")];
[button_chooseCard setLocalizedString:[AILocalizedStringFromTable(@"Choose Address Book Card", @"Buttons", "Button title to choose an Address Book card for a contact") stringByAppendingEllipsis]];
diff -r d978368583f9 -r 8f08f2a98915 Source/AIAdvancedInspectorPane.m
--- a/Source/AIAdvancedInspectorPane.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIAdvancedInspectorPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -44,7 +44,7 @@
{
self = [super init];
if (self != nil) {
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
//Load Encryption menus
[popUp_encryption setMenu:[adium.contentController encryptionMenuNotifyingTarget:self withDefault:YES]];
diff -r d978368583f9 -r 8f08f2a98915 Source/AIContactListUserPictureMenuController.h
--- a/Source/AIContactListUserPictureMenuController.h Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIContactListUserPictureMenuController.h Wed Jan 08 15:24:30 2014 -0500
@@ -36,7 +36,7 @@
NSArray *images;
@private
- NSMutableArray *AI_topLevelObjects;
+ NSArray *AI_topLevelObjects;
}
@property (weak) IBOutlet NSMenu *menu;
diff -r d978368583f9 -r 8f08f2a98915 Source/AIContactListUserPictureMenuController.m
--- a/Source/AIContactListUserPictureMenuController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIContactListUserPictureMenuController.m Wed Jan 08 15:24:30 2014 -0500
@@ -63,10 +63,9 @@
- (id)initWithNibName:(NSString *)nibName imagePicker:(AIContactListImagePicker *)picker
{
self = [super init];
- if ([[NSBundle mainBundle] loadNibFile:nibName
- externalNameTable:[NSDictionary dictionaryWithObjectsAndKeys:self, NSNibOwner, AI_topLevelObjects, NSNibTopLevelObjects, nil]
- withZone:nil]) {
-
+ NSArray *topObjects;
+ if ([[NSBundle mainBundle] loadNibNamed:nibName owner:self topLevelObjects:&topObjects]) {
+ AI_topLevelObjects = topObjects;
[self setImagePicker:picker];
[imagePicker setMaxSize:NSMakeSize(128.0f, 128.0f)];
diff -r d978368583f9 -r 8f08f2a98915 Source/AIEventsInspectorPane.m
--- a/Source/AIEventsInspectorPane.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIEventsInspectorPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -26,7 +26,7 @@
{
self = [super init];
if (self != nil) {
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
//Other init goes here.
}
return self;
diff -r d978368583f9 -r 8f08f2a98915 Source/AIInfoInspectorPane.m
--- a/Source/AIInfoInspectorPane.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIInfoInspectorPane.m Wed Jan 08 15:24:30 2014 -0500
@@ -54,7 +54,7 @@
self = [super init];
if (self != nil) {
//Load Bundle
- [NSBundle loadNibNamed:[self nibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self nibName] owner:self topLevelObjects:nil];
//Register as AIListObjectObserver
[[AIContactObserverManager sharedManager] registerListObjectObserver:self];
//Setup for userIcon
diff -r d978368583f9 -r 8f08f2a98915 Source/AIInterfaceController.m
--- a/Source/AIInterfaceController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIInterfaceController.m Wed Jan 08 15:24:30 2014 -0500
@@ -1852,7 +1852,7 @@
NSFontPanel *fontPanel = [NSFontPanel sharedFontPanel];
if (!fontPanelAccessoryView) {
- [NSBundle loadNibNamed:@"FontPanelAccessoryView" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"FontPanelAccessoryView" owner:self topLevelObjects:nil];
[fontPanel setAccessoryView:fontPanelAccessoryView];
[button_fontPanelSetAsDefault setLocalizedString:AILocalizedString(@"Save This Setting As My Default Font", "Appears in the Format > Show Fonts window. You are limited for horizontal space, so try to keep it at most the length of the English string.")];
diff -r d978368583f9 -r 8f08f2a98915 Source/AIListWindowController.m
--- a/Source/AIListWindowController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIListWindowController.m Wed Jan 08 15:24:30 2014 -0500
@@ -90,7 +90,7 @@
previousAlpha = 0;
typeToFindEnabled = ![[NSUserDefaults standardUserDefaults] boolForKey:@"AIDisableContactListTypeToFind"];
- [NSBundle loadNibNamed:@"Filter Bar" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"Filter Bar" owner:self topLevelObjects:nil];
[self setContactList:contactList];
}
diff -r d978368583f9 -r 8f08f2a98915 Source/AILogViewerWindowController.m
--- a/Source/AILogViewerWindowController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AILogViewerWindowController.m Wed Jan 08 15:24:30 2014 -0500
@@ -1732,7 +1732,7 @@
//Perform a filter search based on source name, destination name, or date
- (void)_logFilter:(NSString *)searchString searchID:(NSInteger)searchID mode:(LogSearchMode)mode
{
- UInt32 lastUpdate = TickCount();
+ UInt32 lastUpdate = CACurrentMediaTime();
NSDate *searchStringDate = nil;
@@ -1781,11 +1781,11 @@
[resultsLock unlock];
//Update our status
- if (lastUpdate == 0 || TickCount() > lastUpdate + LOG_SEARCH_STATUS_INTERVAL) {
+ if (lastUpdate == 0 || CACurrentMediaTime() > lastUpdate + LOG_SEARCH_STATUS_INTERVAL) {
[self performSelectorOnMainThread:@selector(updateProgressDisplay)
withObject:nil
waitUntilDone:NO];
- lastUpdate = TickCount();
+ lastUpdate = CACurrentMediaTime();
}
}
}
@@ -2260,7 +2260,7 @@
- (void)installToolbar
{
- [NSBundle loadNibNamed:[self dateItemNibName] owner:self];
+ [[NSBundle mainBundle] loadNibNamed:[self dateItemNibName] owner:self topLevelObjects:nil];
NSToolbar *toolbar = [[NSToolbar alloc] initWithIdentifier:TOOLBAR_LOG_VIEWER];
NSToolbarItem *toolbarItem;
diff -r d978368583f9 -r 8f08f2a98915 Source/AILoggerPlugin.m
--- a/Source/AILoggerPlugin.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AILoggerPlugin.m Wed Jan 08 15:24:30 2014 -0500
@@ -1499,7 +1499,7 @@
if (self.indexingAllowed) {
self.isIndexing = YES;
- __block UInt32 lastUpdate = TickCount();
+ __block double lastUpdate = CACurrentMediaTime();
__block SInt32 unsavedChanges = 0;
AILogWithSignature(@"Cleaning %li dirty logs", [localLogSet count]);
@@ -1575,11 +1575,11 @@
OSAtomicIncrement64Barrier((int64_t *)&(bself->logsIndexed));
OSAtomicDecrement64Barrier((int64_t *)&_remainingLogs);
- if (lastUpdate == 0 || TickCount() > lastUpdate + LOG_INDEX_STATUS_INTERVAL || _remainingLogs == 0) {
+ if (lastUpdate == 0 || CACurrentMediaTime() > lastUpdate + LOG_INDEX_STATUS_INTERVAL || _remainingLogs == 0) {
dispatch_async(dispatch_get_main_queue(), ^{
[[AILogViewerWindowController existingWindowController] logIndexingProgressUpdate];
});
- UInt32 tick = TickCount();
+ UInt32 tick = CACurrentMediaTime();
OSAtomicCompareAndSwap32Barrier(lastUpdate, tick, (int32_t *)&lastUpdate);
}
diff -r d978368583f9 -r 8f08f2a98915 Source/AIPreferenceWindowController.m
--- a/Source/AIPreferenceWindowController.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIPreferenceWindowController.m Wed Jan 08 15:24:30 2014 -0500
@@ -273,10 +273,7 @@
[self openSearchIndex];
//Load the nib
- if ([[NSBundle mainBundle] loadNibFile:@"Preferences"
- externalNameTable:[NSDictionary dictionaryWithObjectsAndKeys:self, NSNibOwner, AI_topLevelObjects, NSNibTopLevelObjects, nil]
- withZone:nil]) {
- }
+ [[NSBundle mainBundle] loadNibNamed:@"Preferences" owner:self topLevelObjects:nil];
}
- (void)awakeFromNib
diff -r d978368583f9 -r 8f08f2a98915 Source/AIXtrasManager.m
--- a/Source/AIXtrasManager.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/AIXtrasManager.m Wed Jan 08 15:24:30 2014 -0500
@@ -253,9 +253,9 @@
if (xtra) {
//[showInfoControl setHidden:NO];
if(showInfo)
- [NSBundle loadNibNamed:@"XtraInfoView" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"XtraInfoView" owner:self topLevelObjects:nil];
else {
- [NSBundle loadNibNamed:@"XtraPreviewImageView" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"XtraPreviewImageView" owner:self topLevelObjects:nil];
/* NSString * xtraType = [xtra type];
if ([xtraType isEqualToString:AIXtraTypeEmoticons])
diff -r d978368583f9 -r 8f08f2a98915 Source/ESFileTransferProgressRow.m
--- a/Source/ESFileTransferProgressRow.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/ESFileTransferProgressRow.m Wed Jan 08 15:24:30 2014 -0500
@@ -53,7 +53,7 @@
bytesSentQueue = [[NSMutableArray alloc] init];
updateTickQueue = [[NSMutableArray alloc] init];
- [NSBundle loadNibNamed:@"ESFileTransferProgressView" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"ESFileTransferProgressView" owner:self topLevelObjects:nil];
}
return self;
@@ -146,11 +146,11 @@
//Handle progress, bytes transferred/bytes total, rate, and time remaining
- (void)gotUpdateForFileTransfer:(ESFileTransfer *)inFileTransfer
{
- UInt32 updateTick = TickCount();
+ double updateTick = CACurrentMediaTime();
AIFileTransferStatus status = [inFileTransfer status];
//Don't update continously; on a LAN transfer, for instance, we'll get almost constant updates
- if (lastUpdateTick && (((updateTick - lastUpdateTick) / 60.0) < 0.2) && (status == In_Progress_FileTransfer) && !forceUpdate) {
+ if (lastUpdateTick && ((updateTick - lastUpdateTick) < 0.2) && (status == In_Progress_FileTransfer) && !forceUpdate) {
return;
}
diff -r d978368583f9 -r 8f08f2a98915 Source/XtrasInstaller.m
--- a/Source/XtrasInstaller.m Wed Jan 01 20:30:55 2014 -0500
+++ b/Source/XtrasInstaller.m Wed Jan 08 15:24:30 2014 -0500
@@ -71,7 +71,7 @@
if ([[url host] isEqualToString:@"xtras.adium.im"] || [[url host] isEqualToString:@"www.adiumxtras.com"] || ALLOW_UNTRUSTED_XTRAS) {
NSURL *urlToDownload;
- [NSBundle loadNibNamed:@"XtraProgressWindow" owner:self];
+ [[NSBundle mainBundle] loadNibNamed:@"XtraProgressWindow" owner:self topLevelObjects:nil];
[progressBar setUsesThreadedAnimation:YES];
xtraName = nil;
More information about the commits
mailing list