adium 5167:0a5d423144c6: Move these files to where they seem to ...

commits at adium.im commits at adium.im
Mon Oct 22 13:39:16 UTC 2012


details:	http://hg.adium.im/adium/rev/0a5d423144c6
revision:	5167:0a5d423144c6
branch:		adium-1.6
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Mon Oct 22 12:33:41 2012 +0200

Move these files to where they seem to belong.
Subject: adium 5168:927c13685c9e: Added a top bar to parted conversations with a "Rejoin" button.

details:	http://hg.adium.im/adium/rev/927c13685c9e
revision:	5168:927c13685c9e
branch:		adium-1.6
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Mon Oct 22 15:37:49 2012 +0200

Added a top bar to parted conversations with a "Rejoin" button.

diffs (truncated from 2679 to 1000 lines):

diff -r d60e3fe6adc1 -r 927c13685c9e Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj	Mon Oct 22 01:53:40 2012 +0200
+++ b/Adium.xcodeproj/project.pbxproj	Mon Oct 22 15:37:49 2012 +0200
@@ -1366,13 +1366,15 @@
 		76731DE315F90538007728C3 /* libgpgerror.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76731DE115F90538007728C3 /* libgpgerror.framework */; };
 		76731DE415F9057F007728C3 /* libgcrypt.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 76731DE015F90538007728C3 /* libgcrypt.framework */; };
 		76731DE515F90582007728C3 /* libgpgerror.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 76731DE115F90538007728C3 /* libgpgerror.framework */; };
-		767870CE16334AA700BD0E4D /* AIAccountSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 767870CD16334AA600BD0E4D /* AIAccountSelectionViewController.m */; };
 		767870E41634045D00BD0E4D /* AIMessageViewTopBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 767870E31634045C00BD0E4D /* AIMessageViewTopBarController.m */; };
-		767870E51634139600BD0E4D /* AIAccountSelectionTopBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 767870E71634139600BD0E4D /* AIAccountSelectionTopBar.xib */; };
 		76889DEB12D3CA17007AEF00 /* get-info.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 76889DEA12D3CA17007AEF00 /* get-info.tiff */; };
 		76889DEF12D3CA40007AEF00 /* Profile.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 76889DEE12D3CA40007AEF00 /* Profile.tiff */; };
 		76A79E0B16349477007A0497 /* AIGroupChat.h in Headers */ = {isa = PBXBuildFile; fileRef = 76A79E0916349477007A0497 /* AIGroupChat.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		76A79E0C16349477007A0497 /* AIGroupChat.m in Sources */ = {isa = PBXBuildFile; fileRef = 76A79E0A16349477007A0497 /* AIGroupChat.m */; };
+		76AA110C1635585E00A6EC4B /* AIAccountSelectionTopBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76AA11091635585E00A6EC4B /* AIAccountSelectionTopBar.xib */; };
+		76AA110D1635585E00A6EC4B /* AIAccountSelectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AA110B1635585E00A6EC4B /* AIAccountSelectionViewController.m */; };
+		76AA1110163558B200A6EC4B /* AIRejoinGroupChatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76AA110F163558B200A6EC4B /* AIRejoinGroupChatViewController.m */; };
+		76AA11121635592600A6EC4B /* AIRejoinGroupChatTopBar.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76AA11111635592600A6EC4B /* AIRejoinGroupChatTopBar.xib */; };
 		76C1AF9C125A906A00D269A9 /* AIAdiumURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 76C1AF9B125A906A00D269A9 /* AIAdiumURLProtocol.m */; };
 		76FF925A14B524B40043E23B /* AIIRCConsoleController.h in Headers */ = {isa = PBXBuildFile; fileRef = 76FF925814B524B40043E23B /* AIIRCConsoleController.h */; };
 		76FF925B14B524B40043E23B /* AIIRCConsoleController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76FF925914B524B40043E23B /* AIIRCConsoleController.m */; };
