Tab switching now defaults to ctrl+tab, matching Safari's user visible default, as per discussion on IRC today. This only applies to new users as of Adium 1.5.4 and later; anyone who has run a previous version will inherit the keep the old default of command+arrows (unless they've changed it previously, of course). Fixes #16102.
authorEvan Schoenberg
Wed, 05 Sep 2012 23:36:01 -0500
changeset 5031 1a2cd53342c5
parent 5030 a1dbc4d24a09
child 5036 f3b7be2284a3
Tab switching now defaults to ctrl+tab, matching Safari's user visible default, as per discussion on IRC today. This only applies to new users as of Adium 1.5.4 and later; anyone who has run a previous version will inherit the keep the old default of command+arrows (unless they've changed it previously, of course). Fixes #16102.
Adium.xcodeproj/project.pbxproj
Resources/ChatCyclingDefaults-Old.plist
Resources/ChatCyclingDefaults.plist
Source/AIChatCyclingPlugin.m
--- a/Adium.xcodeproj/project.pbxproj	Wed Sep 05 23:18:36 2012 -0500
+++ b/Adium.xcodeproj/project.pbxproj	Wed Sep 05 23:36:01 2012 -0500
@@ -627,6 +627,8 @@
 		34D0FDD20956186200DCB678 /* ESPersonalPreferencesPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D0FDD00956186200DCB678 /* ESPersonalPreferencesPlugin.m */; };
 		34D0FDD80956187700DCB678 /* ESPersonalPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D0FDD60956187700DCB678 /* ESPersonalPreferences.m */; };
 		34D0FF8509569FE500DCB678 /* PersonalPreferencesDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 34D0FF8409569FE500DCB678 /* PersonalPreferencesDefaults.plist */; };
+		34D7F1EA15F85DD300F32F9B /* ChatCyclingDefaults-Old.plist in Resources */ = {isa = PBXBuildFile; fileRef = 34D7F1E815F85DD300F32F9B /* ChatCyclingDefaults-Old.plist */; };
+		34D7F1EB15F85DD300F32F9B /* ChatCyclingDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 34D7F1E915F85DD300F32F9B /* ChatCyclingDefaults.plist */; };
 		34D8153A13B663650022C8C4 /* AIFacebookXMPPAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = 34D8153013B663650022C8C4 /* AIFacebookXMPPAccount.h */; };
 		34D8153B13B663650022C8C4 /* AIFacebookXMPPAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D8153113B663650022C8C4 /* AIFacebookXMPPAccount.m */; };
 		34D8153D13B663650022C8C4 /* AIFacebookXMPPAccountViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 34D8153313B663650022C8C4 /* AIFacebookXMPPAccountViewController.h */; };
@@ -3401,6 +3403,8 @@
 		34D369ED08E7544D00E15E40 /* AIColorPickerSliders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIColorPickerSliders.h; path = "Frameworks/Adium Framework/Source/AIColorPickerSliders.h"; sourceTree = "<group>"; };
 		34D369EE08E7544D00E15E40 /* AIColorPickerSliders.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIColorPickerSliders.m; path = "Frameworks/Adium Framework/Source/AIColorPickerSliders.m"; sourceTree = "<group>"; };
 		34D43504051ADC10003B2F21 /* DualWindowDefaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = DualWindowDefaults.plist; path = "Plugins/Dual Window Interface/DualWindowDefaults.plist"; sourceTree = "<group>"; };
+		34D7F1E815F85DD300F32F9B /* ChatCyclingDefaults-Old.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "ChatCyclingDefaults-Old.plist"; path = "Resources/ChatCyclingDefaults-Old.plist"; sourceTree = "<group>"; };
+		34D7F1E915F85DD300F32F9B /* ChatCyclingDefaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = ChatCyclingDefaults.plist; path = Resources/ChatCyclingDefaults.plist; sourceTree = "<group>"; };
 		34D8153013B663650022C8C4 /* AIFacebookXMPPAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIFacebookXMPPAccount.h; path = "Plugins/Purple Service/AIFacebookXMPPAccount.h"; sourceTree = "<group>"; };
 		34D8153113B663650022C8C4 /* AIFacebookXMPPAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIFacebookXMPPAccount.m; path = "Plugins/Purple Service/AIFacebookXMPPAccount.m"; sourceTree = "<group>"; };
 		34D8153313B663650022C8C4 /* AIFacebookXMPPAccountViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIFacebookXMPPAccountViewController.h; path = "Plugins/Purple Service/AIFacebookXMPPAccountViewController.h"; sourceTree = "<group>"; };
@@ -6682,6 +6686,8 @@
 			children = (
 				34BFE20007E8E11500AD984D /* AIChatCyclingPlugin.m */,
 				34BFE20107E8E11500AD984D /* AIChatCyclingPlugin.h */,
