adium 2606:2f176c375a9e: Fixed

commits at adium.im commits at adium.im
Tue Aug 18 20:34:54 UTC 2009


details:	http://hg.adium.im/adium/rev/2f176c375a9e
revision:	2606:2f176c375a9e
author:		Evan Schoenberg
date:		Tue Aug 18 15:38:43 2009 -0500

Fixed
Subject: adium 2607:cc2a45742f21: Partial updates for voice/video compilation in the modern Dependencies script

details:	http://hg.adium.im/adium/rev/cc2a45742f21
revision:	2607:cc2a45742f21
author:		Evan Schoenberg
date:		Tue Aug 18 15:41:10 2009 -0500

Partial updates for voice/video compilation in the modern Dependencies script
Subject: adium 2608:ae1a0c1173a3: Merged

details:	http://hg.adium.im/adium/rev/ae1a0c1173a3
revision:	2608:ae1a0c1173a3
author:		Evan Schoenberg
date:		Tue Aug 18 15:41:28 2009 -0500

Merged

diffs (470 lines):

diff -r cd0e60e81735 -r ae1a0c1173a3 Dependencies/build.sh
--- a/Dependencies/build.sh	Sat Aug 08 14:17:42 2009 -0500
+++ b/Dependencies/build.sh	Tue Aug 18 15:41:28 2009 -0500
@@ -1,5 +1,7 @@
 #!/bin/bash -eu
 
+NUMBER_OF_CORES=`sysctl -n hw.activecpu`
+
 ##
 # status <string>
 #
@@ -206,7 +208,7 @@
 	fi
 	
 	status "Building and installing pkg-config"
-	make
+	make -j $NUMBER_OF_CORES
 	make install
 	
 	quiet popd
@@ -234,7 +236,7 @@
 	fi
 	
 	status "Building and installing gettext"
-	make
+	make -j $NUMBER_OF_CORES
 	make install
 
 	# Undo all of our patches... goodbye!
@@ -277,7 +279,7 @@
 	fi
 	
 	status "Building and installing glib"
-	make
+	make -j $NUMBER_OF_CORES
 	make install
 	
 	# Revert the patches
@@ -333,7 +335,7 @@
 	fi
 	
 	status "Building and installing Meanwhile"
-	CFLAGS="$FLAGS" LDFLAGS="$FLAGS" make
+	CFLAGS="$FLAGS" LDFLAGS="$FLAGS" make -j $NUMBER_OF_CORES
 	make install
 	
 	# Undo all the patches
@@ -365,7 +367,7 @@
 	fi
 	
 	status "Building and installing Gadu-Gadu"
-	make
+	make -j $NUMBER_OF_CORES
 	make install
 	
 	quiet popd
@@ -396,7 +398,7 @@
 	fi
 	
 	status "Building and installing SIPE"
-	make
+	make -j $NUMBER_OF_CORES
 	make install
 	
 	quiet popd
@@ -426,7 +428,7 @@
 	fi
 	
 	status "Building and installing Gfire"
-	make
+	make -j $NUMBER_OF_CORES
 	make install
 	
 	quiet popd
@@ -448,7 +450,7 @@
 	fi
 	
 	status "Building and installing intltool"
-	make
+	make -j $NUMBER_OF_CORES
 	make install
 	
 	quiet popd
@@ -558,7 +560,7 @@
 	fi
 	
 	status "Building and installing libpurple"
-	make
+	make -j $NUMBER_OF_CORES
 	make install
 	
 	status "Copying internal libpurple headers"
@@ -585,14 +587,74 @@
 	quiet popd
 }
 
