adium 5247:b82df2b5b251: Remove some checks where the value will...
commits at adium.im
commits at adium.im
Sun Dec 30 23:43:49 UTC 2012
details: http://hg.adium.im/adium/rev/b82df2b5b251
revision: 5247:b82df2b5b251
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Sun Dec 30 16:32:40 2012 -0500
Remove some checks where the value will always be nil.
Subject: adium 5248:a222b205974e: Extend the setup wizard's short lifespan after ARC.
details: http://hg.adium.im/adium/rev/a222b205974e
revision: 5248:a222b205974e
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Sun Dec 30 16:57:09 2012 -0500
Extend the setup wizard's short lifespan after ARC.
Subject: adium 5249:93fd0c1cdcb5: Passing nil here will throw an exception.
details: http://hg.adium.im/adium/rev/93fd0c1cdcb5
revision: 5249:93fd0c1cdcb5
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Sun Dec 30 17:38:11 2012 -0500
Passing nil here will throw an exception.
Subject: adium 5250:3c9bf521c91c: This hasn't been used since fc3311a3ea1a and Tiger.
details: http://hg.adium.im/adium/rev/3c9bf521c91c
revision: 5250:3c9bf521c91c
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Sun Dec 30 17:49:02 2012 -0500
This hasn't been used since fc3311a3ea1a and Tiger.
Subject: adium 5251:5ecaca34d0a1: Delete.
details: http://hg.adium.im/adium/rev/5ecaca34d0a1
revision: 5251:5ecaca34d0a1
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Sun Dec 30 18:43:03 2012 -0500
Delete.
diffs (232 lines):
diff -r f0070858ec43 -r 5ecaca34d0a1 Frameworks/AIUtilities Framework/Source/AILinkTextView.m
--- a/Frameworks/AIUtilities Framework/Source/AILinkTextView.m Sun Dec 30 16:25:44 2012 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AILinkTextView.m Sun Dec 30 18:43:03 2012 -0500
@@ -105,25 +105,4 @@
[linkTrackingController setShowTooltip:inShowTooltip];
}
-- (NSMenu *)menuForEvent:(NSEvent *)theEvent
-{
- NSMenu *menu;
- NSArray *linkMenuItems;
-
- menu = [super menuForEvent:theEvent];
-
- linkMenuItems = [linkTrackingController menuItemsForEvent:theEvent withOffset:NSMakePoint(0,0)];
-
- if ([linkMenuItems count]) {
- if (!menu) menu = [[NSMenu alloc] init];
-
- [linkMenuItems enumerateObjectsWithOptions:NSEnumerationReverse
- usingBlock:^(id menuItem, NSUInteger idx, BOOL *stop) {
- [menu insertItem:menuItem atIndex:0];
- }];
- }
-
- return menu;
-}
-
@end
diff -r f0070858ec43 -r 5ecaca34d0a1 Frameworks/AIUtilities Framework/Source/AILinkTrackingController.h
--- a/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.h Sun Dec 30 16:25:44 2012 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.h Sun Dec 30 18:43:03 2012 -0500
@@ -36,6 +36,5 @@
- (void)trackLinksInRect:(NSRect)visibleRect withOffset:(NSPoint)offset;
- (BOOL)handleMouseDown:(NSEvent *)theEvent withOffset:(NSPoint)offset;
- (void)setShowTooltip:(BOOL)inShowTooltip;
-- (NSArray *)menuItemsForEvent:(NSEvent *)theEvent withOffset:(NSPoint)offset;
@end
diff -r f0070858ec43 -r 5ecaca34d0a1 Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m
--- a/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m Sun Dec 30 16:25:44 2012 -0500
+++ b/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m Sun Dec 30 18:43:03 2012 -0500
@@ -28,14 +28,11 @@
#import "AIStringUtilities.h"
#import "AIMenuAdditions.h"
-#define COPY_LINK AILocalizedStringFromTableInBundle(@"Copy Link", nil, [NSBundle bundleWithIdentifier:AIUTILITIES_BUNDLE_ID], "Copy the link to the clipboard")
-
@interface AILinkTrackingController ()
- (id)initForView:(NSView *)inControlView withTextStorage:(NSTextStorage *)inTextStorage layoutManager:(NSLayoutManager *)inLayoutManager textContainer:(NSTextContainer *)inTextContainer;
- (void)_beginCursorTrackingInRect:(NSRect)visibleRect withOffset:(NSPoint)offset;
- (void)_endCursorTracking;
- (void)_setMouseOverLink:(AIFlexibleLink *)inHoveredLink atPoint:(NSPoint)inPoint;
-- (void)copyLink:(id)sender;
@end
BOOL _mouseInRects(NSPoint aPoint, NSRectArray someRects, NSUInteger arraySize, BOOL flipped);
@@ -342,7 +339,7 @@
[[NSCursor arrowCursor] set]; //Restore the regular cursor
if (showTooltip) {
- [AITooltipUtilities showTooltipWithString:nil onWindow:nil atPoint:NSMakePoint(0,0) orientation:TooltipAbove]; //Hide the tooltip
+ [AITooltipUtilities showTooltipWithString:@"" onWindow:nil atPoint:NSMakePoint(0,0) orientation:TooltipAbove]; //Hide the tooltip
hoveredLink = nil;
hoveredString = nil;
@@ -377,32 +374,4 @@
return newArray;
}
-- (NSArray *)menuItemsForEvent:(NSEvent *)theEvent withOffset:(NSPoint)offset
-{
- NSMutableArray *menuItemsArray = nil;
- NSURL *linkURL = nil;
-
- //If a linKURL was created, add menu items for it to the menuItemsArray
- if (linkURL) {
- NSMenuItem *menuItem;
-
- menuItemsArray = [[NSMutableArray alloc] init];
- menuItem = [[NSMenuItem alloc] initWithTitle:COPY_LINK
- target:self
- action:@selector(copyLink:)
- keyEquivalent:@""];
- [menuItem setRepresentedObject:linkURL];
- [menuItemsArray addObject:menuItem];
- }
-
- return menuItemsArray;
-}
-
-//Copy the absolute URL to the clipboard
-- (void)copyLink:(id)sender
-{
- NSAttributedString *copyString = [[NSAttributedString alloc] initWithString:[(NSURL *)[sender representedObject] absoluteString] attributes:nil];
- [[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSRTFPboardType] owner:nil];
- [[NSPasteboard generalPasteboard] setData:[copyString RTFFromRange:NSMakeRange(0,[copyString length]) documentAttributes:nil] forType:NSRTFPboardType];
-}
@end
diff -r f0070858ec43 -r 5ecaca34d0a1 Frameworks/Adium Framework/Source/AIChat.h
--- a/Frameworks/Adium Framework/Source/AIChat.h Sun Dec 30 16:25:44 2012 -0500
+++ b/Frameworks/Adium Framework/Source/AIChat.h Sun Dec 30 18:43:03 2012 -0500
@@ -42,11 +42,6 @@
#define KEY_TOPIC_SETTER @"topicSetter"
typedef enum {
- AIChatTimedOut = 0,
- AIChatClosedWindow
-} AIChatUpdateType;
-
-typedef enum {
AIChatCanNotSendMessage = 0,
AIChatMayNotBeAbleToSendMessage,
AIChatCanSendMessageNow,
diff -r f0070858ec43 -r 5ecaca34d0a1 Plugins/Purple Service/CBPurpleAccount.h
--- a/Plugins/Purple Service/CBPurpleAccount.h Sun Dec 30 16:25:44 2012 -0500
+++ b/Plugins/Purple Service/CBPurpleAccount.h Sun Dec 30 18:43:03 2012 -0500
@@ -135,7 +135,6 @@
- (void)addChat:(AIChat *)chat;
- (void)typingUpdateForIMChat:(AIChat *)chat typing:(NSNumber *)typing;
-- (void)updateForChat:(AIChat *)chat type:(NSNumber *)type;
- (AIChat *)chatWithContact:(AIListContact *)contact identifier:(id)identifier;
- (void)chatWasDestroyed:(AIChat *)chat;
- (void)chatJoinDidFail:(AIChat *)chat;
diff -r f0070858ec43 -r 5ecaca34d0a1 Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m Sun Dec 30 16:25:44 2012 -0500
+++ b/Plugins/Purple Service/CBPurpleAccount.m Sun Dec 30 18:43:03 2012 -0500
@@ -1115,23 +1115,6 @@
withOwner:self];
}
-- (void)updateForChat:(AIChat *)chat type:(NSNumber *)type
-{
- AIChatUpdateType updateType = [type intValue];
- NSString *key = nil;
- switch (updateType) {
- case AIChatTimedOut:
- case AIChatClosedWindow:
- break;
- }
-
- if (key) {
- [chat setValue:[NSNumber numberWithBool:YES] forProperty:key notify:NotifyNow];
- [chat setValue:nil forProperty:key notify:NotifyNever];
-
- }
-}
-
- (void)errorForChat:(AIChat *)chat type:(NSNumber *)type
{
[chat receivedError:type];
diff -r f0070858ec43 -r 5ecaca34d0a1 Plugins/WebKit Message View/AIWebKitMessageViewPlugin.m
--- a/Plugins/WebKit Message View/AIWebKitMessageViewPlugin.m Sun Dec 30 16:25:44 2012 -0500
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewPlugin.m Sun Dec 30 18:43:03 2012 -0500
@@ -141,11 +141,7 @@
- (NSBundle *)defaultMessageStyleBundleBasedOnFailedIdentifier:(NSString *)identifier
{
NSDictionary *styles = [self availableMessageStyles];
- NSBundle *defaultMessageStyleBundle = nil;
-
- if (!defaultMessageStyleBundle) {
- defaultMessageStyleBundle = [styles objectForKey:KEY_WEBKIT_STYLE];
- }
+ NSBundle *defaultMessageStyleBundle = [styles objectForKey:KEY_WEBKIT_STYLE];
if (!defaultMessageStyleBundle) {
defaultMessageStyleBundle = [[styles allValues] lastObject];
diff -r f0070858ec43 -r 5ecaca34d0a1 Source/AIContactStatusColoringPlugin.m
--- a/Source/AIContactStatusColoringPlugin.m Sun Dec 30 16:25:44 2012 -0500
+++ b/Source/AIContactStatusColoringPlugin.m Sun Dec 30 18:43:03 2012 -0500
@@ -139,7 +139,7 @@
unviewedContent = [inContact integerValueForProperty:KEY_UNVIEWED_CONTENT];
//Unviewed content
- if ((!color && !labelColor) && (unviewedContentEnabled && unviewedContent)) {
+ if (unviewedContentEnabled && unviewedContent) {
/* Use the unviewed content settings if:
* - we aren't flashing or
* - every other flash. */
diff -r f0070858ec43 -r 5ecaca34d0a1 Source/AILogViewerWindowController.m
--- a/Source/AILogViewerWindowController.m Sun Dec 30 16:25:44 2012 -0500
+++ b/Source/AILogViewerWindowController.m Sun Dec 30 18:43:03 2012 -0500
@@ -301,9 +301,7 @@
//Add the 'to' for each grouping on this account
for (AILogToGroup *currentToGroup in [logFromGroup toGroupArray]) {
- NSString *currentTo;
-
- if ((currentTo = [currentToGroup to])) {
+ if ([currentToGroup to]) {
//Store currentToGroup on a key in the form "SERVICE.ACCOUNT_NAME/TARGET_CONTACT"
[logToGroupDict setObject:currentToGroup forKey:[currentToGroup relativePath]];
}
diff -r f0070858ec43 -r 5ecaca34d0a1 Source/AdiumSetupWizard.m
--- a/Source/AdiumSetupWizard.m Sun Dec 30 16:25:44 2012 -0500
+++ b/Source/AdiumSetupWizard.m Sun Dec 30 18:43:03 2012 -0500
@@ -51,9 +51,11 @@
*/
+ (void)runWizard
{
- AdiumSetupWizard *setupWizardWindowController;
-
- setupWizardWindowController = [[self alloc] initWithWindowNibName:@"SetupWizard"];
+ static AdiumSetupWizard *setupWizardWindowController = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ setupWizardWindowController = [[self alloc] initWithWindowNibName:@"SetupWizard"];
+ });
[setupWizardWindowController show];
}
diff -r f0070858ec43 -r 5ecaca34d0a1 Source/AdiumSound.m
--- a/Source/AdiumSound.m Sun Dec 30 16:25:44 2012 -0500
+++ b/Source/AdiumSound.m Sun Dec 30 18:43:03 2012 -0500
@@ -178,7 +178,6 @@
}
//Load and cache the sound
- NSError *error = nil;
sound = [[NSSound alloc] initWithContentsOfFile:inPath byReference:NO];
if (sound) {
//Insert the player at the front of our cache
@@ -189,8 +188,6 @@
[sound setVolume:customVolume];
[self configureAudioContextForSound:sound];
- } else {
- AILogWithSignature(@"Error loading %@: %@", inPath, error);
}
} else {
More information about the commits
mailing list