@@ -4397,15 +4399,18 @@
 		766ABAB51306D1020049FFB7 /* AIUnreadMessagesTooltip.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIUnreadMessagesTooltip.m; path = Source/AIUnreadMessagesTooltip.m; sourceTree = "<group>"; };
 		76731DE015F90538007728C3 /* libgcrypt.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libgcrypt.framework; path = Frameworks/libgcrypt.framework; sourceTree = "<group>"; };
 		76731DE115F90538007728C3 /* libgpgerror.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libgpgerror.framework; path = Frameworks/libgpgerror.framework; sourceTree = "<group>"; };
-		767870CC16334AA600BD0E4D /* AIAccountSelectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIAccountSelectionViewController.h; path = Source/AIAccountSelectionViewController.h; sourceTree = "<group>"; };
-		767870CD16334AA600BD0E4D /* AIAccountSelectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIAccountSelectionViewController.m; path = Source/AIAccountSelectionViewController.m; sourceTree = "<group>"; };
 		767870E21634045C00BD0E4D /* AIMessageViewTopBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIMessageViewTopBarController.h; path = Source/AIMessageViewTopBarController.h; sourceTree = "<group>"; };
 		767870E31634045C00BD0E4D /* AIMessageViewTopBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIMessageViewTopBarController.m; path = Source/AIMessageViewTopBarController.m; sourceTree = "<group>"; };
-		767870E61634139600BD0E4D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/AIAccountSelectionTopBar.xib; sourceTree = "<group>"; };
 		76889DEA12D3CA17007AEF00 /* get-info.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "get-info.tiff"; path = "Resources/get-info.tiff"; sourceTree = "<group>"; };
 		76889DEE12D3CA40007AEF00 /* Profile.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Profile.tiff; path = Resources/Profile.tiff; sourceTree = "<group>"; };
 		76A79E0916349477007A0497 /* AIGroupChat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIGroupChat.h; path = "Frameworks/Adium Framework/Source/AIGroupChat.h"; sourceTree = "<group>"; };
 		76A79E0A16349477007A0497 /* AIGroupChat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIGroupChat.m; path = "Frameworks/Adium Framework/Source/AIGroupChat.m"; sourceTree = "<group>"; };
+		76AA11091635585E00A6EC4B /* AIAccountSelectionTopBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AIAccountSelectionTopBar.xib; path = "Plugins/Dual Window Interface/AIAccountSelectionTopBar.xib"; sourceTree = "<group>"; };
+		76AA110A1635585E00A6EC4B /* AIAccountSelectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIAccountSelectionViewController.h; path = "Plugins/Dual Window Interface/AIAccountSelectionViewController.h"; sourceTree = "<group>"; };
+		76AA110B1635585E00A6EC4B /* AIAccountSelectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIAccountSelectionViewController.m; path = "Plugins/Dual Window Interface/AIAccountSelectionViewController.m"; sourceTree = "<group>"; };
+		76AA110E163558B200A6EC4B /* AIRejoinGroupChatViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIRejoinGroupChatViewController.h; path = "Plugins/Dual Window Interface/AIRejoinGroupChatViewController.h"; sourceTree = "<group>"; };
+		76AA110F163558B200A6EC4B /* AIRejoinGroupChatViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIRejoinGroupChatViewController.m; path = "Plugins/Dual Window Interface/AIRejoinGroupChatViewController.m"; sourceTree = "<group>"; };
+		76AA11111635592600A6EC4B /* AIRejoinGroupChatTopBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AIRejoinGroupChatTopBar.xib; path = "Plugins/Dual Window Interface/AIRejoinGroupChatTopBar.xib"; sourceTree = "<group>"; };
 		76C1AF9A125A906A00D269A9 /* AIAdiumURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIAdiumURLProtocol.h; path = "Plugins/WebKit Message View/AIAdiumURLProtocol.h"; sourceTree = "<group>"; };
 		76C1AF9B125A906A00D269A9 /* AIAdiumURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIAdiumURLProtocol.m; path = "Plugins/WebKit Message View/AIAdiumURLProtocol.m"; sourceTree = "<group>"; };
 		76FF925814B524B40043E23B /* AIIRCConsoleController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIIRCConsoleController.h; path = "Plugins/Purple Service/AIIRCConsoleController.h"; sourceTree = "<group>"; };
@@ -7077,9 +7082,12 @@
 			children = (
 				4B25494603F6A32700A8010A /* AIAccountSelectionView.h */,
 				4B25494703F6A32700A8010A /* AIAccountSelectionView.m */,
-				767870E71634139600BD0E4D /* AIAccountSelectionTopBar.xib */,
-				767870CC16334AA600BD0E4D /* AIAccountSelectionViewController.h */,
-				767870CD16334AA600BD0E4D /* AIAccountSelectionViewController.m */,
+				76AA11091635585E00A6EC4B /* AIAccountSelectionTopBar.xib */,
+				76AA110A1635585E00A6EC4B /* AIAccountSelectionViewController.h */,
+				76AA110B1635585E00A6EC4B /* AIAccountSelectionViewController.m */,
+				76AA110E163558B200A6EC4B /* AIRejoinGroupChatViewController.h */,
+				76AA110F163558B200A6EC4B /* AIRejoinGroupChatViewController.m */,
+				76AA11111635592600A6EC4B /* AIRejoinGroupChatTopBar.xib */,
 			);
 			name = Other;
 			sourceTree = "<group>";
@@ -9795,7 +9803,8 @@
 				C6B545AA15D3390F0005F1F8 /* ABSearch at 2x.png in Resources */,
 				C61AFA9A15DD43C80001EDEF /* AboutDialog_bg at 2x.png in Resources */,
 				C6BC7F9B15DD666600C5FF52 /* events-notification.tiff in Resources */,
-				767870E51634139600BD0E4D /* AIAccountSelectionTopBar.xib in Resources */,
+				76AA110C1635585E00A6EC4B /* AIAccountSelectionTopBar.xib in Resources */,
+				76AA11121635592600A6EC4B /* AIRejoinGroupChatTopBar.xib in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -10445,8 +10454,9 @@
 				5A4BD52513F8653D00A4D3F7 /* ESContactListAdvancedPreferences.m in Sources */,
 				5A4BD55413F86A6200A4D3F7 /* AIMessagePreferences.m in Sources */,
 				5A5EC831154649140043FFAA /* AIPreferenceCollectionItem.m in Sources */,