+build_libxml2() {
+	prereq "xml2" \
+		"ftp://xmlsoft.org:21//libxml2/libxml2-sources-2.7.3.tar.gz"
+	
+	quiet pushd "$ROOTDIR/source/xml2"
+	
+	if needsconfigure $@; then
+		status "Configuring xml2"
+		CFLAGS="$FLAGS" LDFLAGS="$FLAGS" \
+			PKG_CONFIG="$ROOTDIR/build/bin/pkg-config" \
+			PKG_CONFIG_PATH="$ROOTDIR/build/lib/pkgconfig:/usr/lib/pkgconfig" \
+			./configure \
+				--prefix="$ROOTDIR/build" \
+				--with-python=no \
+				--disable-dependency-tracking
+	fi
+	
+	status "Building and installing xml2"
+	make -j $NUMBER_OF_CORES
+	make install
+	
+	quiet popd
+}
+
+##
+# gstreamer plugins
+#
+build_gst_plugins() {
+	prereq "oil" \
+		"http://liboil.freedesktop.org/download/liboil-0.3.16.tar.gz"
+	prereq "gst-plugins-base" \
+		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.23.tar.gz"
+	prereq "gst-plugins-good" \
+		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-good-0.10.15.tar.gz"
+	prereq "gst-plugins-bad" \
+		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-bad-0.10.13.tar.gz"
+	prereq "gst-plugins-farsight" \
+		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-farsight-0.12.11.tar.gz"
+
+	quiet pushd "$ROOTDIR/source/oil"
+	
+	if needsconfigure $@; then
+		status "Configuring oil"
+		CFLAGS="$FLAGS" LDFLAGS="$FLAGS" \
+			PKG_CONFIG="$ROOTDIR/build/bin/pkg-config" \
+			PKG_CONFIG_PATH="$ROOTDIR/build/lib/pkgconfig:/usr/lib/pkgconfig" \
+			./configure \
+				--prefix="$ROOTDIR/build" \
+				--disable-dependency-tracking
+	fi
+	
+	status "Building and installing gstreamer"
+	warning "Building too much! Patch the Makefile"
+	make -j $NUMBER_OF_CORES
+	make install
+	
+	quiet popd
+}
+
+
 ##
 # gstreamer
 #
 build_gstreamer() {
+    build_libxml2 $@
+
 	prereq "gstreamer" \
-		"http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.23.tar.gz"
-	prereq "gstreamer-plugins-base" \
-		"http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.23.tar.gz"
+		"http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.24.tar.gz"
 	
 	quiet pushd "$ROOTDIR/source/gstreamer"
 	
@@ -608,12 +670,15 @@
 	
 	status "Building and installing gstreamer"
 	warning "Building too much! Patch the Makefile"
-	make
+	make -j $NUMBER_OF_CORES
 	make install
 	
 	quiet popd
+	
+	build_gst_plugins
 }
 
+
 ##
 # make_po_files
 #
diff -r cd0e60e81735 -r ae1a0c1173a3 Frameworks/Adium Framework/Source/AIHTMLDecoder.m
--- a/Frameworks/Adium Framework/Source/AIHTMLDecoder.m	Sat Aug 08 14:17:42 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIHTMLDecoder.m	Tue Aug 18 15:41:28 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 cd0e60e81735 -r ae1a0c1173a3 Frameworks/Adium Framework/Source/AIMessageEntryTextView.m
--- a/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m	Sat Aug 08 14:17:42 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m	Tue Aug 18 15:41:28 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 cd0e60e81735 -r ae1a0c1173a3 Frameworks/Adium Framework/Source/AIXMLElement.m
--- a/Frameworks/Adium Framework/Source/AIXMLElement.m	Sat Aug 08 14:17:42 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIXMLElement.m	Tue Aug 18 15:41:28 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 cd0e60e81735 -r ae1a0c1173a3 Frameworks/Adium Framework/Source/ESFileTransfer.h
--- a/Frameworks/Adium Framework/Source/ESFileTransfer.h	Sat Aug 08 14:17:42 2009 -0500
+++ b/Frameworks/Adium Framework/Source/ESFileTransfer.h	Tue Aug 18 15:41:28 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 cd0e60e81735 -r ae1a0c1173a3 Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.h
--- a/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.h	Sat Aug 08 14:17:42 2009 -0500
+++ b/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.h	Tue Aug 18 15:41:28 2009 -0500
@@ -42,7 +42,7 @@
 
 @class AHMarkedHyperlink;
 
- at interface AHHyperlinkScanner : NSObject
+ at interface AHHyperlinkScanner : NSObject <NSFastEnumeration>
 {
 	NSDictionary				*m_urlSchemes;
 	NSString					*m_scanString;
diff -r cd0e60e81735 -r ae1a0c1173a3 Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m
--- a/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m	Sat Aug 08 14:17:42 2009 -0500
+++ b/Frameworks/AutoHyperlinks Framework/Source/AHHyperlinkScanner.m	Tue Aug 18 15:41:28 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];
 		}
@@ -245,7 +245,7 @@
 	unsigned long scannedLocation = m_scanLocation;
 	
     // scan upto the next whitespace char so that we don't unnecessarity confuse flex
-    // otherwise we end up validating urls that look like this "http://www.adiumx.com/ <--cool"
+    // otherwise we end up validating urls that look like this "http://www.adium.im/ <--cool"
 	[self _scanString:m_scanString charactersFromSet:startSet intoRange:nil fromIndex:&scannedLocation];
 
 	// main scanning loop
@@ -375,10 +375,10 @@
 	}
 
 	//for each SHMarkedHyperlink, add the proper URL to the proper range in the string.