+				34D7F1E815F85DD300F32F9B /* ChatCyclingDefaults-Old.plist */,
+				34D7F1E915F85DD300F32F9B /* ChatCyclingDefaults.plist */,
 			);
 			name = "Chat Cycling";
 			sourceTree = "<group>";
@@ -9750,6 +9756,8 @@
 				C6B545A815D338EE0005F1F8 /* SoundFileIcon@2x.png in Resources */,
 				C6B545AA15D3390F0005F1F8 /* ABSearch@2x.png in Resources */,
 				C61AFA9A15DD43C80001EDEF /* AboutDialog_bg@2x.png in Resources */,
+				34D7F1EA15F85DD300F32F9B /* ChatCyclingDefaults-Old.plist in Resources */,
+				34D7F1EB15F85DD300F32F9B /* ChatCyclingDefaults.plist in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/ChatCyclingDefaults-Old.plist	Wed Sep 05 23:36:01 2012 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>Tab Switching Keys</key>
+	<integer>0</integer>
+</dict>
+</plist>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/ChatCyclingDefaults.plist	Wed Sep 05 23:36:01 2012 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>Tab Switching Keys</key>
+	<integer>5</integer>
+</dict>
+</plist>
--- a/Source/AIChatCyclingPlugin.m	Wed Sep 05 23:18:36 2012 -0500
+++ b/Source/AIChatCyclingPlugin.m	Wed Sep 05 23:36:01 2012 -0500
@@ -19,10 +19,14 @@
 #import <Adium/AIMenuControllerProtocol.h>
 #import "ESGeneralPreferencesPlugin.h"
 #import <AIUtilities/AIMenuAdditions.h>
+#import <AIUtilities/AIDictionaryAdditions.h>
 
 #define PREVIOUS_MESSAGE_MENU_TITLE		AILocalizedString(@"Previous Chat",nil)
 #define NEXT_MESSAGE_MENU_TITLE			AILocalizedString(@"Next Chat",nil)
 
+#define DEFAULT_CHAT_CYCLING_PREFS		@"ChatCyclingDefaults"
+#define OLD_DEFAULT_CHAT_CYCLING_PREFS	@"ChatCyclingDefaults-Old"
+
 /*!
  * @class AIChatCyclingPlugin
  * @brief Component to manage the chat cycling menu items
@@ -50,6 +54,15 @@
 												  action:@selector(nextChat:)
 										   keyEquivalent:@""];
 	[menuController addMenuItem:nextChatMenuItem toLocation:LOC_Window_Commands];
+		
+	/* Adium 1.5.4+ use the new defaults for chat switching, ctrl+tab, to match Safari's default user-visible behavior */
+	NSDictionary *defaults = [NSDictionary dictionaryNamed:(([adium compareVersion:adium.earliestLaunchedAdiumVersion
+																		 toVersion:@"1.5.4"] == NSOrderedAscending) ?
+															OLD_DEFAULT_CHAT_CYCLING_PREFS :
+															DEFAULT_CHAT_CYCLING_PREFS)
+												  forClass:[self class]];
+	[adium.preferenceController registerDefaults:defaults
+											forGroup:PREF_GROUP_CHAT_CYCLING];
 
 	//Prefs
 	[adium.preferenceController registerPreferenceObserver:self forGroup:PREF_GROUP_CHAT_CYCLING];