-				767870CE16334AA700BD0E4D /* AIAccountSelectionViewController.m in Sources */,
 				767870E41634045D00BD0E4D /* AIMessageViewTopBarController.m in Sources */,
+				76AA110D1635585E00A6EC4B /* AIAccountSelectionViewController.m in Sources */,
+				76AA1110163558B200A6EC4B /* AIRejoinGroupChatViewController.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -12199,15 +12209,6 @@
 			name = Localizable.strings;
 			sourceTree = "<group>";
 		};
-		767870E71634139600BD0E4D /* AIAccountSelectionTopBar.xib */ = {
-			isa = PBXVariantGroup;
-			children = (
-				767870E61634139600BD0E4D /* en */,
-			);
-			name = AIAccountSelectionTopBar.xib;
-			path = Resources;
-			sourceTree = "<group>";
-		};
 /* End PBXVariantGroup section */
 
 /* Begin XCBuildConfiguration section */
diff -r d60e3fe6adc1 -r 927c13685c9e Plugins/Dual Window Interface/AIAccountSelectionTopBar.xib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Plugins/Dual Window Interface/AIAccountSelectionTopBar.xib	Mon Oct 22 15:37:49 2012 +0200
@@ -0,0 +1,614 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
+	<data>
+		<int key="IBDocument.SystemTarget">1060</int>
+		<string key="IBDocument.SystemVersion">11G56</string>
+		<string key="IBDocument.InterfaceBuilderVersion">2843</string>
+		<string key="IBDocument.AppKitVersion">1138.51</string>
+		<string key="IBDocument.HIToolboxVersion">569.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+			<string key="NS.object.0">2843</string>
+		</object>
+		<array key="IBDocument.IntegratedClassDependencies">
+			<string>NSCustomObject</string>
+			<string>NSCustomView</string>
+			<string>NSMenu</string>
+			<string>NSMenuItem</string>
+			<string>NSPopUpButton</string>
+			<string>NSPopUpButtonCell</string>
+			<string>NSTextField</string>
+			<string>NSTextFieldCell</string>
+		</array>
+		<array key="IBDocument.PluginDependencies">
+			<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+		</array>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+			<integer value="1" key="NS.object.0"/>
+		</object>
+		<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<object class="NSCustomObject" id="1001">
+				<string key="NSClassName">AIAccountSelectionViewController</string>
+			</object>
+			<object class="NSCustomObject" id="1003">
+				<string key="NSClassName">FirstResponder</string>
+			</object>
+			<object class="NSCustomObject" id="1004">
+				<string key="NSClassName">NSApplication</string>
+			</object>
+			<object class="NSCustomView" id="323709103">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">266</int>
+				<array class="NSMutableArray" key="NSSubviews">
+					<object class="NSCustomView" id="1005">
+						<reference key="NSNextResponder" ref="323709103"/>
+						<int key="NSvFlags">290</int>
+						<array class="NSMutableArray" key="NSSubviews">
+							<object class="NSPopUpButton" id="762366467">
+								<reference key="NSNextResponder" ref="1005"/>
+								<int key="NSvFlags">270</int>
+								<string key="NSFrame">{{80, 1}, {212, 26}}</string>
+								<reference key="NSSuperview" ref="1005"/>
+								<reference key="NSWindow"/>
+								<reference key="NSNextKeyView"/>
+								<string key="NSReuseIdentifierKey">_NS:9</string>
+								<bool key="NSEnabled">YES</bool>
+								<object class="NSPopUpButtonCell" key="NSCell" id="30296573">
+									<int key="NSCellFlags">-2076049856</int>
+									<int key="NSCellFlags2">2048</int>
+									<object class="NSFont" key="NSSupport" id="1016424711">
+										<string key="NSName">LucidaGrande</string>
+										<double key="NSSize">13</double>
+										<int key="NSfFlags">1044</int>
+									</object>
+									<string key="NSCellIdentifier">_NS:9</string>
+									<reference key="NSControlView" ref="762366467"/>
+									<int key="NSButtonFlags">109199360</int>
+									<int key="NSButtonFlags2">129</int>
+									<string key="NSAlternateContents"/>
+									<string key="NSKeyEquivalent"/>
+									<int key="NSPeriodicDelay">400</int>
+									<int key="NSPeriodicInterval">75</int>
+									<object class="NSMenuItem" key="NSMenuItem" id="1006166130">
+										<reference key="NSMenu" ref="25950381"/>
+										<string key="NSTitle">Item 1</string>
+										<string key="NSKeyEquiv"/>
+										<int key="NSKeyEquivModMask">1048576</int>
+										<int key="NSMnemonicLoc">2147483647</int>
+										<int key="NSState">1</int>
+										<object class="NSCustomResource" key="NSOnImage" id="1042744183">
+											<string key="NSClassName">NSImage</string>
+											<string key="NSResourceName">NSMenuCheckmark</string>
+										</object>
+										<object class="NSCustomResource" key="NSMixedImage" id="160190942">
+											<string key="NSClassName">NSImage</string>
+											<string key="NSResourceName">NSMenuMixedState</string>
+										</object>
+										<string key="NSAction">_popUpItemAction:</string>
+										<reference key="NSTarget" ref="30296573"/>
+									</object>
+									<bool key="NSMenuItemRespectAlignment">YES</bool>
+									<object class="NSMenu" key="NSMenu" id="25950381">
+										<string key="NSTitle">OtherViews</string>
+										<array class="NSMutableArray" key="NSMenuItems">
+											<reference ref="1006166130"/>
+											<object class="NSMenuItem" id="688869366">
+												<reference key="NSMenu" ref="25950381"/>
+												<string key="NSTitle">Item 2</string>
+												<string key="NSKeyEquiv"/>
+												<int key="NSKeyEquivModMask">1048576</int>
+												<int key="NSMnemonicLoc">2147483647</int>
+												<reference key="NSOnImage" ref="1042744183"/>
+												<reference key="NSMixedImage" ref="160190942"/>
+												<string key="NSAction">_popUpItemAction:</string>
+												<reference key="NSTarget" ref="30296573"/>
+											</object>
+											<object class="NSMenuItem" id="909076688">
+												<reference key="NSMenu" ref="25950381"/>
+												<string key="NSTitle">Item 3</string>
+												<string key="NSKeyEquiv"/>
+												<int key="NSKeyEquivModMask">1048576</int>
+												<int key="NSMnemonicLoc">2147483647</int>
+												<reference key="NSOnImage" ref="1042744183"/>
+												<reference key="NSMixedImage" ref="160190942"/>
+												<string key="NSAction">_popUpItemAction:</string>
+												<reference key="NSTarget" ref="30296573"/>
+											</object>
+										</array>
+										<reference key="NSMenuFont" ref="1016424711"/>
+									</object>
+									<int key="NSPreferredEdge">1</int>
+									<bool key="NSUsesItemFromMenu">YES</bool>
+									<bool key="NSAltersState">YES</bool>
+									<int key="NSArrowPosition">2</int>
+								</object>
+							</object>
+							<object class="NSPopUpButton" id="70819358">
+								<reference key="NSNextResponder" ref="1005"/>
+								<int key="NSvFlags">270</int>
+								<string key="NSFrame">{{80, 31}, {212, 26}}</string>
+								<reference key="NSSuperview" ref="1005"/>
+								<reference key="NSWindow"/>
+								<reference key="NSNextKeyView"/>
+								<string key="NSReuseIdentifierKey">_NS:9</string>
+								<bool key="NSEnabled">YES</bool>
+								<object class="NSPopUpButtonCell" key="NSCell" id="1043413463">
+									<int key="NSCellFlags">-2076049856</int>
+									<int key="NSCellFlags2">2048</int>
+									<reference key="NSSupport" ref="1016424711"/>
+									<string key="NSCellIdentifier">_NS:9</string>
+									<reference key="NSControlView" ref="70819358"/>
+									<int key="NSButtonFlags">109199360</int>
+									<int key="NSButtonFlags2">129</int>
+									<string key="NSAlternateContents"/>
+									<string key="NSKeyEquivalent"/>
+									<int key="NSPeriodicDelay">400</int>
+									<int key="NSPeriodicInterval">75</int>
+									<object class="NSMenuItem" key="NSMenuItem" id="472909834">
+										<reference key="NSMenu" ref="566097511"/>
+										<string key="NSTitle">Item 1</string>
+										<string key="NSKeyEquiv"/>
+										<int key="NSKeyEquivModMask">1048576</int>
+										<int key="NSMnemonicLoc">2147483647</int>
+										<int key="NSState">1</int>
+										<reference key="NSOnImage" ref="1042744183"/>
+										<reference key="NSMixedImage" ref="160190942"/>
+										<string key="NSAction">_popUpItemAction:</string>
+										<reference key="NSTarget" ref="1043413463"/>
+									</object>
+									<bool key="NSMenuItemRespectAlignment">YES</bool>
+									<object class="NSMenu" key="NSMenu" id="566097511">
+										<string key="NSTitle">OtherViews</string>
+										<array class="NSMutableArray" key="NSMenuItems">
+											<reference ref="472909834"/>
+											<object class="NSMenuItem" id="733795042">
+												<reference key="NSMenu" ref="566097511"/>
+												<string key="NSTitle">Item 2</string>
+												<string key="NSKeyEquiv"/>
+												<int key="NSKeyEquivModMask">1048576</int>
+												<int key="NSMnemonicLoc">2147483647</int>
+												<reference key="NSOnImage" ref="1042744183"/>
+												<reference key="NSMixedImage" ref="160190942"/>
+												<string key="NSAction">_popUpItemAction:</string>
+												<reference key="NSTarget" ref="1043413463"/>
+											</object>
+											<object class="NSMenuItem" id="810556666">
+												<reference key="NSMenu" ref="566097511"/>
+												<string key="NSTitle">Item 3</string>
+												<string key="NSKeyEquiv"/>
+												<int key="NSKeyEquivModMask">1048576</int>
+												<int key="NSMnemonicLoc">2147483647</int>
+												<reference key="NSOnImage" ref="1042744183"/>
+												<reference key="NSMixedImage" ref="160190942"/>
+												<string key="NSAction">_popUpItemAction:</string>
+												<reference key="NSTarget" ref="1043413463"/>
+											</object>
+										</array>
+										<reference key="NSMenuFont" ref="1016424711"/>
+									</object>
+									<int key="NSPreferredEdge">1</int>
+									<bool key="NSUsesItemFromMenu">YES</bool>
+									<bool key="NSAltersState">YES</bool>
+									<int key="NSArrowPosition">2</int>
+								</object>
+							</object>
+							<object class="NSTextField" id="251755580">
+								<reference key="NSNextResponder" ref="1005"/>
+								<int key="NSvFlags">268</int>
+								<string key="NSFrame">{{37, 7}, {41, 17}}</string>
+								<reference key="NSSuperview" ref="1005"/>
+								<reference key="NSWindow"/>
+								<reference key="NSNextKeyView" ref="762366467"/>
+								<string key="NSReuseIdentifierKey">_NS:1535</string>
+								<bool key="NSEnabled">YES</bool>
+								<object class="NSTextFieldCell" key="NSCell" id="1022222763">
+									<int key="NSCellFlags">68157504</int>
+									<int key="NSCellFlags2">71304192</int>
+									<string key="NSContents">From:</string>
+									<reference key="NSSupport" ref="1016424711"/>
+									<string key="NSCellIdentifier">_NS:1535</string>
+									<reference key="NSControlView" ref="251755580"/>
+									<object class="NSColor" key="NSBackgroundColor" id="532573324">
+										<int key="NSColorSpace">6</int>
+										<string key="NSCatalogName">System</string>
+										<string key="NSColorName">controlColor</string>
+										<object class="NSColor" key="NSColor">
+											<int key="NSColorSpace">3</int>
+											<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+										</object>
+									</object>
+									<object class="NSColor" key="NSTextColor" id="458895015">
+										<int key="NSColorSpace">6</int>
+										<string key="NSCatalogName">System</string>
+										<string key="NSColorName">controlTextColor</string>
+										<object class="NSColor" key="NSColor">
+											<int key="NSColorSpace">3</int>
+											<bytes key="NSWhite">MAA</bytes>
+										</object>
+									</object>
+								</object>
+							</object>
+							<object class="NSTextField" id="476591228">
+								<reference key="NSNextResponder" ref="1005"/>
+								<int key="NSvFlags">268</int>
+								<string key="NSFrame">{{53, 37}, {25, 17}}</string>
+								<reference key="NSSuperview" ref="1005"/>
+								<reference key="NSWindow"/>
+								<reference key="NSNextKeyView" ref="70819358"/>
+								<string key="NSReuseIdentifierKey">_NS:1535</string>
+								<bool key="NSEnabled">YES</bool>
+								<object class="NSTextFieldCell" key="NSCell" id="898766195">
+									<int key="NSCellFlags">68157504</int>
+									<int key="NSCellFlags2">71304192</int>
+									<string key="NSContents">To:</string>
+									<reference key="NSSupport" ref="1016424711"/>
+									<string key="NSCellIdentifier">_NS:1535</string>
+									<reference key="NSControlView" ref="476591228"/>
+									<reference key="NSBackgroundColor" ref="532573324"/>
+									<reference key="NSTextColor" ref="458895015"/>
+								</object>
+							</object>
+						</array>
+						<string key="NSFrameSize">{480, 60}</string>
+						<reference key="NSSuperview" ref="323709103"/>
+						<reference key="NSWindow"/>
+						<reference key="NSNextKeyView" ref="476591228"/>
+						<string key="NSClassName">AIAccountSelectionView</string>
+					</object>
+				</array>
+				<string key="NSFrameSize">{480, 60}</string>
+				<reference key="NSSuperview"/>
+				<reference key="NSWindow"/>
+				<reference key="NSNextKeyView" ref="1005"/>
+				<string key="NSReuseIdentifierKey">_NS:9</string>
+				<string key="NSClassName">NSView</string>
+			</object>
+		</array>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<array class="NSMutableArray" key="connectionRecords">
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="1005"/>
+					</object>
+					<int key="connectionID">2</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">label_contacts</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="476591228"/>
+					</object>
+					<int key="connectionID">30</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">label_accounts</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="251755580"/>
+					</object>
+					<int key="connectionID">31</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">popUp_contacts</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="70819358"/>
+					</object>
+					<int key="connectionID">25</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">popUp_accounts</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="762366467"/>
+					</object>
+					<int key="connectionID">27</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">view_backgroundView</string>
+						<reference key="source" ref="1001"/>
+						<reference key="destination" ref="1005"/>
+					</object>
+					<int key="connectionID">35</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">view_anchorToRightSide</string>
+						<reference key="source" ref="251755580"/>
+						<reference key="destination" ref="762366467"/>
+					</object>
+					<int key="connectionID">23</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBOutletConnection" key="connection">
+						<string key="label">view_anchorToRightSide</string>
+						<reference key="source" ref="476591228"/>
+						<reference key="destination" ref="70819358"/>
+					</object>
+					<int key="connectionID">22</int>
+				</object>
+			</array>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<array key="orderedObjects">
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<array key="object" id="0"/>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="1001"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="1003"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">First Responder</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-3</int>
+						<reference key="object" ref="1004"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">Application</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">5</int>
+						<reference key="object" ref="323709103"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="1005"/>
+						</array>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">1</int>
+						<reference key="object" ref="1005"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="762366467"/>
+							<reference ref="251755580"/>
+							<reference ref="70819358"/>
+							<reference ref="476591228"/>
+						</array>
+						<reference key="parent" ref="323709103"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">20</int>
+						<reference key="object" ref="476591228"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="898766195"/>
+						</array>
+						<reference key="parent" ref="1005"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">21</int>
+						<reference key="object" ref="898766195"/>
+						<reference key="parent" ref="476591228"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">18</int>
+						<reference key="object" ref="251755580"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="1022222763"/>
+						</array>
+						<reference key="parent" ref="1005"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">19</int>
+						<reference key="object" ref="1022222763"/>
+						<reference key="parent" ref="251755580"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">12</int>
+						<reference key="object" ref="70819358"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="1043413463"/>
+						</array>
+						<reference key="parent" ref="1005"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">13</int>
+						<reference key="object" ref="1043413463"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="566097511"/>
+						</array>
+						<reference key="parent" ref="70819358"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">14</int>
+						<reference key="object" ref="566097511"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="810556666"/>
+							<reference ref="733795042"/>
+							<reference ref="472909834"/>
+						</array>
+						<reference key="parent" ref="1043413463"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">15</int>
+						<reference key="object" ref="810556666"/>
+						<reference key="parent" ref="566097511"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">16</int>
+						<reference key="object" ref="733795042"/>
+						<reference key="parent" ref="566097511"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">17</int>
+						<reference key="object" ref="472909834"/>
+						<reference key="parent" ref="566097511"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">6</int>
+						<reference key="object" ref="762366467"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="30296573"/>
+						</array>
+						<reference key="parent" ref="1005"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">7</int>
+						<reference key="object" ref="30296573"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="25950381"/>
+						</array>
+						<reference key="parent" ref="762366467"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">8</int>
+						<reference key="object" ref="25950381"/>
+						<array class="NSMutableArray" key="children">
+							<reference ref="1006166130"/>
+							<reference ref="688869366"/>
+							<reference ref="909076688"/>
+						</array>
+						<reference key="parent" ref="30296573"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">9</int>
+						<reference key="object" ref="1006166130"/>
+						<reference key="parent" ref="25950381"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">10</int>
+						<reference key="object" ref="688869366"/>
+						<reference key="parent" ref="25950381"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">11</int>
+						<reference key="object" ref="909076688"/>
+						<reference key="parent" ref="25950381"/>
+					</object>
+				</array>
+			</object>
+			<dictionary class="NSMutableDictionary" key="flattenedProperties">
+				<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="12.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="13.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="14.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="15.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="16.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="17.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="18.CustomClassName">AILocalizationTextField</string>
+				<string key="18.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="20.CustomClassName">AILocalizationTextField</string>
+				<string key="20.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="21.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+				<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+			</dictionary>
+			<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+			<nil key="activeLocalization"/>
+			<dictionary class="NSMutableDictionary" key="localizations"/>
+			<nil key="sourceID"/>
+			<int key="maxID">35</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<object class="IBPartialClassDescription">
+					<string key="className">AIAccountSelectionView</string>
+					<string key="superclassName">NSView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/AIAccountSelectionView.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">AIAccountSelectionViewController</string>
+					<string key="superclassName">AIMessageViewTopBarController</string>
+					<dictionary class="NSMutableDictionary" key="outlets">
+						<string key="label_accounts">NSTextField</string>
+						<string key="label_contacts">NSTextField</string>
+						<string key="popUp_accounts">NSPopUpButton</string>
+						<string key="popUp_contacts">NSPopUpButton</string>
+						<string key="view_backgroundView">AIAccountSelectionView</string>
+					</dictionary>
+					<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<object class="IBToOneOutletInfo" key="label_accounts">
+							<string key="name">label_accounts</string>
+							<string key="candidateClassName">NSTextField</string>
+						</object>
+						<object class="IBToOneOutletInfo" key="label_contacts">
+							<string key="name">label_contacts</string>
+							<string key="candidateClassName">NSTextField</string>
+						</object>
+						<object class="IBToOneOutletInfo" key="popUp_accounts">
+							<string key="name">popUp_accounts</string>
+							<string key="candidateClassName">NSPopUpButton</string>
+						</object>
+						<object class="IBToOneOutletInfo" key="popUp_contacts">
+							<string key="name">popUp_contacts</string>
+							<string key="candidateClassName">NSPopUpButton</string>
+						</object>
+						<object class="IBToOneOutletInfo" key="view_backgroundView">
+							<string key="name">view_backgroundView</string>
+							<string key="candidateClassName">AIAccountSelectionView</string>
+						</object>
+					</dictionary>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/AIAccountSelectionViewController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">AILocalizationTextField</string>
+					<string key="superclassName">NSTextField</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/AILocalizationTextField.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">AIMessageViewTopBarController</string>
+					<string key="superclassName">NSViewController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<string key="NS.key.0">close:</string>
+						<string key="NS.object.0">id</string>
+					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<string key="NS.key.0">close:</string>
+						<object class="IBActionInfo" key="NS.object.0">
+							<string key="name">close:</string>
+							<string key="candidateClassName">id</string>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">./Classes/AIMessageViewTopBarController.h</string>
+					</object>
+				</object>
+			</array>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
+			<real value="1060" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
+			<real value="3200" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+			<string key="NSMenuCheckmark">{11, 11}</string>
+			<string key="NSMenuMixedState">{10, 3}</string>
+		</dictionary>
+	</data>
+</archive>
diff -r d60e3fe6adc1 -r 927c13685c9e Plugins/Dual Window Interface/AIAccountSelectionViewController.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Plugins/Dual Window Interface/AIAccountSelectionViewController.h	Mon Oct 22 15:37:49 2012 +0200
@@ -0,0 +1,43 @@
+/*
+ * Adium is the legal property of its developers, whose names are listed in the copyright file included
+ * with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License as published by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+ * Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#import "AIMessageViewTopBarController.h"
+#import "AIAccountSelectionView.h"
+
+#import <Adium/AIAccountMenu.h>
+#import <Adium/AIContactMenu.h>
+
+#import <Adium/AIChat.h>
+
+ at interface AIAccountSelectionViewController : AIMessageViewTopBarController <AIAccountMenuDelegate, AIContactMenuDelegate> {
+    IBOutlet AIAccountSelectionView *view_backgroundView;
+    IBOutlet NSPopUpButton		*popUp_accounts;
+	IBOutlet NSTextField		*label_accounts;
+    
+	IBOutlet NSPopUpButton   	*popUp_contacts;
+	IBOutlet NSTextField		*label_contacts;
+	
+	AIAccountMenu		*accountMenu;
+	AIContactMenu		*contactMenu;
+	AIChat				*chat;
+    
+    BOOL                choicesForContact;
+    BOOL                choicesForAccount;
+}
+
+- (void)setChat:(AIChat *)chat;
+
+ at end
diff -r d60e3fe6adc1 -r 927c13685c9e Plugins/Dual Window Interface/AIAccountSelectionViewController.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Plugins/Dual Window Interface/AIAccountSelectionViewController.m	Mon Oct 22 15:37:49 2012 +0200
@@ -0,0 +1,330 @@
+/*
+ * Adium is the legal property of its developers, whose names are listed in the copyright file included
+ * with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License as published by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
+ * Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with this program; if not,
+ * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#import <Adium/AIAccountControllerProtocol.h>
+#import "AIAccountSelectionView.h"
+#import <Adium/AIContactControllerProtocol.h>
+#import <Adium/AIContentControllerProtocol.h>
+#import <Adium/AIChatControllerProtocol.h>
+#import <AIUtilities/AIPopUpButtonAdditions.h>
+#import <Adium/AIAccount.h>
+#import <Adium/AIContentMessage.h>
+#import <Adium/AIListContact.h>
+#import <Adium/AIMetaContact.h>
+#import <Adium/AIService.h>
+#import <Adium/AIChat.h>
+#import "AIAccountSelectionViewController.h"
+#import "AIMessageViewController.h"
+
+ at interface AIAccountSelectionViewController ()
+- (void)chatStatusChanged:(NSNotification *)notification;
+ at end
+
+ at implementation AIAccountSelectionViewController
+
+- (id)init
+{
+    self = [super initWithNibName:@"AIAccountSelectionTopBar" bundle:[NSBundle bundleForClass:[AIAccountSelectionViewController class]]];
+    if (self) {
+        [self loadView];
+    }
+    
+    return self;
+}
+
+- (void)dealloc
+{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+    [accountMenu release];
+    [contactMenu release];
+    [chat release];
+    
+    [super dealloc];
+}
+
+- (void)setChat:(AIChat *)inChat
+{
+    if(chat != inChat){
+		if(chat) {
+			//Stop observing the existing chat
+			[[NSNotificationCenter defaultCenter] removeObserver:self name:Chat_SourceChanged object:chat];
+			[[NSNotificationCenter defaultCenter] removeObserver:self name:Chat_DestinationChanged object:chat];
+			[[NSNotificationCenter defaultCenter] removeObserver:self name:Interface_DidSendEnteredMessage object:chat];
+			[[NSNotificationCenter defaultCenter] removeObserver:self name:Chat_StatusChanged object:chat];
+			
+			//Release it
+			[chat release]; chat = nil;
+		}
+        
+		if(inChat){
+			//Retain the new chat
+			chat = [inChat retain];
+			
+			//Observe changes to this chat's source and destination
+			[[NSNotificationCenter defaultCenter] addObserver:self
+                                                     selector:@selector(chatSourceChanged:)
+                                                         name:Chat_SourceChanged
+                                                       object:chat];
+			[[NSNotificationCenter defaultCenter] addObserver:self
+                                                     selector:@selector(chatDestinationChanged:)
+                                                         name:Chat_DestinationChanged
+                                                       object:chat];
+            
+            [[NSNotificationCenter defaultCenter] addObserver:self
+                                                     selector:@selector(didSendMessage:)
+                                                         name:Interface_DidSendEnteredMessage
+                                                       object:chat];
+            [[NSNotificationCenter defaultCenter] addObserver:self
+                                                     selector:@selector(chatStatusChanged:)
+                                                         name:Chat_StatusChanged
+                                                       object:chat];
+			
+			//Update source and destination menus
+			[self configureForCurrentChat];
+		}			
+	} else {
+		[self configureForCurrentChat];
+	}
+}
+
+/*!
+ * @brief Invoked when the status of our chat changes
+ *
+ * The only chat status change we're interested in is one to the disallow account switching flag.  When this flag
+ * changes we update the visibility of our account status menus accordingly.
+ */
+- (void)chatStatusChanged:(NSNotification *)notification
+{
+    NSArray	*modifiedKeys = [[notification userInfo] objectForKey:@"Keys"];
+	
+    if (notification == nil || [modifiedKeys containsObject:@"DisallowAccountSwitching"]) {
+		[self configureForCurrentChat];
+    }
+}
+
+- (void)didSendMessage:(id)sender
+{
+    [owner hideTopBarController:self];
+}
+
+- (void)_reframe
+{
+    if (!choicesForAccount && !choicesForContact) {
+        [owner hideTopBarController:self];
+        return;
+    }
+    
+    [owner unhideTopBarController:self];
+    
+    [self.view setFrameSize:NSMakeSize(NSWidth(self.view.superview.frame), 30 * ((choicesForAccount ? 1 : 0) + (choicesForContact ? 1 : 0)))];
+    [view_backgroundView setBoundsOrigin:NSMakePoint(0.0f, choicesForContact ? 0.0f : -30.0f)];
+    
+    [owner didResizeTopbarController:self];
+}
+
+/*!
+ * @brief Build and configure all menus for the current chat
+ */
+- (void)configureForCurrentChat
+{
+	AILogWithSignature(@"");
+    
+    // Rebuild 'To' contact menu
+    choicesForContact = [self choicesAvailableForContact];
+    if (choicesForContact) {
+		[self _createContactMenu];
+	}
+    
+    [self _reframe];
+    
+	//Update our 'From' account menu
+	[self chatDestinationChanged:nil];
+}
+
+
+/*!
+ * @brief Update our menus when the destination contact changes
+ */
+- (void)chatDestinationChanged:(NSNotification *)notification
+{
+	AILogWithSignature(@"popUp_contacts selecting %@ (%@)", chat.listObject, [notification object]);
+    
+	//Update selection in contact menu
+	[popUp_contacts selectItemWithRepresentedObjectUsingCompare:chat.listObject];
+    
+	//Rebuild 'From' account menu
+	choicesForAccount = [self choicesAvailableForAccount];
+    if (choicesForAccount) {
+		[self configureAccountMenu];
+	}
+    
+    [self _reframe];
+
+	//Update selection in account menu
+	[self chatSourceChanged:nil];
+}
+
+/*!
+ * @brief Update our menus when the source account changes
+ */
+- (void)chatSourceChanged:(NSNotification *)notification
+{
+	//Update selection in account menu
+	AILogWithSignature(@"popUp_accounts selecting %@ (%@)", chat.account,  [notification object]);
+	[popUp_accounts selectItemWithRepresentedObject:chat.account];
+}
+
+//Account Menu ---------------------------------------------------------------------------------------------------------
+#pragma mark Account Menu
+/*!
+ * @brief Returns YES if a choice of source account is available
+ */
+- (BOOL)choicesAvailableForAccount
+{
+	NSInteger		choices = 0;
+    
+	for (AIAccount *account in adium.accountController.accounts) {
+		if ([self _accountIsAvailable:account]) {
+			if (++choices > 1) return YES;
+		}
+	}
+	
+	return NO;
+}
+
+- (void)rebuildAccountMenuFromMenuItems:(NSArray *)menuItems
+{
+	NSMenuItem	 *menuItem;
+	NSMutableArray *menuItemsForAccountsWhichKnow = [NSMutableArray array];
+	NSMutableArray *menuItemsForAccountsWhichDoNotKnow = [NSMutableArray array];
+	
+	for (menuItem in menuItems) {
+		AIAccount *account = [menuItem representedObject];
+		AIListContact *listContact = [adium.contactController existingContactWithService:chat.listObject.service
+																				 account:account
+																					 UID:chat.listObject.UID];
+        
+		if (!listContact || listContact.isStranger)
+			[menuItemsForAccountsWhichDoNotKnow addObject:menuItem];
+		else
+			[menuItemsForAccountsWhichKnow addObject:menuItem];
+	}
+	
+	NSMenu *menu = [[NSMenu alloc] init];
+    
+	//First, add items for accounts which have the current contact on their contact lists
+	for (menuItem in menuItemsForAccountsWhichKnow) {
+		[menu addItem:menuItem];
+	}
+	
+	//If we added any items and will be adding more, put in a separator
+	if ([menu numberOfItems] && [menuItemsForAccountsWhichDoNotKnow count]) [menu addItem:[NSMenuItem separatorItem]];
+    




More information about the commits mailing list