-	while((markedLink = [self nextURI])) {
+	for(markedLink in self) {
 		NSURL *markedLinkURL;
 		_didFindLinks = YES;
-		if((markedLinkURL = [markedLink URL])){
+		if((markedLinkURL = [markedLink URL])) {
 			[linkifiedString addAttribute:NSLinkAttributeName
 									value:markedLinkURL
 									range:[markedLink range]];
@@ -401,6 +401,24 @@
 	m_scanLocation = location;
 }
 
+#pragma mark NSFastEnumeration
+- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len
+{
+	AHMarkedHyperlink	*currentLink;
+	
+	NSUInteger fastEnumCount = 0;
+	while (fastEnumCount < len && nil != (currentLink = [self nextURI])) {
+		stackbuf[fastEnumCount] = currentLink;
+		++fastEnumCount;
+	}
+	
+	state->state = (nil == currentLink)? (NSUInteger)currentLink : NSNotFound;
+	state->itemsPtr = stackbuf;
+	state->mutationsPtr = (unsigned long *)self;
+	
+	return fastEnumCount;
+}
+
 #pragma mark Below Here There Be Private Methods
 
 - (NSRange)_longestBalancedEnclosureInRange:(NSRange)inRange
diff -r cd0e60e81735 -r ae1a0c1173a3 Frameworks/AutoHyperlinks Framework/UnitTests/HyperlinkContextTest.m
--- a/Frameworks/AutoHyperlinks Framework/UnitTests/HyperlinkContextTest.m	Sat Aug 08 14:17:42 2009 -0500
+++ b/Frameworks/AutoHyperlinks Framework/UnitTests/HyperlinkContextTest.m	Tue Aug 18 15:41:28 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 cd0e60e81735 -r ae1a0c1173a3 Plugins/Purple Service/AMPurpleJabberNode.m
--- a/Plugins/Purple Service/AMPurpleJabberNode.m	Sat Aug 08 14:17:42 2009 -0500
+++ b/Plugins/Purple Service/AMPurpleJabberNode.m	Tue Aug 18 15:41:28 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 cd0e60e81735 -r ae1a0c1173a3 Plugins/Purple Service/ESPurpleYahooAccount.m
--- a/Plugins/Purple Service/ESPurpleYahooAccount.m	Sat Aug 08 14:17:42 2009 -0500
+++ b/Plugins/Purple Service/ESPurpleYahooAccount.m	Tue Aug 18 15:41:28 2009 -0500
@@ -246,7 +246,6 @@
 	}
 
 	g_free(normalized);
-#endif
 	
 	//Yahoo doesn't have an explicit mobile state; instead the status message is automatically set to indicate mobility.
 	if (statusMessageString && ([statusMessageString isEqualToString:@"I'm on SMS"] ||
diff -r cd0e60e81735 -r ae1a0c1173a3 Resources/AdvancedPreferences.nib/classes.nib
--- a/Resources/AdvancedPreferences.nib/classes.nib	Sat Aug 08 14:17:42 2009 -0500
+++ b/Resources/AdvancedPreferences.nib/classes.nib	Tue Aug 18 15:41:28 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 cd0e60e81735 -r ae1a0c1173a3 Resources/AdvancedPreferences.nib/info.nib
--- a/Resources/AdvancedPreferences.nib/info.nib	Sat Aug 08 14:17:42 2009 -0500
+++ b/Resources/AdvancedPreferences.nib/info.nib	Tue Aug 18 15:41:28 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 cd0e60e81735 -r ae1a0c1173a3 Resources/AdvancedPreferences.nib/keyedobjects.nib
Binary file Resources/AdvancedPreferences.nib/keyedobjects.nib has changed
diff -r cd0e60e81735 -r ae1a0c1173a3 Resources/Credits.rtf
--- a/Resources/Credits.rtf	Sat Aug 08 14:17:42 2009 -0500
+++ b/Resources/Credits.rtf	Tue Aug 18 15:41:28 2009 -0500
@@ -1,4 +1,4 @@
-{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf460
+{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
 {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Verdana;}
 {\colortbl;\red255\green255\blue255;\red127\green127\blue127;}
 \vieww9680\viewh15000\viewkind0
@@ -438,7 +438,7 @@
 \CocoaLigature1  \CocoaLigature0 \'95\CocoaLigature1  \CocoaLigature0  Rainer Brockerhoff's RBSplitView, a replacement for NSSplitView\
      <http://www.brockerhoff.net/src/rbs.html>\CocoaLigature1 \
 \
- \CocoaLigature0 \'95\CocoaLigature1  \CocoaLigature0  \CocoaLigature1 ShortcutRecorder, a keyboard shortcut recorder and global hotkey manager\
+ \CocoaLigature0 \'95\CocoaLigature1  \CocoaLigature0  \CocoaLigature1 Shortcut Recorder, a keyboard shortcut recorder\
      <http://wafflesoftware.net/shortcut/>\CocoaLigature0 \
 \
 \CocoaLigature1  \CocoaLigature0 \'95\CocoaLigature1  \CocoaLigature0  Sparkle, an update framework\
diff -r cd0e60e81735 -r ae1a0c1173a3 Source/AIEmoticonController.m
--- a/Source/AIEmoticonController.m	Sat Aug 08 14:17:42 2009 -0500
+++ b/Source/AIEmoticonController.m	Tue Aug 18 15:41:28 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