--- a/Adium.xcodeproj/project.pbxproj Tue May 28 00:24:27 2013 +0200
+++ b/Adium.xcodeproj/project.pbxproj Tue May 28 00:52:55 2013 +0200
@@ -843,7 +843,6 @@
34DC8ADC0A7EEEF7003E1636 /* AIContextMenuTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E1E8176063A3EEC00EB00F7 /* AIContextMenuTextView.h */; settings = {ATTRIBUTES = (Public, ); }; };
34DC8ADD0A7EEEF7003E1636 /* AIContextMenuTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E1E8177063A3EEC00EB00F7 /* AIContextMenuTextView.m */; };
34DC8AE00A7EEEF7003E1636 /* AIMessageEntryTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B5827E80613CE9D0004BD25 /* AIMessageEntryTextView.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 34DC8AE10A7EEEF7003E1636 /* AIMessageEntryTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5827E90613CE9D0004BD25 /* AIMessageEntryTextView.m */; };
34DC8AE40A7EEEF7003E1636 /* stackImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 349DDD5206406A7D00542726 /* stackImage.png */; };
34DC8AE50A7EEEF7003E1636 /* AILocalizationAssistance.h in Headers */ = {isa = PBXBuildFile; fileRef = 34D189B1076131850075A380 /* AILocalizationAssistance.h */; settings = {ATTRIBUTES = (Public, ); }; };
34DC8AE70A7EEEF7003E1636 /* AILocalizationButtonCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 078C5CD0079EFF87004C75A4 /* AILocalizationButtonCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1019,6 +1018,7 @@
4F1CB6400D640DA40073A1E6 /* get-info-advanced.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 4F1CB63C0D640DA40073A1E6 /* get-info-advanced.tiff */; };
4F1CB6410D640DA40073A1E6 /* get-info-events.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 4F1CB63D0D640DA40073A1E6 /* get-info-events.tiff */; };
4F1CB64C0D640F4F0073A1E6 /* ContactInfoInspector.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F1CB64B0D640F4F0073A1E6 /* ContactInfoInspector.xib */; };
+ 5A0BBC4317400544002A7BE0 /* emoticons_menu@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5A0BBC4217400544002A7BE0 /* emoticons_menu@2x.png */; }; 5A0D236A16F4C7BC005DF211 /* STTwitterAppOnly.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A0D236816F4C7BC005DF211 /* STTwitterAppOnly.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
5A1781860EC1215D00BA1E04 /* AIAutoScrollTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A1781850EC1215D00BA1E04 /* AIAutoScrollTextView.m */; };
5A17D65D130F76B4002C852F /* AIGradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A17D65C130F76B4002C852F /* AIGradientView.m */; };
@@ -1357,6 +1357,9 @@
76731DE515F90582007728C3 /* libgpgerror.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 76731DE115F90538007728C3 /* libgpgerror.framework */; };
767870E41634045D00BD0E4D /* AIMessageViewTopBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 767870E31634045C00BD0E4D /* AIMessageViewTopBarController.m */; };
76889DEB12D3CA17007AEF00 /* get-info.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 76889DEA12D3CA17007AEF00 /* get-info.tiff */; };
+ 76980AC1173E6C8800FBDA15 /* libidn.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76980AC0173E6C8800FBDA15 /* libidn.framework */; }; + 76980AC5173E6CA700FBDA15 /* libidn.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 76980AC0173E6C8800FBDA15 /* libidn.framework */; }; + 769D634B17393CBE008B97BC /* AMPurpleJabberDiscoveryBrowser.xib in Resources */ = {isa = PBXBuildFile; fileRef = 769D634A17393CBE008B97BC /* AMPurpleJabberDiscoveryBrowser.xib */; }; 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 */; };
@@ -1365,6 +1368,7 @@
76B8B8EC16AF3A46009126FE /* AIOTRTopBarLoggingWarningController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76B8B8EA16AF3A46009126FE /* AIOTRTopBarLoggingWarningController.m */; };
76B8B8ED16AF3A46009126FE /* AIOTRTopBarLoggingWarningController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76B8B8EB16AF3A46009126FE /* AIOTRTopBarLoggingWarningController.xib */; };
76C1AF9C125A906A00D269A9 /* AIAdiumURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 76C1AF9B125A906A00D269A9 /* AIAdiumURLProtocol.m */; };
+ 76FBDAC91733B9CA00C9F10B /* STTwitterHTML.m in Sources */ = {isa = PBXBuildFile; fileRef = 76FBDAC61733B9C900C9F10B /* STTwitterHTML.m */; }; 76FF925A14B524B40043E23B /* AIIRCConsoleController.h in Headers */ = {isa = PBXBuildFile; fileRef = 76FF925814B524B40043E23B /* AIIRCConsoleController.h */; };
76FF925B14B524B40043E23B /* AIIRCConsoleController.m in Sources */ = {isa = PBXBuildFile; fileRef = 76FF925914B524B40043E23B /* AIIRCConsoleController.m */; };
76FF926414B62A980043E23B /* AIConsole.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76FF926314B62A980043E23B /* AIConsole.xib */; };
@@ -1414,6 +1418,11 @@
9719C92F1530EE4800217FBE /* FriBidi.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 9719C92B1530EDF700217FBE /* FriBidi.framework */; };
9719C9301530EE4800217FBE /* ShortcutRecorder.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 9719C92D1530EE0C00217FBE /* ShortcutRecorder.framework */; };
9722ABC813257D7F00CAB486 /* ContactListWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9722ABC713257D7F00CAB486 /* ContactListWindow.xib */; };
+ 972AB3A11493CF2300381105 /* emoticons_menu.png in Resources */ = {isa = PBXBuildFile; fileRef = 974C7524148570E2000686BA /* emoticons_menu.png */; }; + 972AB3A21493D1BA00381105 /* MessageViewEmoticonsMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 974C752C148578F6000686BA /* MessageViewEmoticonsMenu.xib */; }; + 97483A011486DD87002D1FA8 /* AIMessageEntryTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5827E90613CE9D0004BD25 /* AIMessageEntryTextView.m */; }; + 97483A051486E92C002D1FA8 /* AIMessageViewEmoticonsController.h in Headers */ = {isa = PBXBuildFile; fileRef = 974C753314857BF4000686BA /* AIMessageViewEmoticonsController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 97483A061486E93E002D1FA8 /* AIMessageViewEmoticonsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 974C753414857BF4000686BA /* AIMessageViewEmoticonsController.m */; }; 9760D24613E49A560031FA1A /* AboutDialog_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 9760D24513E49A560031FA1A /* AboutDialog_bg.png */; };
97AF5CDB13191DE200550C41 /* AIContactListUserPictureMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97AF5CDA13191DE200550C41 /* AIContactListUserPictureMenuController.m */; };
97AF5CF413191E9A00550C41 /* ContactListChangeUserPictureMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 97AF5CF313191E9A00550C41 /* ContactListChangeUserPictureMenu.xib */; };
@@ -1678,6 +1687,7 @@
11EE1CCF0CDD01120097F246 /* libglib.framework in Copy Frameworks */,
11EE1CD00CDD01120097F246 /* libgmodule.framework in Copy Frameworks */,
11EE1CD10CDD01120097F246 /* libgobject.framework in Copy Frameworks */,
+ 76980AC5173E6CA700FBDA15 /* libidn.framework in Copy Frameworks */, 11EE1CD20CDD01120097F246 /* libgthread.framework in Copy Frameworks */,
7664EAA6162E0874008CF995 /* libffi.framework in Copy Frameworks */,
11EE1CD30CDD01120097F246 /* libintl.framework in Copy Frameworks */,
@@ -3867,6 +3877,7 @@
4F1CB63C0D640DA40073A1E6 /* get-info-advanced.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "get-info-advanced.tiff"; path = "Resources/get-info-advanced.tiff"; sourceTree = "<group>"; };
4F1CB63D0D640DA40073A1E6 /* get-info-events.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "get-info-events.tiff"; path = "Resources/get-info-events.tiff"; sourceTree = "<group>"; };
4F1CB64B0D640F4F0073A1E6 /* ContactInfoInspector.xib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xib; name = ContactInfoInspector.xib; path = Resources/ContactInfoInspector.xib; sourceTree = "<group>"; };
+ 5A0BBC4217400544002A7BE0 /* emoticons_menu@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "emoticons_menu@2x.png"; path = "Resources/emoticons_menu@2x.png"; sourceTree = "<group>"; }; 5A0D236816F4C7BC005DF211 /* STTwitterAppOnly.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = STTwitterAppOnly.m; path = "Plugins/Twitter Plugin/STTwitter/STTwitterAppOnly.m"; sourceTree = "<group>"; };
5A0D236916F4C7BC005DF211 /* STTwitterAppOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = STTwitterAppOnly.h; path = "Plugins/Twitter Plugin/STTwitter/STTwitterAppOnly.h"; sourceTree = "<group>"; };
5A1781840EC1215D00BA1E04 /* AIAutoScrollTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIAutoScrollTextView.h; path = Source/AIAutoScrollTextView.h; sourceTree = "<group>"; };
@@ -4418,6 +4429,8 @@
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>"; };
76889DEA12D3CA17007AEF00 /* get-info.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "get-info.tiff"; path = "Resources/get-info.tiff"; sourceTree = "<group>"; };
+ 76980AC0173E6C8800FBDA15 /* libidn.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libidn.framework; path = Frameworks/libidn.framework; sourceTree = "<group>"; }; + 769D634A17393CBE008B97BC /* AMPurpleJabberDiscoveryBrowser.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AMPurpleJabberDiscoveryBrowser.xib; path = "Plugins/Purple Service/AMPurpleJabberDiscoveryBrowser.xib"; 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>"; };
@@ -4430,6 +4443,10 @@
76B8B8EB16AF3A46009126FE /* AIOTRTopBarLoggingWarningController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AIOTRTopBarLoggingWarningController.xib; path = Source/AIOTRTopBarLoggingWarningController.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>"; };
+ 76FBDAC51733B9C900C9F10B /* STTwitterHTML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = STTwitterHTML.h; path = "Plugins/Twitter Plugin/STTwitter/STTwitterHTML.h"; sourceTree = "<group>"; }; + 76FBDAC61733B9C900C9F10B /* STTwitterHTML.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = STTwitterHTML.m; path = "Plugins/Twitter Plugin/STTwitter/STTwitterHTML.m"; sourceTree = "<group>"; }; + 76FBDAC71733B9C900C9F10B /* STTwitterOAuthOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = STTwitterOAuthOSX.h; path = "Plugins/Twitter Plugin/STTwitter/STTwitterOAuthOSX.h"; sourceTree = "<group>"; }; + 76FBDAC81733B9C900C9F10B /* STTwitterOAuthOSX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = STTwitterOAuthOSX.m; path = "Plugins/Twitter Plugin/STTwitter/STTwitterOAuthOSX.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>"; };
76FF925914B524B40043E23B /* AIIRCConsoleController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIIRCConsoleController.m; path = "Plugins/Purple Service/AIIRCConsoleController.m"; sourceTree = "<group>"; };
76FF926314B62A980043E23B /* AIConsole.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = AIConsole.xib; path = "Frameworks/Adium Framework/Resources/AIConsole.xib"; sourceTree = "<group>"; };
@@ -4482,6 +4499,10 @@
9719C92B1530EDF700217FBE /* FriBidi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FriBidi.framework; path = Frameworks/FriBidi.framework; sourceTree = "<group>"; };
9719C92D1530EE0C00217FBE /* ShortcutRecorder.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ShortcutRecorder.framework; path = Frameworks/ShortcutRecorder.framework; sourceTree = "<group>"; };
9722ABC713257D7F00CAB486 /* ContactListWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ContactListWindow.xib; path = Resources/ContactListWindow.xib; sourceTree = "<group>"; };
+ 974C7524148570E2000686BA /* emoticons_menu.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = emoticons_menu.png; path = Resources/emoticons_menu.png; sourceTree = "<group>"; }; + 974C752C148578F6000686BA /* MessageViewEmoticonsMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MessageViewEmoticonsMenu.xib; path = Resources/MessageViewEmoticonsMenu.xib; sourceTree = "<group>"; }; + 974C753314857BF4000686BA /* AIMessageViewEmoticonsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIMessageViewEmoticonsController.h; path = Source/AIMessageViewEmoticonsController.h; sourceTree = "<group>"; }; + 974C753414857BF4000686BA /* AIMessageViewEmoticonsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIMessageViewEmoticonsController.m; path = Source/AIMessageViewEmoticonsController.m; sourceTree = "<group>"; }; 9760D24513E49A560031FA1A /* AboutDialog_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = AboutDialog_bg.png; path = Resources/AboutDialog_bg.png; sourceTree = "<group>"; };
979AA6A514D59DC8008730DF /* AIBoolToControlTextColorTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIBoolToControlTextColorTransformer.h; path = "Frameworks/Adium Framework/Source/AIBoolToControlTextColorTransformer.h"; sourceTree = "<group>"; };
979AA6A614D59DC8008730DF /* AIBoolToControlTextColorTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIBoolToControlTextColorTransformer.m; path = "Frameworks/Adium Framework/Source/AIBoolToControlTextColorTransformer.m"; sourceTree = "<group>"; };
@@ -4787,6 +4808,7 @@
811035180CDE783800EC6038 /* SecurityInterface.framework in Frameworks */,
633405990F9C2C00003C77A9 /* AIUtilities.framework in Frameworks */,
3485D8EB09EB446900232CC4 /* Adium.framework in Frameworks */,
+ 76980AC1173E6C8800FBDA15 /* libidn.framework in Frameworks */, runOnlyForDeploymentPostprocessing = 0;
@@ -5006,6 +5028,13 @@
11C157D504A88DE0008E0C76 /* Emoticons */ = {
+ 11C157D804A88E04008E0C76 /* AIEmoticonController.h */, + 11C157D904A88E04008E0C76 /* AIEmoticonController.m */, + 974C753314857BF4000686BA /* AIMessageViewEmoticonsController.h */, + 974C753414857BF4000686BA /* AIMessageViewEmoticonsController.m */, + 974C752C148578F6000686BA /* MessageViewEmoticonsMenu.xib */, + 974C7524148570E2000686BA /* emoticons_menu.png */, + 5A0BBC4217400544002A7BE0 /* emoticons_menu@2x.png */, C4243C920638E4EA007AD2D9 /* BGEmoticonMenuPlugin.h */,
C4243C930638E4EA007AD2D9 /* BGEmoticonMenuPlugin.m */,
@@ -5653,6 +5682,7 @@
346545090C8F69280046ED68 /* Discovery Browsing */ = {
+ 769D634A17393CBE008B97BC /* AMPurpleJabberDiscoveryBrowser.xib */, 81DAED500C26F4F700780E4C /* AMPurpleJabberServiceDiscoveryBrowsing.h */,
81DAED510C26F4F700780E4C /* AMPurpleJabberServiceDiscoveryBrowsing.m */,
3465451A0C8F6A670046ED68 /* AMPurpleJabberServiceDiscoveryBrowserController.h */,
@@ -5842,8 +5872,6 @@
34B82C80085A85D800864531 /* AIChatController.m */,
F55B415C03AB8B5601A8010A /* AIContentController.h */,
F55B415D03AB8B5601A8010A /* AIContentController.m */,
- 11C157D804A88E04008E0C76 /* AIEmoticonController.h */,
- 11C157D904A88E04008E0C76 /* AIEmoticonController.m */,
34CA15520CAFDFB2009AA5E3 /* sidebarActionWidget.png */,
C6EE434115C0AA6F00A4B96C /* sidebarActionWidget@2x.png */,
34A9707D0C96602200F46006 /* sidebarStatusAreaBackground.png */,
@@ -7346,6 +7374,10 @@
5A3B4D7116D878AB00903E40 /* STTwitterOAuth.h */,
5A3B4D7216D878AB00903E40 /* STTwitterOAuth.m */,
5A3B4D7516D878AB00903E40 /* STTwitterOAuthProtocol.h */,
+ 76FBDAC51733B9C900C9F10B /* STTwitterHTML.h */, + 76FBDAC61733B9C900C9F10B /* STTwitterHTML.m */, + 76FBDAC71733B9C900C9F10B /* STTwitterOAuthOSX.h */, + 76FBDAC81733B9C900C9F10B /* STTwitterOAuthOSX.m */, 5A3B4D7616D878AC00903E40 /* Vendor */,
@@ -8284,6 +8316,7 @@
979AA6A914D59EF3008730DF /* Others */ = {
+ 76980AC0173E6C8800FBDA15 /* libidn.framework */, 7664EAA4162E086A008CF995 /* libffi.framework */,
76731DE015F90538007728C3 /* libgcrypt.framework */,
76731DE115F90538007728C3 /* libgpgerror.framework */,
@@ -9177,6 +9210,7 @@
112B47670F82E0FC00690E84 /* AIXtraInfo.h in Headers */,
34F17FCE0F8EAC34009C5A39 /* AIListOutlineView+Drawing.h in Headers */,
63B0EC9D0F8FBB660062476B /* AIProxyListObject.h in Headers */,
+ 97483A051486E92C002D1FA8 /* AIMessageViewEmoticonsController.h in Headers */, 76A79E0B16349477007A0497 /* AIGroupChat.h in Headers */,
5A6298E31682BD9D00F51DED /* AIAdvancedPreferencePane.h in Headers */,
@@ -9634,6 +9668,7 @@
1150A9960FBE48D600E0BD31 /* ESIRCAccountView.xib in Resources */,
34D8153F13B663650022C8C4 /* AIFacebookXMPPOauthWebViewWindow.xib in Resources */,
5A22D6E214834F44004E15F7 /* AIFacebookXMPPAccountView.xib in Resources */,
+ 769D634B17393CBE008B97BC /* AMPurpleJabberDiscoveryBrowser.xib in Resources */, runOnlyForDeploymentPostprocessing = 0;
@@ -9857,6 +9892,8 @@
5A4BD56A13F86B7E00A4D3F7 /* Preferences-Icons.xib in Resources */,
5A4BD57F13F86BC500A4D3F7 /* Preferences-General.xib in Resources */,
7EC033B214590E0700CF24FB /* MessageWindow.xib in Resources */,
+ 972AB3A11493CF2300381105 /* emoticons_menu.png in Resources */, + 972AB3A21493D1BA00381105 /* MessageViewEmoticonsMenu.xib in Resources */, 5A27FA7E14A272330063489D /* pref-messagestyle.png in Resources */,
5A1E3A1214DCE60400724574 /* Preferences-Xtras.xib in Resources */,
5A8F637614DD1B21008412C8 /* Preferences-Privacy.xib in Resources */,
@@ -9929,6 +9966,7 @@
C613B143164112B3006683FF /* events-dock-name.tiff in Resources */,
C613B1451641210B006683FF /* events-contact.tiff in Resources */,
76B8B8ED16AF3A46009126FE /* AIOTRTopBarLoggingWarningController.xib in Resources */,
+ 5A0BBC4317400544002A7BE0 /* emoticons_menu@2x.png in Resources */, runOnlyForDeploymentPostprocessing = 0;
@@ -10585,6 +10623,7 @@
5A3B4D7E16D878AC00903E40 /* STHTTPRequest.m in Sources */,
5A0D236A16F4C7BC005DF211 /* STTwitterAppOnly.m in Sources */,
5A4B77E916FBDDC700DF398C /* NSData+Base64.m in Sources */,
+ 76FBDAC91733B9CA00C9F10B /* STTwitterHTML.m in Sources */, runOnlyForDeploymentPostprocessing = 0;
@@ -10657,7 +10696,6 @@
34DC8AD80A7EEEF7003E1636 /* DCJoinChatWindowController.m in Sources */,
34DC8ADB0A7EEEF7003E1636 /* AIAccountPlusFieldPromptController.m in Sources */,
34DC8ADD0A7EEEF7003E1636 /* AIContextMenuTextView.m in Sources */,
- 34DC8AE10A7EEEF7003E1636 /* AIMessageEntryTextView.m in Sources */,
34DC8AE80A7EEEF7003E1636 /* AILocalizationButtonCell.m in Sources */,
34DC8AEA0A7EEEF7003E1636 /* AILocalizationTextField.m in Sources */,
34DC8AEC0A7EEEF7003E1636 /* AILocalizationButton.m in Sources */,
@@ -10691,6 +10729,8 @@
112B47680F82E0FC00690E84 /* AIXtraInfo.m in Sources */,
34F17FCF0F8EAC34009C5A39 /* AIListOutlineView+Drawing.m in Sources */,
63B0EC9C0F8FBB660062476B /* AIProxyListObject.m in Sources */,
+ 97483A011486DD87002D1FA8 /* AIMessageEntryTextView.m in Sources */, + 97483A061486E93E002D1FA8 /* AIMessageViewEmoticonsController.m in Sources */, 76FF926814B62AB80043E23B /* AIConsoleController.m in Sources */,
5AEE60011602BAE200304672 /* AIBoolToControlTextColorTransformer.m in Sources */,
76A79E0C16349477007A0497 /* AIGroupChat.m in Sources */,
@@ -12388,6 +12428,10 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 63C7E2060FAFAA4700B310AC /* AdiumLibpurple.xcconfig */;
+ FRAMEWORK_SEARCH_PATHS = ( + "\"$(SRCROOT)/Frameworks\"", @@ -12395,6 +12439,10 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 63C7E2060FAFAA4700B310AC /* AdiumLibpurple.xcconfig */;
+ FRAMEWORK_SEARCH_PATHS = ( + "\"$(SRCROOT)/Frameworks\"", @@ -12402,6 +12450,10 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 63C7E2060FAFAA4700B310AC /* AdiumLibpurple.xcconfig */;
+ FRAMEWORK_SEARCH_PATHS = ( + "\"$(SRCROOT)/Frameworks\"", --- a/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Tue May 28 00:24:27 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m Tue May 28 00:52:55 2013 +0200
@@ -27,6 +27,8 @@
#import <Adium/AIInterfaceControllerProtocol.h>
#import <Adium/AIContentContext.h>
+#import <Adium/AIMessageViewEmoticonsController.h> #import <AIUtilities/AIAttributedStringAdditions.h>
#import <AIUtilities/AIColorAdditions.h>
#import <AIUtilities/AITextAttributes.h>
@@ -38,8 +40,9 @@
#import <FriBidi/NSString-FBAdditions.h>
-#define MAX_HISTORY 25 //Number of messages to remember in history
-#define ENTRY_TEXTVIEW_PADDING 6 //Padding for auto-sizing
+#define MAX_HISTORY 25 // Number of messages to remember in history +#define ENTRY_TEXTVIEW_PADDING 6 // Padding for auto-sizing #define KEY_DISABLE_TYPING_NOTIFICATIONS @"Disable Typing Notifications"
@@ -55,7 +58,7 @@
#define KEY_SUBSTITUTION_QUOTE @"Smart Quote Substitutions"
#define KEY_SUBSTITUTION_LINK @"Smart Links Substitutions"
-#define INDICATOR_RIGHT_PADDING 2 // Padding between right side of the message view and the rightmost indicator
+#define INDICATOR_RIGHT_PADDING 2 // Padding between right side of the message view and the rightmost indicator #define PREF_GROUP_CHARACTER_COUNTER @"Character Counter"
#define KEY_CHARACTER_COUNTER_ENABLED @"Character Counter Enabled"
@@ -67,6 +70,8 @@
#define PASS_TO_SUPERCLASS_DRAG_TYPE_ARRAY [NSArray arrayWithObjects: \
NSRTFPboardType, NSStringPboardType, nil]
* @class AISimpleTextView
* @brief Just draws an attributed string. That's it.
@@ -78,6 +83,7 @@
@implementation AISimpleTextView
@@ -86,11 +92,15 @@
- (void)drawRect:(NSRect)rect
- [string drawInRect:self.bounds];
+ [string drawInRect:[self bounds]]; @interface AIMessageEntryTextView ()
- (void)_setPushIndicatorVisible:(BOOL)visible;
- (void)positionPushIndicator;
- (void)_resetCacheAndPostSizeChanged;
@@ -112,12 +122,21 @@
- (void)frameDidChange:(NSNotification *)notification;
- (void)toggleMessageSending:(NSNotification *)not;
- (void)contentObjectAdded:(NSNotification *)notification;
+- (void)updateEmoticonsMenuButton; @interface NSMutableAttributedString (AIMessageEntryTextViewAdditions)
- (void)convertForPasteWithTraitsUsingAttributes:(NSDictionary *)inAttributes;
+#pragma mark - AIMessageEntryTextView @implementation AIMessageEntryTextView
- (void)_initMessageEntryTextView
@@ -131,7 +150,7 @@
enableTypingNotifications = NO;
- historyArray = [[NSMutableArray alloc] initWithObjects:@"",nil];
+ historyArray = [[NSMutableArray alloc] initWithObjects:@"", nil]; pushArray = [[NSMutableArray alloc] init];
currentHistoryLocation = 0;
[self setDrawsBackground:YES];
@@ -140,10 +159,12 @@
characterCounterPrefix = nil;
if ([self respondsToSelector:@selector(setAllowsUndo:)]) {
[self setAllowsUndo:YES];
if ([self respondsToSelector:@selector(setAllowsDocumentBackgroundColorChange:)]) {
[self setAllowsDocumentBackgroundColorChange:YES];
@@ -154,25 +175,28 @@
selector:@selector(textDidChange:)
name:NSTextDidChangeNotification
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(frameDidChange:)
name:NSViewFrameDidChangeNotification
[[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(toggleMessageSending:)
- name:@"AIChatDidChangeCanSendMessagesNotification"
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(contentObjectAdded:)
- name:Content_ContentObjectAdded
+ selector:@selector(toggleMessageSending:) + name:@"AIChatDidChangeCanSendMessagesNotification" + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(contentObjectAdded:) + name:Content_ContentObjectAdded [adium.preferenceController registerPreferenceObserver:self forGroup:PREF_GROUP_DUAL_WINDOW_INTERFACE];
[[AIContactObserverManager sharedManager] registerListObjectObserver:self];
- (id)initWithFrame:(NSRect)frameRect textContainer:(NSTextContainer *)aTextContainer
if ((self = [super initWithFrame:frameRect textContainer:aTextContainer])) {
@@ -209,6 +233,7 @@
[associatedView release];
[historyArray release]; historyArray = nil;
[pushArray release]; pushArray = nil;
+ [emoticonsMenuButton release]; @@ -231,9 +256,8 @@
unichar inChar = [charactersIgnoringModifiers characterAtIndex:0];
NSUInteger flags = [inEvent modifierFlags];
- //We have to test ctrl before option, because otherwise we'd miss ctrl-option-* events
- (flags & NSControlKeyMask) && !(flags & NSShiftKeyMask)) {
+ // We have to test ctrl before option, because otherwise we'd miss ctrl-option-* events + if (pushPopEnabled && (flags & NSControlKeyMask) && !(flags & NSShiftKeyMask)) { if (inChar == NSUpArrowFunctionKey) {
} else if (inChar == NSDownArrowFunctionKey) {
@@ -243,9 +267,7 @@
- } else if (historyEnabled &&
- (flags & NSAlternateKeyMask) && !(flags & NSShiftKeyMask)) {
+ } else if (historyEnabled && (flags & NSAlternateKeyMask) && !(flags & NSShiftKeyMask)) { if (inChar == NSUpArrowFunctionKey) {
} else if (inChar == NSDownArrowFunctionKey) {
@@ -253,13 +275,12 @@
- } else if (associatedView &&
- (flags & NSCommandKeyMask) && !(flags & NSShiftKeyMask)) {
+ } else if (associatedView && (flags & NSCommandKeyMask) && !(flags & NSShiftKeyMask)) { if ((inChar == NSUpArrowFunctionKey || inChar == NSDownArrowFunctionKey) ||
(inChar == NSHomeFunctionKey || inChar == NSEndFunctionKey) ||
(inChar == NSPageUpFunctionKey || inChar == NSPageDownFunctionKey)) {
- //Pass the associatedView a keyDown event equivalent equal to inEvent except without the modifier flags
+ // Pass the associatedView a keyDown event equivalent equal to inEvent except without the modifier flags [associatedView keyDown:[NSEvent keyEventWithType:[inEvent type]
location:[inEvent locationInWindow]
@@ -273,24 +294,21 @@
- } else if (associatedView &&
- (inChar == NSPageUpFunctionKey || inChar == NSPageDownFunctionKey)) {
- [associatedView keyDown:inEvent];
+ } else if (associatedView && (inChar == NSPageUpFunctionKey || inChar == NSPageDownFunctionKey)) { + [associatedView keyDown:inEvent]; } else if (inChar == NSHomeFunctionKey || inChar == NSEndFunctionKey) {
if (flags & NSShiftKeyMask) {
- //With shift, select to the beginning/end of the line
+ // With shift, select to the beginning/end of the line NSRange selectedRange = [self selectedRange];
if (inChar == NSHomeFunctionKey) {
- //Home: from 0 to the current location
+ // Home: from 0 to the current location newRange.length = selectedRange.location;
- //End: from current location to the end
+ // End: from current location to the end newRange.location = selectedRange.location;
newRange.length = [[self string] length] - newRange.location;
@@ -301,16 +319,14 @@
[self setSelectedRange:newRange];
- //If !homeToStartOfLine, pass the keypress to our associated view.
+ // If !homeToStartOfLine, pass the keypress to our associated view. [associatedView keyDown:inEvent];
} else if (inChar == NSTabCharacter) {
if ([self.delegate respondsToSelector:@selector(textViewShouldTabComplete:)] &&
[self.delegate textViewShouldTabComplete:self]) {
@@ -340,21 +356,21 @@
[self.enclosingScrollView scrollWheel:anEvent];
- (void)textDidChange:(NSNotification *)notification
+ // Update typing status if (enableTypingNotifications) {
[adium.contentController userIsTypingContentForChat:chat hasEnteredText:[[self textStorage] length] > 0];
- //Hide any existing contact list tooltip when we begin typing
+ // Hide any existing contact list tooltip when we begin typing [adium.interfaceController showTooltipForListObject:nil atScreenPoint:NSZeroPoint onWindow:nil];
- //Reset cache and resize
+ // Reset cache and resize [self _resetCacheAndPostSizeChanged];
- //Update the character counter
+ // Update the character counter [self updateCharacterCounter];
@@ -400,9 +416,8 @@
+#pragma mark - Configure -//Configure ------------------------------------------------------------------------------------------------------------
@synthesize clearOnEscape, homeToStartOfLine, associatedView;
- (void)preferencesChangedForGroup:(NSString *)group key:(NSString *)key
@@ -412,7 +427,7 @@
[group isEqualToString:GROUP_ACCOUNT_STATUS] &&
(!key || [key isEqualToString:KEY_DISABLE_TYPING_NOTIFICATIONS])) {
enableTypingNotifications = ![[chat.account preferenceForKey:KEY_DISABLE_TYPING_NOTIFICATIONS
- group:GROUP_ACCOUNT_STATUS] boolValue];
+ group:GROUP_ACCOUNT_STATUS] boolValue]; if (!object && [group isEqualToString:PREF_GROUP_DUAL_WINDOW_INTERFACE]) {
@@ -454,15 +469,15 @@
-//Adium Text Entry -----------------------------------------------------------------------------------------------------
-#pragma mark Adium Text Entry
+#pragma mark - Adium Text Entry * @brief Toggle whether message sending is enabled based on a notification. The notification object is the AIChat of the appropriate message entry view
- (void)toggleMessageSending:(NSNotification *)not
- //XXX - We really should query the AIChat about this, but AIChat's "can't send" is really designed for handling offline, not banned. Bringing up the offline messaging dialog when banned would make no sense.
+ // XXX - We really should query the AIChat about this, but AIChat's "can't send" is really designed for handling offline, not banned. + // Bringing up the offline messaging dialog when banned would make no sense. [self setSendingEnabled:[[[not userInfo] objectForKey:@"TypingEnabled"] boolValue]];
@@ -474,16 +489,16 @@
return self.sendingEnabled;
-//Set our string, preserving the selected range
+// Set our string, preserving the selected range - (void)setAttributedString:(NSAttributedString *)inAttributedString
NSUInteger length = [inAttributedString length];
NSRange oldRange = [self selectedRange];
[[self textStorage] setAttributedString:inAttributedString];
- //Restore the old selected range
+ // Restore the old selected range if (oldRange.location < length) {
if (oldRange.location + oldRange.length <= length) {
[self setSelectedRange:oldRange];
@@ -492,20 +507,20 @@
- //Notify everyone that our text changed
+ // Notify everyone that our text changed [[NSNotificationCenter defaultCenter] postNotificationName:NSTextDidChangeNotification object:self];
-//Set our string (plain text)
+// Set our string (plain text) - (void)setString:(NSString *)string
[super setString:string];
- //Notify everyone that our text changed
+ // Notify everyone that our text changed [[NSNotificationCenter defaultCenter] postNotificationName:NSTextDidChangeNotification object:self];
+// Set our typing format - (void)setTypingAttributes:(NSDictionary *)attrs
[super setTypingAttributes:attrs];
@@ -513,14 +528,14 @@
[self setInsertionPointColor:[[attrs objectForKey:NSBackgroundColorAttributeName] contrastingColor]];
- (BOOL)handlePasteAsRichText
NSPasteboard *generalPasteboard = [NSPasteboard generalPasteboard];
- //Types is ordered by the preference for handling of the data; enumerating it lets us allow the sending application's hints to be followed.
+ // Types is ordered by the preference for handling of the data; enumerating it lets us allow the sending application's hints to be followed. for (NSString *type in generalPasteboard.types) {
if ([type isEqualToString:NSRTFDPboardType]) {
NSData *data = [generalPasteboard dataForType:NSRTFDPboardType];
@@ -528,7 +543,7 @@
} else if ([PASS_TO_SUPERCLASS_DRAG_TYPE_ARRAY containsObject:type]) {
- //When we hit a type we should let the superclass handle, break without doing anything
+ // When we hit a type we should let the superclass handle, break without doing anything } else if ([FILES_AND_IMAGES_TYPES containsObject:type]) {
@@ -543,7 +558,7 @@
-//Paste as rich text without altering our typing attributes
+// Paste as rich text without altering our typing attributes - (void)pasteAsRichText:(id)sender
NSDictionary *attributes = [[self typingAttributes] copy];
@@ -586,7 +601,7 @@
- //Failed. Try again with the string type.
+ // Failed. Try again with the string type. if (!data && ![type isEqualToString:NSStringPboardType]) {
if ([[[NSPasteboard generalPasteboard] types] containsObject:NSStringPboardType]) {
type = NSStringPboardType;
@@ -599,7 +614,7 @@
- //We still didn't get valid data... maybe super can handle it
+ // We still didn't get valid data... maybe super can handle it } @catch (NSException *localException) {
@@ -629,7 +644,7 @@
documentAttributes:NULL];
} @catch (NSException *localException) {
- //Error while reading the RTF or HTML data, which can happen. Fall back on plain text
+ // Error while reading the RTF or HTML data, which can happen. Fall back on plain text if ([[[NSPasteboard generalPasteboard] types] containsObject:NSStringPboardType]) {
data = [generalPasteboard dataForType:NSStringPboardType];
NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
@@ -652,20 +667,20 @@
NSRange selectedRange = [self selectedRange];
NSTextStorage *textStorage = [self textStorage];
- //Prepare the undo operation
+ // Prepare the undo operation NSUndoManager *undoManager = [self undoManager];
[[undoManager prepareWithInvocationTarget:textStorage]
replaceCharactersInRange:NSMakeRange(selectedRange.location, [attributedString length])
withAttributedString:[textStorage attributedSubstringFromRange:selectedRange]];
[undoManager setActionName:AILocalizedString(@"Paste", nil)];
[textStorage replaceCharactersInRange:selectedRange
withAttributedString:attributedString];
// Align our text properly (only need to if the first character was changed)
if (selectedRange.location == 0)
[self setBaseWritingDirection:[[textStorage string] baseWritingDirection]];
- //Notify that we changed our text
+ // Notify that we changed our text [[NSNotificationCenter defaultCenter] postNotificationName:NSTextDidChangeNotification
[attributedString release];
@@ -677,7 +692,7 @@
- //If we didn't handle it yet, let super try to deal with it
+ // If we didn't handle it yet, let super try to deal with it @@ -690,22 +705,22 @@
[self scrollRangeToVisible:[self selectedRange]];
- (void)deleteBackward:(id)sender
[super deleteBackward:sender];
- //If we are now an empty string, and we still have a link active, clear the link
+ // If we are now an empty string, and we still have a link active, clear the link if ([[self textStorage] length] == 0) {
[self clearLinkAttribute];
-//Contact menu ---------------------------------------------------------------------------------------------------------
-#pragma mark Contact menu
-//Set and return the selected chat (to auto-configure the contact menu)
+#pragma mark - Contact menu +// Set and return the selected chat (to auto-configure the contact menu) - (void)setChat:(AIChat *)inChat
@@ -730,12 +745,12 @@
- //Observe preferences changes for typing enable/disable
+ // Observe preferences changes for typing enable/disable [adium.preferenceController registerPreferenceObserver:self forGroup:GROUP_ACCOUNT_STATUS];
- //Set up the character counter for this chat's list object.
- //This is done regardless of a chat changing because destination changes need to trigger this.
+ // Set up the character counter for this chat's list object. + // This is done regardless of a chat changing because destination changes need to trigger this. [self setCharacterCounterMaximum:[chat.listObject integerValueForProperty:@"Character Counter Max"]];
[self setCharacterCounterVisible:([chat.listObject valueForProperty:@"Character Counter Max"] != nil)];
@@ -748,7 +763,7 @@
-//Return the selected list object (to auto-configure the contact menu)
+// Return the selected list object (to auto-configure the contact menu) - (AIListContact *)listObject
@@ -759,23 +774,22 @@
return [chat preferredListObject];
-//Auto Sizing ----------------------------------------------------------------------------------------------------------
-#pragma mark Auto-sizing
-//Returns our desired size
+#pragma mark - Auto-sizing +// Returns our desired size if (_desiredSizeCached.width == 0) {
if ([[self textStorage] length] != 0) {
- //If there is text in this view, let the container tell us its height
+ // If there is text in this view, let the container tell us its height - //Force glyph generation. We must do this or usedRectForTextContainer might only return a rect for a
+ // Force glyph generation. We must do this or usedRectForTextContainer might only return a rect for a portion of our text. [[self layoutManager] glyphRangeForTextContainer:[self textContainer]];
textHeight = [[self layoutManager] usedRectForTextContainer:[self textContainer]].size.height;
- //Otherwise, we use the current typing attributes to guess what the height of a line should be
+ // Otherwise, we use the current typing attributes to guess what the height of a line should be textHeight = [NSAttributedString stringHeightForAttributes:[self typingAttributes]];
@@ -792,10 +806,10 @@
return _desiredSizeCached;
-//Reset the desired size cache when our frame changes
- (void)frameDidChange:(NSNotification *)notification
- //resetCacheAndPostSizeChanged can get us right back to here, resulting in an infinite loop if we're not careful
+ // Reset the desired size cache when our frame changes + // resetCacheAndPostSizeChanged can get us right back to here, resulting in an infinite loop if we're not careful [self _resetCacheAndPostSizeChanged];
@@ -816,9 +830,9 @@
-//Paging ---------------------------------------------------------------------------------------------------------------
-//Page up or down in the message view
+// Page up or down in the message view - (void)scrollPageUp:(id)sender
if (associatedView && [associatedView respondsToSelector:@selector(pageUp:)]) {
@@ -827,6 +841,7 @@
[super scrollPageUp:sender];
- (void)scrollPageDown:(id)sender
if (associatedView && [associatedView respondsToSelector:@selector(pageDown:)]) {
@@ -836,61 +851,60 @@
-//History --------------------------------------------------------------------------------------------------------------
@synthesize historyEnabled;
-//Move up through the history
+// Move up through the history if (currentHistoryLocation == 0) {
- //Store current message
+ // Store current message [historyArray replaceObjectAtIndex:0 withObject:[[[self textStorage] copy] autorelease]];
if (currentHistoryLocation < [historyArray count]-1) {
currentHistoryLocation++;
[self setAttributedString:[historyArray objectAtIndex:currentHistoryLocation]];
-//Move down through history
+// Move down through history if (currentHistoryLocation > 0) {
currentHistoryLocation--;
[self setAttributedString:[historyArray objectAtIndex:currentHistoryLocation]];
-//Update history when content is sent
+// Update history when content is sent - (IBAction)sendContent:(id)sender
NSAttributedString *textStorage = [self textStorage];
- //Add to history if there is text being sent
+ // Add to history if there is text being sent [historyArray insertObject:[[textStorage copy] autorelease] atIndex:1];
if ([historyArray count] > MAX_HISTORY) {
[historyArray removeLastObject];
- currentHistoryLocation = 0; //Move back to bottom of history
+ currentHistoryLocation = 0; // Move back to bottom of history
[super sendContent:sender];
- //Clear the undo/redo stack as it makes no sense to carry between sends (the history is for that)
+ // Clear the undo/redo stack as it makes no sense to carry between sends (the history is for that) [[self undoManager] removeAllActions];
-//Populate the history with messages from the message history
+// Populate the history with messages from the message history - (void)contentObjectAdded:(NSNotification *)notification
AIContentObject *content = [notification.userInfo objectForKey:@"AIContentObject"];
@@ -904,15 +918,15 @@
-//Push and Pop ---------------------------------------------------------------------------------------------------------
-#pragma mark Push and Pop
-//Enable/Disable push-pop
+#pragma mark - Push and Pop +// Enable/Disable push-pop - (void)setPushPopEnabled:(BOOL)inBool
-//Push out of the message entry field
+// Push out of the message entry field if ([[self textStorage] length] != 0 && pushPopEnabled) {
@@ -922,20 +936,21 @@
-//Pop into the message entry field
+// Pop into the message entry field if ([pushArray count] && pushPopEnabled) {
[self setAttributedString:[pushArray lastObject]];
- [self setSelectedRange:NSMakeRange([[self textStorage] length], 0)]; //selection to end
+ [self setSelectedRange:NSMakeRange([[self textStorage] length], 0)]; // selection to end [pushArray removeLastObject];
if ([pushArray count] == 0) {
[self _setPushIndicatorVisible:NO];
@@ -954,25 +969,25 @@
- (void)_setPushIndicatorVisible:(BOOL)visible
- static NSImage *pushIndicatorImage = nil;
+ static NSImage *pushIndicatorImage = nil;
- if (!pushIndicatorImage) pushIndicatorImage = [[NSImage imageNamed:@"stackImage" forClass:[self class]] retain];
+ if (!pushIndicatorImage) { + pushIndicatorImage = [[NSImage imageNamed:@"stackImage" forClass:[self class]] retain]; if (visible && !pushIndicatorVisible) {
pushIndicatorVisible = visible;
- //Push text over to make room for indicator
+ // Push text over to make room for indicator NSSize size = [self frame].size;
size.width -= ([pushIndicatorImage size].width);
[self setFrameSize:size];
// Make the indicator and set its action. It is a button with no border.
- pushIndicator = [[NSButton alloc] initWithFrame:
- NSMakeRect(0, 0, [pushIndicatorImage size].width, [pushIndicatorImage size].height)];
+ pushIndicator = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, [pushIndicatorImage size].width, [pushIndicatorImage size].height)]; [pushIndicator setButtonType:NSMomentaryPushButton];
[pushIndicator setAutoresizingMask:(NSViewMinXMargin)];
[pushIndicator setImage:pushIndicatorImage];
@@ -986,30 +1001,40 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(positionIndicators:) name:NSViewBoundsDidChangeNotification object:[self superview]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(positionIndicators:) name:NSViewFrameDidChangeNotification object:[self superview]];
- [self positionPushIndicator]; //Set the indicators initial position
+ [self positionPushIndicator]; // Set the indicators initial position + // Reposition the emoticons menu button + if ([self hasEmoticonsMenu]) { + [self updateEmoticonsMenuButton]; } else if (!visible && pushIndicatorVisible) {
pushIndicatorVisible = visible;
NSSize size = [self frame].size;
size.width += [pushIndicatorImage size].width;
[self setFrameSize:size];
- //Unsubcribe, if necessary.
- if (!characterCounter) {
+ // Unsubcribe, if necessary. + if (!characterCounter && ![self hasEmoticonsMenu]) { [[NSNotificationCenter defaultCenter] removeObserver:self name:NSViewBoundsDidChangeNotification object:[self superview]];
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSViewFrameDidChangeNotification object:[self superview]];
[pushIndicator removeFromSuperview];
[pushIndicator release]; pushIndicator = nil;
[self positionPushIndicator];
+ // Reposition the emoticons menu button + if ([self hasEmoticonsMenu]) { + [self updateEmoticonsMenuButton]; -//Reposition the push indicator into lower right corner
+// Reposition the push indicator into lower right corner - (void)positionPushIndicator
NSRect visRect = [[self superview] bounds];
@@ -1020,23 +1045,32 @@
[[self enclosingScrollView] setNeedsDisplay:YES];
-#pragma mark Indicators Positioning
+#pragma mark - Indicators Positioning * @brief Dispatch for both indicators to observe bounds & frame changes of their superview
* Stupid that this is necessary, but you can only remove an entire object from a notification center's observer list,
* not on a per-method basis.
+ * Updates emoticons menu button also. - (void)positionIndicators:(NSNotification *)notification
- if (pushIndicatorVisible)
+ if (pushIndicatorVisible) { [self positionPushIndicator];
+ if (characterCounter) { [self positionCharacterCounter];
+ // Update emoticons menu button + if ([self hasEmoticonsMenu]) { + [self updateEmoticonsMenuButton]; -#pragma mark Character Counter
+#pragma mark - Character Counter * @brief Makes the character counter for this view visible.
@@ -1061,8 +1095,8 @@
size.width += NSWidth([characterCounter frame]);
[self setFrameSize:size];
- //Unsubscribe, if necessary.
- if (!pushIndicatorVisible) {
+ // Unsubscribe, if necessary. + if (!pushIndicatorVisible && ![self hasEmoticonsMenu]) { [[NSNotificationCenter defaultCenter] removeObserver:self name:NSViewBoundsDidChangeNotification object:[self superview]];
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSViewFrameDidChangeNotification object:[self superview]];
@@ -1071,8 +1105,14 @@
// Reposition the push indicator, if necessary.
- if (pushIndicatorVisible)
+ if (pushIndicatorVisible) { [self positionPushIndicator];
+ // Reposition the emoticons menu button + if ([self hasEmoticonsMenu]) { + [self updateEmoticonsMenuButton]; [[self enclosingScrollView] setNeedsDisplay:YES];
@@ -1096,8 +1136,9 @@
maxCharacters = inMaxCharacters;
+ if (characterCounter) { [self updateCharacterCounter];
@@ -1144,21 +1185,29 @@
[characterCounter setFrameSize:label.size];
- //Reposition the character counter.
+ // Reposition the character counter. [self positionCharacterCounter];
- //Shift the text entry view over as necessary.
+ // Shift the text entry view over as necessary. - if (pushIndicatorVisible || characterCounter) {
+ if (pushIndicatorVisible || characterCounter || [self hasEmoticonsMenu]) { CGFloat pushIndicatorX = pushIndicator ? NSMinX([pushIndicator frame]) : NSMaxX([self bounds]);
CGFloat characterCounterX = characterCounter ? NSMinX([characterCounter frame]) : NSMaxX([self bounds]);
- indent = NSWidth(visRect) - AIfmin(pushIndicatorX, characterCounterX);
+ CGFloat emoticonsMenuButtonX = [self emoticonsMenuButton] ? NSMinX([[self emoticonsMenuButton] frame]) : NSMaxX([self bounds]); + indent = NSWidth(visRect) - AIfmin(pushIndicatorX, AIfmin(characterCounterX, emoticonsMenuButtonX)); [self setFrameSize:NSMakeSize(NSWidth(visRect) - indent, NSHeight([self frame]))];
- //Reposition the push indicator if necessary.
+ // Reposition the push indicator if necessary. if (pushIndicatorVisible)
[self positionPushIndicator];
+ // Reposition the emoticons menu button + if ([self hasEmoticonsMenu]) { + [self updateEmoticonsMenuButton]; [[self enclosingScrollView] setNeedsDisplay:YES];
@@ -1171,14 +1220,14 @@
NSRect visRect = [[self superview] bounds];
NSSize counterSize = characterCounter.string.size;
- //NSMaxY([self frame]) is necessary because visRect's height changes after you start typing. No idea why.
+ // NSMaxY([self frame]) is necessary because visRect's height changes after you start typing. No idea why. [characterCounter setFrameOrigin:NSMakePoint(NSMaxX(visRect) - counterSize.width - INDICATOR_RIGHT_PADDING,
NSMidY([self frame]) - (counterSize.height)/2)];
[characterCounter setFrameSize:counterSize];
[[self enclosingScrollView] setNeedsDisplay:YES];
-#pragma mark List Object Observer / Chat KVO
+#pragma mark - List Object Observer / Chat KVO - (NSSet *)updateListObject:(AIListObject *)inObject keys:(NSSet *)inModifiedKeys silent:(BOOL)silent
@@ -1205,7 +1254,7 @@
-#pragma mark Contextual Menus
+#pragma mark - Contextual Menus - (NSMenu *)menuForEvent:(NSEvent *)theEvent
@@ -1218,7 +1267,8 @@
contextualMenu = [[contextualMenu copy] autorelease];
NSMenuItem *editLinkItem = nil;
- for (NSMenuItem *menuItem in contextualMenu.itemArray) {
+ for (NSMenuItem *menuItem in contextualMenu.itemArray) { if ([[menuItem title] rangeOfString:AILocalizedString(@"Edit Link", nil)].location != NSNotFound) {
@@ -1226,7 +1276,7 @@
- //There was an Edit Link item. Remove it, and add out own link editing items in its place.
+ // There was an Edit Link item. Remove it, and add out own link editing items in its place. NSInteger editIndex = [contextualMenu indexOfItem:editLinkItem];
[contextualMenu removeItem:editLinkItem];
@@ -1243,7 +1293,7 @@
contextualMenu = [[[NSMenu alloc] init] autorelease];
- //Retrieve the items which should be added to the bottom of the default menu
+ // Retrieve the items which should be added to the bottom of the default menu NSArray *locationArray = (addedOurLinkItems ?
[NSArray arrayWithObject:[NSNumber numberWithInt:Context_TextView_Edit]] :
[NSArray arrayWithObjects:[NSNumber numberWithInt:Context_TextView_LinkEditing],
@@ -1254,10 +1304,12 @@
if ([itemsArray count] > 0) {
[contextualMenu addItem:[NSMenuItem separatorItem]];
NSInteger i = [(NSMenu *)contextualMenu numberOfItems];
for (NSMenuItem *menuItem in itemsArray) {
- //We're going to be copying; call menu needs update now since it won't be called later.
+ // We're going to be copying; call menu needs update now since it won't be called later. NSMenu *submenu = [menuItem submenu];
NSMenuItem *menuItemCopy = [[menuItem copy] autorelease];
if (submenu && [submenu respondsToSelector:@selector(delegate)]) {
[[menuItemCopy submenu] setDelegate:[submenu delegate]];
@@ -1269,7 +1321,7 @@
-#pragma mark Drag and drop
+#pragma mark - Drag and drop /*An NSTextView which has setImportsGraphics:YES as of 10.5 gets the following drag types by default:
"NeXT RTFD pasteboard type",
@@ -1321,7 +1373,7 @@
return [super draggingUpdated:sender];
-//We don't need to prepare for the types we are handling in performDragOperation: below
+// We don't need to prepare for the types we are handling in performDragOperation: below - (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
NSPasteboard *pasteboard = [sender draggingPasteboard];
@@ -1339,7 +1391,7 @@
return (allowDragOperation);
-//No conclusion is needed for the types we are handling in performDragOperation: below
+// No conclusion is needed for the types we are handling in performDragOperation: below - (void)concludeDragOperation:(id <NSDraggingInfo>)sender
NSPasteboard *pasteboard = [sender draggingPasteboard];
@@ -1357,8 +1409,9 @@
if ((availableType = [pasteboard availableTypeFromArray:[NSArray arrayWithObjects:NSFilenamesPboardType, AIiTunesTrackPboardType, nil]])) {
- //The pasteboard points to one or more files on disc. Use them directly.
+ // The pasteboard points to one or more files on disc. Use them directly. if ([availableType isEqualToString:NSFilenamesPboardType]) {
files = [pasteboard propertyListForType:NSFilenamesPboardType];
@@ -1366,20 +1419,20 @@
files = [pasteboard filesFromITunesDragPasteboard];
[self addAttachmentOfPath:path];
- //The pasteboard contains image data with no corresponding file.
+ // The pasteboard contains image data with no corresponding file. NSImage *image = [[NSImage alloc] initWithPasteboard:pasteboard];
[self addAttachmentOfImage:image];
-//The textView's method of inserting into the view is insufficient; we can do better.
+// The textView's method of inserting into the view is insufficient; we can do better. - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
NSPasteboard *pasteboard = [sender draggingPasteboard];
@@ -1400,7 +1453,7 @@
-#pragma mark Spell Checking
+#pragma mark - Spell Checking * @brief Spell checking was toggled
@@ -1412,8 +1465,8 @@
[super toggleContinuousSpellChecking:sender];
[adium.preferenceController setPreference:[NSNumber numberWithBool:[self isContinuousSpellCheckingEnabled]]
- forKey:KEY_SPELL_CHECKING
- group:PREF_GROUP_DUAL_WINDOW_INTERFACE];
+ forKey:KEY_SPELL_CHECKING + group:PREF_GROUP_DUAL_WINDOW_INTERFACE]; @@ -1426,11 +1479,12 @@
[super toggleGrammarChecking:sender];
[adium.preferenceController setPreference:[NSNumber numberWithBool:[self isGrammarCheckingEnabled]]
- forKey:KEY_GRAMMAR_CHECKING
- group:PREF_GROUP_DUAL_WINDOW_INTERFACE];
+ forKey:KEY_GRAMMAR_CHECKING + group:PREF_GROUP_DUAL_WINDOW_INTERFACE]; -#pragma mark Substitutions
+#pragma mark - Substitutions * @brief Dash substitution was toggled
@@ -1515,7 +1569,8 @@
group:PREF_GROUP_DUAL_WINDOW_INTERFACE];
-#pragma mark Autocompleting
+#pragma mark - Autocompleting - (NSRange)rangeForUserCompletion
NSRange completionRange = [super rangeForUserCompletion];
@@ -1527,7 +1582,8 @@
-#pragma mark Writing Direction
+#pragma mark - Writing Direction - (void)toggleBaseWritingDirection:(id)sender
if ([self baseWritingDirection] == NSWritingDirectionRightToLeft) {
@@ -1536,12 +1592,13 @@
[self setBaseWritingDirection:NSWritingDirectionRightToLeft];
+ // Apply it immediately [self setBaseWritingDirection:[self baseWritingDirection]
range:NSMakeRange(0, [[self textStorage] length])];
-#pragma mark Attachments
+#pragma mark - Attachments * @brief Add an attachment of the file at inPath at the current insertion point
@@ -1549,15 +1606,39 @@
- (void)addAttachmentOfPath:(NSString *)inPath
- AITextAttachmentExtension *attachment = [[AITextAttachmentExtension alloc] init];
- [attachment setPath:inPath];
- [attachment setString:[inPath lastPathComponent]];
- [attachment setShouldSaveImageForLogging:YES];
- //Insert an attributed string into the text at the current insertion point
- [self insertText:[self attributedStringWithTextAttachmentExtension:attachment]];
+ if ([[inPath pathExtension] caseInsensitiveCompare:@"textClipping"] == NSOrderedSame) { + inPath = [inPath stringByAppendingString:@"/..namedfork/rsrc"]; + NSData *data = [NSData dataWithContentsOfFile:inPath]; + data = [data subdataWithRange:NSMakeRange(260, [data length] - 260)]; + NSAttributedString *clipping = [[[NSAttributedString alloc] initWithRTF:data documentAttributes:nil] autorelease]; + NSDictionary *attributes = [[self typingAttributes] copy]; + [self insertText:clipping]; + [self setTypingAttributes:attributes]; + AITextAttachmentExtension *attachment = [[AITextAttachmentExtension alloc] init]; + [attachment setPath:inPath]; + [attachment setString:[inPath lastPathComponent]]; + [attachment setShouldSaveImageForLogging:YES]; + // Insert an attributed string into the text at the current insertion point + [self insertText:[self attributedStringWithTextAttachmentExtension:attachment]]; @@ -1570,7 +1651,7 @@
[attachment setImage:inImage];
[attachment setShouldSaveImageForLogging:YES];
- //Insert an attributed string into the text at the current insertion point
+ // Insert an attributed string into the text at the current insertion point [self insertText:[self attributedStringWithTextAttachmentExtension:attachment]];
@@ -1603,45 +1684,45 @@
NSString *attachmentCharacterString = [NSString stringWithFormat:@"%C",(unsigned short)NSAttachmentCharacter];
+ // Find each attachment attachmentRange = [[attributedString string] rangeOfString:attachmentCharacterString
range:NSMakeRange(currentLocation,
[attributedString length])];
while (attachmentRange.length != 0) {
- //Found an attachment in at attachmentRange.location
+ // Found an attachment in at attachmentRange.location NSTextAttachment *attachment = [attributedString attribute:NSAttachmentAttributeName
atIndex:attachmentRange.location
- //If it's not already an AITextAttachmentExtension, make it into one
+ // If it's not already an AITextAttachmentExtension, make it into one if (![attachment isKindOfClass:[AITextAttachmentExtension class]]) {
NSAttributedString *replacement;
NSFileWrapper *fileWrapper = [attachment fileWrapper];
NSString *destinationPath;
NSString *preferredName = [fileWrapper preferredFilename];
- //Get a unique folder within our temporary directory
+ // Get a unique folder within our temporary directory destinationPath = [NSTemporaryDirectory() stringByAppendingPathComponent:[[NSProcessInfo processInfo] globallyUniqueString]];
[[NSFileManager defaultManager] createDirectoryAtPath:destinationPath withIntermediateDirectories:YES attributes:nil error:NULL];
destinationPath = [destinationPath stringByAppendingPathComponent:preferredName];
- //Write the file out to it
+ // Write the file out to it [fileWrapper writeToFile:destinationPath
- //Now create an AITextAttachmentExtension pointing to it
+ // Now create an AITextAttachmentExtension pointing to it AITextAttachmentExtension *textAttachment = [[AITextAttachmentExtension alloc] init];
[textAttachment setPath:destinationPath];
[textAttachment setString:preferredName];
[textAttachment setShouldSaveImageForLogging:YES];
- //Insert an attributed string into the text at the current insertion point
+ // Insert an attributed string into the text at the current insertion point replacement = [self attributedStringWithTextAttachmentExtension:textAttachment];
[textAttachment release];
- //Remove the NSTextAttachment, replacing it the AITextAttachmentExtension
+ // Remove the NSTextAttachment, replacing it the AITextAttachmentExtension [attributedString replaceCharactersInRange:attachmentRange
withAttributedString:replacement];
@@ -1651,7 +1732,7 @@
currentLocation = attachmentRange.location + attachmentRange.length;
- //Find the next attachment
+ // Find the next attachment attachmentRange = [[attributedString string] rangeOfString:attachmentCharacterString
range:NSMakeRange(currentLocation,
@@ -1692,14 +1773,130 @@
[self setBaseWritingDirection:[[[self textStorage] string] baseWritingDirection]];
+#pragma mark - Emoticons Menu +@synthesize emoticonsMenuButton; + * @brief Show/Hide emoticons menu +- (void)setHasEmoticonsMenu:(BOOL)hasMenu + if (hasMenu && emoticonsMenuButton == nil) { + NSImage *emoticonsMenuIcon = [NSImage imageNamed:@"emoticons_menu"]; + emoticonsMenuButton = [[NSButton alloc] initWithFrame:NSZeroRect]; + [emoticonsMenuButton setFrameSize:[emoticonsMenuIcon size]]; + [emoticonsMenuButton setAutoresizingMask:NSViewMinXMargin]; + [emoticonsMenuButton setButtonType:NSMomentaryChangeButton]; + [emoticonsMenuButton setBordered:NO]; + [emoticonsMenuButton setAction:@selector(popUpEmoticonsMenu)]; + [[emoticonsMenuButton cell] setImageScaling:NSImageScaleNone]; + [emoticonsMenuButton setImage:emoticonsMenuIcon]; + NSImage *alternateMenuIcon = [emoticonsMenuIcon copy]; + // Adjust image for On/Alternate state + [alternateMenuIcon lockFocus]; + [alternateMenuIcon drawAtPoint:NSZeroPoint fromRect:NSZeroRect operation:NSCompositePlusDarker fraction:0.5f]; + [alternateMenuIcon unlockFocus];