adium-1.4 2582:d6c05d5c4ca7: Backed out changeset d13301831855
commits at adium.im
commits at adium.im
Wed Aug 19 18:44:38 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/d6c05d5c4ca7
revision: 2582:d6c05d5c4ca7
author: Stephen Holt <sholt at adium.im>
date: Wed Aug 19 14:40:36 2009 -0400
Backed out changeset d13301831855
Fixing bad merge to adium-1.4, stage:1
Subject: adium-1.4 2583:69da428d6079: Fix a crash introduced in [e9d5997a22bf]
details: http://hg.adium.im/adium-1.4/rev/69da428d6079
revision: 2583:69da428d6079
author: Stephen Holt <sholt at adium.im>
date: Tue Aug 18 16:17:09 2009 -0400
Fix a crash introduced in [e9d5997a22bf]
(transplanted from 43b286d88e6ffa4b291f75da5a5a6a6f03c32cf6)
(transplanted from 1f4855310d93a02e2efa3cf98b6021d93b854706)
Subject: adium-1.4 2584:66744530d345: 1.3.5 and 1.3.6 changes
details: http://hg.adium.im/adium-1.4/rev/66744530d345
revision: 2584:66744530d345
author: Evan Schoenberg
date: Tue Aug 18 14:00:43 2009 -0500
1.3.5 and 1.3.6 changes
Reapply, last stage of merge cleanup
diffs (195 lines):
diff -r d13301831855 -r 66744530d345 Frameworks/Adium Framework/Source/AIHTMLDecoder.m
--- a/Frameworks/Adium Framework/Source/AIHTMLDecoder.m Tue Aug 18 14:01:14 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIHTMLDecoder.m Tue Aug 18 14:00:43 2009 -0500
@@ -432,10 +432,10 @@
linkString = fixedLinkString;
}
- [string appendString:linkString];
+ [string appendString:[linkString stringByEscapingForXMLWithEntities:nil]];
if (!thingsToInclude.simpleTagsOnly) {
[string appendString:@"\" title=\""];
- [string appendString:linkString];
+ [string appendString:[linkString stringByEscapingForXMLWithEntities:nil]];
}
NSString *classString = [attributes objectForKey:AIElementClassAttributeName];
diff -r d13301831855 -r 66744530d345 Frameworks/Adium Framework/Source/AIMessageEntryTextView.m
--- a/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Tue Aug 18 14:01:14 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Tue Aug 18 14:00:43 2009 -0500
@@ -1120,11 +1120,12 @@
- (void)positionCharacterCounter
{
NSRect visRect = [[self superview] bounds];
- NSRect counterRect = [characterCounter frame];
+ NSSize counterSize = characterCounter.string.size;
//NSMaxY([self frame]) is necessary because visRect's height changes after you start typing. No idea why.
- [characterCounter setFrameOrigin:NSMakePoint(NSMaxX(visRect) - NSWidth(counterRect) - INDICATOR_RIGHT_PADDING,
- NSMidY([self frame]) - NSHeight(counterRect)/2)];
+ [characterCounter setFrameOrigin:NSMakePoint(NSMaxX(visRect) - counterSize.width - INDICATOR_RIGHT_PADDING,
+ NSMidY([self frame]) - (counterSize.height)/2)];
+ [characterCounter setFrameSize:counterSize];
[[self enclosingScrollView] setNeedsDisplay:YES];
}
diff -r d13301831855 -r 66744530d345 Frameworks/Adium Framework/Source/AIXMLElement.m
--- a/Frameworks/Adium Framework/Source/AIXMLElement.m Tue Aug 18 14:01:14 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIXMLElement.m Tue Aug 18 14:00:43 2009 -0500
@@ -230,7 +230,7 @@
} else if ([value respondsToSelector:@selector(absoluteString)]) {
value = [(NSURL *)value absoluteString];
}
- [string appendFormat:@" %@=%@", key, [self quotedXMLAttributeValueStringForString:value]];
+ [string appendFormat:@" %@=\"%@\"", key, value];
}
}
if ((![contents count]) && (selfCloses)) {
diff -r d13301831855 -r 66744530d345 Frameworks/Adium Framework/Source/ESFileTransfer.h
--- a/Frameworks/Adium Framework/Source/ESFileTransfer.h Tue Aug 18 14:01:14 2009 -0500
+++ b/Frameworks/Adium Framework/Source/ESFileTransfer.h Tue Aug 18 14:00:43 2009 -0500
@@ -72,7 +72,7 @@
@property (readwrite, nonatomic, retain) id accountData;
- at property (readwrite, nonatomic, retain) id <FileTransferDelegate> delegate;
+ at property (readwrite, nonatomic, assign) id <FileTransferDelegate> delegate;
@property (readonly, nonatomic) BOOL isStopped;
diff -r d13301831855 -r 66744530d345 Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m
--- a/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m Tue Aug 18 14:01:14 2009 -0500
+++ b/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m Tue Aug 18 14:00:43 2009 -0500
@@ -93,7 +93,7 @@
if (!startSet) {
NSMutableCharacterSet *mutableStartSet = [[NSMutableCharacterSet alloc] init];
[mutableStartSet formUnionWithCharacterSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
- [mutableStartSet formUnionWithCharacterSet:[NSCharacterSet characterSetWithCharactersInString:@"\"'.,:;<?!-@"]];
+ [mutableStartSet formUnionWithCharacterSet:[NSCharacterSet characterSetWithCharactersInString:[NSString stringWithFormat:@"\"'.,:;<?!-@%C%C", 0x2014, 0x2013]]];
startSet = [[NSCharacterSet characterSetWithBitmapRepresentation:[mutableStartSet bitmapRepresentation]] retain];
[mutableStartSet release];
}
diff -r d13301831855 -r 66744530d345 Frameworks/AutoHyperlinks Framework/UnitTests/HyperlinkContextTest.m
--- a/Frameworks/AutoHyperlinks Framework/UnitTests/HyperlinkContextTest.m Tue Aug 18 14:01:14 2009 -0500
+++ b/Frameworks/AutoHyperlinks Framework/UnitTests/HyperlinkContextTest.m Tue Aug 18 14:00:43 2009 -0500
@@ -64,6 +64,8 @@
- (void)testURIBorder:(NSString *)URIString {
[self testLaxContext:@":%@" withURI:URIString];
+ [self testLaxContext:@"—%@" withURI:URIString];
+ [self testLaxContext:@"–%@" withURI:URIString];
[self testLaxContext:@"check it out:%@" withURI:URIString];
[self testLaxContext:@"%@:" withURI:URIString];
[self testLaxContext:@"%@." withURI:URIString];
diff -r d13301831855 -r 66744530d345 Plugins/Purple Service/AMPurpleJabberNode.m
--- a/Plugins/Purple Service/AMPurpleJabberNode.m Tue Aug 18 14:01:14 2009 -0500
+++ b/Plugins/Purple Service/AMPurpleJabberNode.m Tue Aug 18 14:00:43 2009 -0500
@@ -21,6 +21,12 @@
@property (readwrite, retain, nonatomic) NSArray *itemsArray;
@end
+static CFArrayCallBacks nonretainingArrayCallbacks = {
+ .version = 0,
+ .copyDescription = (CFArrayCopyDescriptionCallBack)CFCopyDescription,
+ .equal = (CFArrayEqualCallBack)CFEqual,
+};
+
@implementation AMPurpleJabberNode
static void AMPurpleJabberNode_received_data_cb(PurpleConnection *gc, xmlnode **packet, gpointer this) {
@@ -131,7 +137,7 @@
name:queryName ? [NSString stringWithUTF8String:queryName] : nil
connection:self.gc];
// propagate delegates
- newnode.delegates = [[self.delegates mutableCopy] autorelease];
+ newnode.delegates = [NSMakeCollectable(CFArrayCreateMutableCopy(kCFAllocatorDefault, /*capacity*/ 0, (CFArrayRef)self.delegates)) autorelease];
[newItems addObject:newnode];
// check if we're a conference service
if ([[self jid] rangeOfString:@"@"].location == NSNotFound) { // we can't be one when we have an @
@@ -173,7 +179,7 @@
self.node = _node;
self.name = _name;
self.gc = _gc;
- self.delegates = [NSMutableArray array];
+ self.delegates = [NSMakeCollectable(CFArrayCreateMutable(kCFAllocatorDefault, /*capacity*/ 0, &nonretainingArrayCallbacks)) autorelease];
purple_signal_connect(jabber, "jabber-receiving-xmlnode", self,
PURPLE_CALLBACK(AMPurpleJabberNode_received_data_cb), self);
@@ -197,7 +203,7 @@
copy.name = self.name;
copy.gc = self.gc;
- copy.delegates = [NSMutableArray array];
+ copy.delegates = [NSMakeCollectable(CFArrayCreateMutable(kCFAllocatorDefault, /*capacity*/ 0, &nonretainingArrayCallbacks)) autorelease];
copy.features = self.features;
copy.identities = self.identities;
copy.itemsArray = self.itemsArray;
diff -r d13301831855 -r 66744530d345 Resources/AdvancedPreferences.nib/classes.nib
--- a/Resources/AdvancedPreferences.nib/classes.nib Tue Aug 18 14:01:14 2009 -0500
+++ b/Resources/AdvancedPreferences.nib/classes.nib Tue Aug 18 14:00:43 2009 -0500
@@ -154,14 +154,6 @@
</dict>
<dict>
<key>CLASS</key>
- <string>AISearchFieldCell</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSSearchFieldCell</string>
- </dict>
- <dict>
- <key>CLASS</key>
<string>NSImageCell</string>
<key>LANGUAGE</key>
<string>ObjC</string>
diff -r d13301831855 -r 66744530d345 Resources/AdvancedPreferences.nib/info.nib
--- a/Resources/AdvancedPreferences.nib/info.nib Tue Aug 18 14:01:14 2009 -0500
+++ b/Resources/AdvancedPreferences.nib/info.nib Tue Aug 18 14:00:43 2009 -0500
@@ -13,7 +13,7 @@
<integer>15</integer>
</array>
<key>IBSystem Version</key>
- <string>9J3050</string>
+ <string>9L30</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
diff -r d13301831855 -r 66744530d345 Resources/AdvancedPreferences.nib/keyedobjects.nib
Binary file Resources/AdvancedPreferences.nib/keyedobjects.nib has changed
diff -r d13301831855 -r 66744530d345 Source/AIEmoticonController.m
--- a/Source/AIEmoticonController.m Tue Aug 18 14:01:14 2009 -0500
+++ b/Source/AIEmoticonController.m Tue Aug 18 14:00:43 2009 -0500
@@ -276,19 +276,29 @@
/* If the emoticon would end the string except for whitespace, newlines, or punctionation at the end, or it begins the string after removing
* whitespace, newlines, or punctuation at the beginning, it is acceptable even if the previous conditions weren't met.
*/
- static NSCharacterSet *endingTrimSet = nil;
- if (!endingTrimSet) {
+ NSCharacterSet *endingTrimSet = nil;
+ static NSMutableDictionary *endingSetDict = nil;
+ if(!endingSetDict) {
+ endingSetDict = [[NSMutableDictionary alloc] initWithCapacity:10];
+ }
+ if (!(endingTrimSet = [endingSetDict objectForKey:replacementString])) {
NSMutableCharacterSet *tempSet = [[NSCharacterSet punctuationCharacterSet] mutableCopy];
[tempSet formUnionWithCharacterSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
- endingTrimSet = [tempSet immutableCopy];
+ [tempSet formUnionWithCharacterSet:[NSCharacterSet symbolCharacterSet]];
+ //remove any characters *in* the replacement string from the trimming set
+ [tempSet removeCharactersInString:replacementString];
+ [endingSetDict setObject:[tempSet immutableCopy] forKey:replacementString];
[tempSet release];
+ endingTrimSet = [endingSetDict objectForKey:replacementString];
}
NSString *trimmedString = [messageString stringByTrimmingCharactersInSet:endingTrimSet];
NSUInteger trimmedLength = [trimmedString length];
if (trimmedLength == (originalEmoticonLocation + textLength)) {
+ // Replace at end of string
acceptable = YES;
- } else if ((originalEmoticonLocation - (messageStringLength - trimmedLength)) == 0) {
+ } else if ([trimmedString characterAtIndex:0] == [replacementString characterAtIndex:0]) {
+ // Replace at start of string
acceptable = YES;
}
}
More information about the commits
mailing list