adium-1.4 3529:571c527ae057: Remove old PurpleFacebookAccountVie...
commits at adium.im
commits at adium.im
Fri Jun 24 22:04:24 UTC 2011
details: http://hg.adium.im/adium-1.4/rev/571c527ae057
revision: 3529:571c527ae057
branch: facebook-xmpp
author: Evan Schoenberg
date: Fri Jun 24 16:49:51 2011 -0500
Remove old PurpleFacebookAccountView.nib. Refs #15077
Subject: adium-1.4 3530:7127fc0c82a3: Project updates for removing the nib. Refs #15077
details: http://hg.adium.im/adium-1.4/rev/7127fc0c82a3
revision: 3530:7127fc0c82a3
branch: facebook-xmpp
author: Evan Schoenberg
date: Fri Jun 24 16:50:07 2011 -0500
Project updates for removing the nib. Refs #15077
Subject: adium-1.4 3531:b6256c3fb26c: A little song and dance so we can do the upgrade from one service to another more smoothly
details: http://hg.adium.im/adium-1.4/rev/b6256c3fb26c
revision: 3531:b6256c3fb26c
branch: facebook-xmpp
author: Evan Schoenberg
date: Fri Jun 24 17:01:37 2011 -0500
A little song and dance so we can do the upgrade from one service to another more smoothly
Subject: adium-1.4 3532:ade4668efa7a: More changes for smooth service upgrading (for facebook-xmpp)
details: http://hg.adium.im/adium-1.4/rev/ade4668efa7a
revision: 3532:ade4668efa7a
branch: facebook-xmpp
author: Evan Schoenberg
date: Fri Jun 24 17:02:10 2011 -0500
More changes for smooth service upgrading (for facebook-xmpp)
Subject: adium-1.4 3533:9e53b161122a: Reworked the migration process for facebook-http to facebook-xmpp:
details: http://hg.adium.im/adium-1.4/rev/9e53b161122a
revision: 3533:9e53b161122a
branch: facebook-xmpp
author: Evan Schoenberg
date: Fri Jun 24 17:04:11 2011 -0500
Reworked the migration process for facebook-http to facebook-xmpp:
- Now happens seamlessly when the first connect attempt succeeds.
- The old service plugin will be kept around solely for upgrade purposes, but the same account gets to shift over to the new service (which, in turn, means a smoother first-launch experience for existing users)
- Improved feedback in the account view controller
diffs (truncated from 21736 to 1000 lines):
diff -r 7e2f115c4422 -r 9e53b161122a Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj Fri Jun 24 16:04:07 2011 -0500
+++ b/Adium.xcodeproj/project.pbxproj Fri Jun 24 17:04:11 2011 -0500
@@ -96,7 +96,6 @@
111E89020F93FE3900A5F18B /* AIUserHostTooltip.m in Sources */ = {isa = PBXBuildFile; fileRef = 111E89000F93FE3900A5F18B /* AIUserHostTooltip.m */; };
1121B29A0F896A720047EC66 /* AIContactVisibilityControlPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 1121B2990F896A720047EC66 /* AIContactVisibilityControlPlugin.m */; };
112523190F5F7F86003FC58A /* AITwitterURLHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 112523180F5F7F86003FC58A /* AITwitterURLHandler.m */; };
- 1125DD3C0FF5A5D600544B92 /* PurpleFacebookAccountView.nib in Resources */ = {isa = PBXBuildFile; fileRef = 1125DD3B0FF5A5D600544B92 /* PurpleFacebookAccountView.nib */; };
112939020FD5AC1B00FA8F53 /* AIConfirmationsAdvancedPreferences.nib in Resources */ = {isa = PBXBuildFile; fileRef = 112939010FD5AC1B00FA8F53 /* AIConfirmationsAdvancedPreferences.nib */; };
112939100FD5AE1400FA8F53 /* AIConfirmationsAdvancedPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 1129390F0FD5AE1400FA8F53 /* AIConfirmationsAdvancedPreferences.m */; };
112B47240F82DC2300690E84 /* AIGroupChatStatusIcons.h in Headers */ = {isa = PBXBuildFile; fileRef = 112B47220F82DC2300690E84 /* AIGroupChatStatusIcons.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -1842,32 +1841,6 @@
1121B2990F896A720047EC66 /* AIContactVisibilityControlPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIContactVisibilityControlPlugin.m; path = Source/AIContactVisibilityControlPlugin.m; sourceTree = "<group>"; };
112523170F5F7F86003FC58A /* AITwitterURLHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AITwitterURLHandler.h; path = "Plugins/Twitter Plugin/AITwitterURLHandler.h"; sourceTree = "<group>"; };
112523180F5F7F86003FC58A /* AITwitterURLHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AITwitterURLHandler.m; path = "Plugins/Twitter Plugin/AITwitterURLHandler.m"; sourceTree = "<group>"; };
- 1125DD380FF5A58F00544B92 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = "Plugins/Purple Service/en.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD3D0FF5A5DB00544B92 /* ca */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ca; path = "Plugins/Purple Service/ca.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD3E0FF5A5DD00544B92 /* cs */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = cs; path = "Plugins/Purple Service/cs.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD3F0FF5A5DF00544B92 /* da */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = da; path = "Plugins/Purple Service/da.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD400FF5A5E100544B92 /* de */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = de; path = "Plugins/Purple Service/de.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD410FF5A5E300544B92 /* el_GR */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = el_GR; path = "Plugins/Purple Service/el_GR.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD420FF5A5E500544B92 /* en_GB */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = en_GB; path = "Plugins/Purple Service/en_GB.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD430FF5A5E700544B92 /* es */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = es; path = "Plugins/Purple Service/es.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD440FF5A5E900544B92 /* fi */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = fi; path = "Plugins/Purple Service/fi.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD450FF5A5EC00544B92 /* fr */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = fr; path = "Plugins/Purple Service/fr.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD460FF5A5EE00544B92 /* fr_CA */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = fr_CA; path = "Plugins/Purple Service/fr_CA.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD470FF5A5F000544B92 /* hu */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = hu; path = "Plugins/Purple Service/hu.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD480FF5A5F200544B92 /* is */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = is; path = "Plugins/Purple Service/is.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD490FF5A5F400544B92 /* it */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = it; path = "Plugins/Purple Service/it.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD4A0FF5A5F600544B92 /* ja */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ja; path = "Plugins/Purple Service/ja.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD4B0FF5A5F800544B92 /* nb */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = nb; path = "Plugins/Purple Service/nb.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD4C0FF5A5FA00544B92 /* nl */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = nl; path = "Plugins/Purple Service/nl.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD4D0FF5A5FB00544B92 /* pl */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pl; path = "Plugins/Purple Service/pl.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD4E0FF5A5FD00544B92 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = "Plugins/Purple Service/pt_PT.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD4F0FF5A5FF00544B92 /* pt */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt; path = "Plugins/Purple Service/pt.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD500FF5A60100544B92 /* ru */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ru; path = "Plugins/Purple Service/ru.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD510FF5A60300544B92 /* sl */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sl; path = "Plugins/Purple Service/sl.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD520FF5A60500544B92 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = "Plugins/Purple Service/sv.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD530FF5A60700544B92 /* tr */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = tr; path = "Plugins/Purple Service/tr.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD540FF5A60900544B92 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_CN; path = "Plugins/Purple Service/zh_CN.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
- 1125DD550FF5A60B00544B92 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_TW; path = "Plugins/Purple Service/zh_TW.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
112939010FD5AC1B00FA8F53 /* AIConfirmationsAdvancedPreferences.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = AIConfirmationsAdvancedPreferences.nib; path = Resources/AIConfirmationsAdvancedPreferences.nib; sourceTree = "<group>"; };
1129390E0FD5AE1400FA8F53 /* AIConfirmationsAdvancedPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIConfirmationsAdvancedPreferences.h; path = Source/AIConfirmationsAdvancedPreferences.h; sourceTree = "<group>"; };
1129390F0FD5AE1400FA8F53 /* AIConfirmationsAdvancedPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIConfirmationsAdvancedPreferences.m; path = Source/AIConfirmationsAdvancedPreferences.m; sourceTree = "<group>"; };
@@ -4800,7 +4773,6 @@
C4D29CC20C3C2E3C001545A2 /* BGICLogImportController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = BGICLogImportController.m; path = Source/BGICLogImportController.m; sourceTree = SOURCE_ROOT; };
C4D29CC70C3C2E49001545A2 /* ICImport.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ICImport.nib; path = Resources/ICImport.nib; sourceTree = SOURCE_ROOT; };
D1F4FD7511DFE8DF00796027 /* sk_SK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk_SK; path = sk_SK.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- D1F4FD7611DFE8DF00796027 /* sk_SK */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sk_SK; path = "Plugins/Purple Service/sk_SK.lproj/PurpleFacebookAccountView.nib"; sourceTree = "<group>"; };
D1F4FD7711DFE8DF00796027 /* sk_SK */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sk_SK; path = sk_SK.lproj/schema.strings; sourceTree = "<group>"; };
D3DA2E3E052E65DE00A8010B /* LNAboutBoxController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = LNAboutBoxController.m; path = Source/LNAboutBoxController.m; sourceTree = "<group>"; };
D3DA2E40052E65E400A8010B /* LNAboutBoxController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LNAboutBoxController.h; path = Source/LNAboutBoxController.h; sourceTree = "<group>"; };
@@ -5536,7 +5508,6 @@
81DAE8710C261E8A00780E4C /* AMPurpleTuneTooltip.m */,
347E39DB0A98AA4A00961B0E /* missing_image.png */,
77D903500B78CF1000B86C42 /* zhm */,
- 345D689D0F1FD575002F2D01 /* Facebook */,
34416060059FC2450019246B /* Gadu-Gadu */,
34B3241D09B9FF6900029361 /* IRC */,
34416053059FC2270019246B /* Jabber */,
@@ -5783,20 +5754,19 @@
name = SIMPLE;
sourceTree = "<group>";
};
- 345D689D0F1FD575002F2D01 /* Facebook */ = {
- isa = PBXGroup;
- children = (
- 1125DD3B0FF5A5D600544B92 /* PurpleFacebookAccountView.nib */,
+ 345D689D0F1FD575002F2D01 /* Facebook (Upgrade Path - Legacy Service) */ = {
+ isa = PBXGroup;
+ children = (
345D68A60F1FD5AA002F2D01 /* PurpleFacebookAccount.h */,
345D68A70F1FD5AA002F2D01 /* PurpleFacebookAccount.m */,
+ 34064D0F0F21B34200AA6FE3 /* PurpleFacebookAccountViewController.h */,
34064D0E0F21B34200AA6FE3 /* PurpleFacebookAccountViewController.m */,
- 34064D0F0F21B34200AA6FE3 /* PurpleFacebookAccountViewController.h */,
345D68A00F1FD59F002F2D01 /* PurpleFacebookService.h */,
345D68A10F1FD59F002F2D01 /* PurpleFacebookService.m */,
345D68950F1FD563002F2D01 /* facebook.png */,
345D68960F1FD563002F2D01 /* facebook-small.png */,
);
- name = Facebook;
+ name = "Facebook (Upgrade Path - Legacy Service)";
sourceTree = "<group>";
};
34607EF209B22933000DB3D2 /* User Icon Changing */ = {
@@ -8729,6 +8699,7 @@
EFA39C2F12966B2600B36EBB /* AIFacebookXMPPOAuthWebViewWindowController.h */,
EFA39C3012966B2600B36EBB /* AIFacebookXMPPOAuthWebViewWindowController.m */,
EFA39CF512966F5D00B36EBB /* AIFacebookXMPPOauthWebViewWindow.xib */,
+ 345D689D0F1FD575002F2D01 /* Facebook (Upgrade Path - Legacy Service) */,
);
name = "FB XMPP";
sourceTree = "<group>";
@@ -9839,7 +9810,6 @@
345D68990F1FD56B002F2D01 /* facebook.png in Resources */,
345D689A0F1FD56B002F2D01 /* facebook-small.png in Resources */,
1150A9960FBE48D600E0BD31 /* ESIRCAccountView.nib in Resources */,
- 1125DD3C0FF5A5D600544B92 /* PurpleFacebookAccountView.nib in Resources */,
5A37D9091308A0B2000CE634 /* f_logo.png in Resources */,
5A37D90A1308A0B7000CE634 /* f_logo_small.png in Resources */,
);
@@ -11116,40 +11086,6 @@
name = "Shared Dock Icon Images";
sourceTree = "<group>";
};
- 1125DD3B0FF5A5D600544B92 /* PurpleFacebookAccountView.nib */ = {
- isa = PBXVariantGroup;
- children = (
- 1125DD380FF5A58F00544B92 /* English */,
- 1125DD3D0FF5A5DB00544B92 /* ca */,
- 1125DD3E0FF5A5DD00544B92 /* cs */,
- 1125DD3F0FF5A5DF00544B92 /* da */,
- 1125DD400FF5A5E100544B92 /* de */,
- 1125DD410FF5A5E300544B92 /* el_GR */,
- 1125DD420FF5A5E500544B92 /* en_GB */,
- 1125DD430FF5A5E700544B92 /* es */,
- 1125DD440FF5A5E900544B92 /* fi */,
- 1125DD450FF5A5EC00544B92 /* fr */,
- 1125DD460FF5A5EE00544B92 /* fr_CA */,
- 1125DD470FF5A5F000544B92 /* hu */,
- 1125DD480FF5A5F200544B92 /* is */,
- 1125DD490FF5A5F400544B92 /* it */,
- 1125DD4A0FF5A5F600544B92 /* ja */,
- 1125DD4B0FF5A5F800544B92 /* nb */,
- 1125DD4C0FF5A5FA00544B92 /* nl */,
- 1125DD4D0FF5A5FB00544B92 /* pl */,
- 1125DD4E0FF5A5FD00544B92 /* pt_PT */,
- 1125DD4F0FF5A5FF00544B92 /* pt */,
- 1125DD500FF5A60100544B92 /* ru */,
- 1125DD510FF5A60300544B92 /* sl */,
- 1125DD520FF5A60500544B92 /* sv */,
- 1125DD530FF5A60700544B92 /* tr */,
- 1125DD540FF5A60900544B92 /* zh_CN */,
- 1125DD550FF5A60B00544B92 /* zh_TW */,
- D1F4FD7611DFE8DF00796027 /* sk_SK */,
- );
- name = PurpleFacebookAccountView.nib;
- sourceTree = "<group>";
- };
1150A9950FBE48D600E0BD31 /* ESIRCAccountView.nib */ = {
isa = PBXVariantGroup;
children = (
diff -r 7e2f115c4422 -r 9e53b161122a Frameworks/Adium Framework/Source/AIAccountControllerProtocol.h
--- a/Frameworks/Adium Framework/Source/AIAccountControllerProtocol.h Fri Jun 24 16:04:07 2011 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccountControllerProtocol.h Fri Jun 24 17:04:11 2011 -0500
@@ -165,6 +165,22 @@
- (NSUInteger)moveAccount:(AIAccount *)account toIndex:(NSUInteger)destIndex;
- (void)accountDidChangeUID:(AIAccount *)inAccount;
+/*!
+ * @brief Change an account's current and future service
+ *
+ * This should only be used by an AIAccount to upgrade itself to a new service, as may happen when
+ * transitioning from one implementation to another.
+ *
+ * Generally, this is not necessary, as migration can be performed by simply substituting the new service ID
+ * for the old one in -[AdiumAccounts _upgradeServiceID:forAccountDict:]. However, if that is insufficient,
+ * because for example some processing must be done with information from both old and new accounts,
+ * this may be useful for performing a move at runtime.
+ *
+ * It will save the change; account immediately becomes on service, and it will be on service when it is
+ * next loaded.
+ */
+- (void)moveAccount:(AIAccount *)account toService:(AIService *)service;
+
//Preferred Accounts
- (AIAccount *)preferredAccountForSendingContentType:(NSString *)inType toContact:(AIListContact *)inContact;
diff -r 7e2f115c4422 -r 9e53b161122a Frameworks/Adium Framework/Source/AIListObject.h
--- a/Frameworks/Adium Framework/Source/AIListObject.h Fri Jun 24 16:04:07 2011 -0500
+++ b/Frameworks/Adium Framework/Source/AIListObject.h Fri Jun 24 17:04:11 2011 -0500
@@ -101,7 +101,7 @@
//Identifying information
@property (readonly, nonatomic) NSString *UID;
- at property (readonly, nonatomic) AIService *service;
+ at property (readonly, assign, nonatomic) AIService *service;
@property (readonly, nonatomic) NSString *internalObjectID;
+ (NSString *)internalObjectIDForServiceID:(NSString *)inServiceID UID:(NSString *)inUID;
diff -r 7e2f115c4422 -r 9e53b161122a Frameworks/Adium Framework/Source/AIListObject.m
--- a/Frameworks/Adium Framework/Source/AIListObject.m Fri Jun 24 16:04:07 2011 -0500
+++ b/Frameworks/Adium Framework/Source/AIListObject.m Fri Jun 24 17:04:11 2011 -0500
@@ -38,6 +38,9 @@
- (void)setContainingGroup:(AIListGroup *)inGroup;
- (void)setupObservedValues;
- (void)updateOrderCache;
+
+ at property (nonatomic, assign) AIService *service;
+
@end
/*!
diff -r 7e2f115c4422 -r 9e53b161122a Plugins/Purple Service/AIFacebookXMPPAccount.h
--- a/Plugins/Purple Service/AIFacebookXMPPAccount.h Fri Jun 24 16:04:07 2011 -0500
+++ b/Plugins/Purple Service/AIFacebookXMPPAccount.h Fri Jun 24 17:04:11 2011 -0500
@@ -30,7 +30,6 @@
@interface AIFacebookXMPPAccount : CBPurpleAccount {
AIFacebookXMPPOAuthWebViewWindowController *oAuthWC;
- AIAccount *migratingAccount; // weak
NSString *oAuthToken;
NSUInteger networkState;
@@ -38,12 +37,21 @@
NSURLConnection *connection; // weak
NSURLResponse *connectionResponse;
NSMutableData *connectionData;
+
+ NSDictionary *migrationData;
}
+ (BOOL)uidIsValidForFacebook:(NSString *)inUID;
@property (nonatomic, retain) AIFacebookXMPPOAuthWebViewWindowController *oAuthWC;
- at property (nonatomic, assign) AIAccount *migratingAccount;
- (void)requestFacebookAuthorization;
+
- (void)oAuthWebViewController:(AIFacebookXMPPOAuthWebViewWindowController *)wc didSucceedWithToken:(NSString *)token;
+- (void)oAuthWebViewControllerDidFail:(AIFacebookXMPPOAuthWebViewWindowController *)wc;
+
+ at property (nonatomic, retain) NSDictionary *migrationData;
@end
+
+ at interface AIFacebookXMPPAccount (ForSubclasses)
+- (void)didCompleteFacebookAuthorization;
+ at end
diff -r 7e2f115c4422 -r 9e53b161122a Plugins/Purple Service/AIFacebookXMPPAccount.m
--- a/Plugins/Purple Service/AIFacebookXMPPAccount.m Fri Jun 24 16:04:07 2011 -0500
+++ b/Plugins/Purple Service/AIFacebookXMPPAccount.m Fri Jun 24 17:04:11 2011 -0500
@@ -23,8 +23,6 @@
#import <Adium/AIAccountControllerProtocol.h>
#import <Adium/AIPasswordPromptController.h>
-#import <Adium/AILoginControllerProtocol.h>
-#import <AIUtilities/AIStringAdditions.h>
#import <Adium/AIService.h>
enum {
@@ -34,7 +32,6 @@
};
@interface AIFacebookXMPPAccount ()
-- (void)finishMigration;
@property (nonatomic, copy) NSString *oAuthToken;
@property (nonatomic, assign) NSUInteger networkState;
@@ -49,7 +46,7 @@
@implementation AIFacebookXMPPAccount
@synthesize oAuthWC;
- at synthesize migratingAccount;
+ at synthesize migrationData;
@synthesize oAuthToken;
@synthesize networkState, connection, connectionResponse, connectionData;
@@ -251,16 +248,19 @@
userInfo:
[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:AIFacebookXMPPAuthProgressPromptingUser]
forKey:KEY_FB_XMPP_AUTH_STEP]];
- if (self.migratingAccount) {
- /* We're migrating from an entirely separate AIAccount (an old, http-based Facebook account) to this one */
- self.oAuthWC.autoFillUsername = self.migratingAccount.UID;
- self.oAuthWC.autoFillPassword = [adium.accountController passwordForAccount:self.migratingAccount];
- [self.oAuthWC.window setTitle:[NSString stringWithFormat:AILocalizedString(@"Migrating %@", nil), self.migratingAccount.UID]];
-
- } else if (![[self class] uidIsValidForFacebook:self.UID]) {
- /* We have a UID which isn't a Facebook numeric username. That can come from the setup wizard, for example. */
+
+ if (![[self class] uidIsValidForFacebook:self.UID]) {
+ /* We have a UID which isn't a Facebook numeric username. That can come from:
+ * 1. The setup wizard
+ * 2. Facebook-HTTP account from Adium <= 1.4.2
+ */
self.oAuthWC.autoFillUsername = self.UID;
self.oAuthWC.autoFillPassword = [adium.accountController passwordForAccount:self];
+
+ self.migrationData = [NSDictionary dictionaryWithObjectsAndKeys:
+ self.UID, @"originalUID",
+ self.service.serviceID, @"originalServiceID",
+ nil];
}
[self.oAuthWC showWindow:self];
@@ -334,6 +334,19 @@
forKey:KEY_FB_XMPP_AUTH_STEP]];
}
+- (void)didCompleteFacebookAuthorization
+{
+ /* Restart the connect process; we're currently considered 'connecting', so passwordReturnedForConnect:::
+ * isn't going to restart it for us. */
+ [self connect];
+
+ [[NSNotificationCenter defaultCenter] postNotificationName:AIFacebookXMPPAuthProgressNotification
+ object:self
+ userInfo:
+ [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:AIFacebookXMPPAuthProgressSuccess]
+ forKey:KEY_FB_XMPP_AUTH_STEP]];
+}
+
- (void)promoteSessionDidFinishLoading:(NSData *)secretData response:(NSURLResponse *)response error:(NSError *)inError
{
if (inError) {
@@ -342,9 +355,6 @@
return;
}
- NSString *sessionKey = [[[self oAuthToken] componentsSeparatedByString:@"|"] objectAtIndex:1];
-
- [[adium accountController] setPassword:sessionKey forAccount:self];
/* Uncomment the below to store the Session Secret in the keychain. It doesn't seem to be used.
@@ -362,27 +372,19 @@
keychainItem:NULL
error:NULL];
*/
- self.oAuthWC = nil;
- self.oAuthToken = nil;
-
+
+ NSString *sessionKey = [[[self oAuthToken] componentsSeparatedByString:@"|"] objectAtIndex:1];
+ [[adium accountController] setPassword:sessionKey forAccount:self];
+
/* When we're newly authorized, connect! */
[self passwordReturnedForConnect:sessionKey
returnCode:AIPasswordPromptOKReturn
context:nil];
-
- /* Restart the connect process; we're currently considered 'connecting', so passwordReturnedForConnect:::
- * isn't going to restart it for us. */
- [self connect];
-
- if (self.migratingAccount) {
- [self finishMigration];
- }
-
- [[NSNotificationCenter defaultCenter] postNotificationName:AIFacebookXMPPAuthProgressNotification
- object:self
- userInfo:
- [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:AIFacebookXMPPAuthProgressSuccess]
- forKey:KEY_FB_XMPP_AUTH_STEP]];
+
+ [self didCompleteFacebookAuthorization];
+
+ self.oAuthWC = nil;
+ self.oAuthToken = nil;
}
#pragma mark NSURLConnectionDelegate
@@ -432,56 +434,4 @@
}
}
-#pragma mark Migration
-/*
- * Move logs from the old account's to the new account's log folder, changing the name along the way.
- * Finally delete the old account.
- */
-- (void)finishMigration
-{
- if (!self.migratingAccount)
- return;
-
- //Move logs to the new account
- NSString *logsDir = [[adium.loginController userDirectory] stringByAppendingPathComponent:@"/Logs"];
-
- NSString *oldFolder = [NSString stringWithFormat:@"%@.%@", self.migratingAccount.service.serviceID, [self.migratingAccount.UID safeFilenameString]];
- NSString *newFolder = [NSString stringWithFormat:@"%@.%@", self.service.serviceID, [self.UID safeFilenameString]];
- NSString *basePath = [[logsDir stringByAppendingPathComponent:oldFolder] stringByExpandingTildeInPath];
- NSString *newPath = [[logsDir stringByAppendingPathComponent:newFolder] stringByExpandingTildeInPath];
-
- NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease];
- NSInteger errors = 0;
-
- for (NSString *file in [fileManager enumeratorAtPath:basePath]) {
- if ([[file pathExtension] isEqualToString:@"xml"]) {
- /* turn 'XXXXXXX69 (2009-01-20T19.10.07-0500).xml'
- * into '-XXXXXXX69 at chat.facebook.com (2009-01-20T19.10.07-0500).xml'
- */
- NSRange UIDrange = [[file lastPathComponent] rangeOfString:@" "];
- if (UIDrange.location > 0) {
- NSString *uid = [[file lastPathComponent] substringToIndex:UIDrange.location];
- NSString *newName = [file stringByReplacingOccurrencesOfString:uid
- withString:[NSString stringWithFormat:@"-%@@%@", uid, self.host]];
-
- [fileManager createDirectoryAtPath:[newPath stringByAppendingPathComponent:[newName stringByDeletingLastPathComponent]]
- withIntermediateDirectories:YES
- attributes:nil
- error:NULL];
- if (![fileManager moveItemAtPath:[basePath stringByAppendingPathComponent:file]
- toPath:[newPath stringByAppendingPathComponent:newName]
- error:NULL])
- errors++;
- }
- }
- }
-
- if (!errors)
- [fileManager removeItemAtPath:basePath error:NULL];
-
- //Delete old account
- [adium.accountController deleteAccount:self.migratingAccount];
- self.migratingAccount = nil;
-}
-
@end
diff -r 7e2f115c4422 -r 9e53b161122a Plugins/Purple Service/AIFacebookXMPPAccountView.xib
--- a/Plugins/Purple Service/AIFacebookXMPPAccountView.xib Fri Jun 24 16:04:07 2011 -0500
+++ b/Plugins/Purple Service/AIFacebookXMPPAccountView.xib Fri Jun 24 17:04:11 2011 -0500
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
- <int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">10J567</string>
- <string key="IBDocument.InterfaceBuilderVersion">1305</string>
+ <int key="IBDocument.SystemTarget">1060</int>
+ <string key="IBDocument.SystemVersion">10J4138</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1864</string>
<string key="IBDocument.AppKitVersion">1038.35</string>
- <string key="IBDocument.HIToolboxVersion">462.00</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">1305</string>
+ <string key="NS.object.0">1864</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -25,11 +25,8 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys" id="0">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <reference key="dict.values" ref="0"/>
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -50,14 +47,15 @@
<object class="NSTextField" id="511623407">
<reference key="NSNextResponder" ref="610496814"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{8, 164}, {378, 34}}</string>
+ <string key="NSFrame">{{8, 147}, {378, 51}}</string>
<reference key="NSSuperview" ref="610496814"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="290214125"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="12458334">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">272891904</int>
- <string key="NSContents">To connect you must first allow Adium to have access to your account.</string>
+ <string key="NSContents">To connect to Facebook Chat, you must give Adium permission. A secure Facebook login screen will be shown when you click Allow Access.</string>
<object class="NSFont" key="NSSupport" id="568567493">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
@@ -87,8 +85,9 @@
<object class="NSTextField" id="444720455">
<reference key="NSNextResponder" ref="610496814"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{8, 0}, {378, 117}}</string>
+ <string key="NSFrame">{{8, 22}, {347, 17}}</string>
<reference key="NSSuperview" ref="610496814"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="901696267"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1047490784">
@@ -104,8 +103,9 @@
<object class="NSButton" id="290214125">
<reference key="NSNextResponder" ref="610496814"/>
<int key="NSvFlags">269</int>
- <string key="NSFrame">{{118, 128}, {157, 32}}</string>
+ <string key="NSFrame">{{119, 99}, {157, 32}}</string>
<reference key="NSSuperview" ref="610496814"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="444720455"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="119278707">
@@ -130,103 +130,29 @@
<reference key="NSNextResponder" ref="610496814"/>
<int key="NSvFlags">-2147482356</int>
<object class="NSPSMatrix" key="NSDrawMatrix"/>
- <string key="NSFrame">{{189, 100}, {16, 16}}</string>
+ <string key="NSFrame">{{189, 71}, {16, 16}}</string>
<reference key="NSSuperview" ref="610496814"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<int key="NSpiFlags">20746</int>
<double key="NSMinValue">16</double>
<double key="NSMaxValue">100</double>
</object>
- </object>
- <string key="NSFrameSize">{394, 201}</string>
- <reference key="NSSuperview"/>
- <reference key="NSNextKeyView" ref="511623407"/>
- </object>
- <object class="NSView" id="1063351425">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">256</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTextField" id="989334992">
- <reference key="NSNextResponder" ref="1063351425"/>
+ <object class="NSButton" id="249247989">
+ <reference key="NSNextResponder" ref="610496814"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{8, 147}, {378, 51}}</string>
- <reference key="NSSuperview" ref="1063351425"/>
- <reference key="NSNextKeyView" ref="439253191"/>
+ <string key="NSFrame">{{361, 16}, {25, 25}}</string>
+ <reference key="NSSuperview" ref="610496814"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="334008518">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">272891904</int>
- <string key="NSContents">Your Facebook account is not set up to connect using the official and recommended way. In order to change this you will need to allow Adium access to your Facebook account.</string>
- <reference key="NSSupport" ref="568567493"/>
- <reference key="NSControlView" ref="989334992"/>
- <reference key="NSBackgroundColor" ref="43977286"/>
- <reference key="NSTextColor" ref="240581497"/>
- </object>
- </object>
- <object class="NSTextField" id="969197541">
- <reference key="NSNextResponder" ref="1063351425"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{8, -30}, {378, 117}}</string>
- <reference key="NSSuperview" ref="1063351425"/>
- <reference key="NSNextKeyView" ref="946119758"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="363377028">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">272891904</int>
- <string key="NSContents">Current status information will go here.</string>
- <reference key="NSSupport" ref="568567493"/>
- <reference key="NSControlView" ref="969197541"/>
- <reference key="NSBackgroundColor" ref="43977286"/>
- <reference key="NSTextColor" ref="240581497"/>
- </object>
- </object>
- <object class="NSButton" id="663042750">
- <reference key="NSNextResponder" ref="1063351425"/>
- <int key="NSvFlags">269</int>
- <string key="NSFrame">{{223, 99}, {157, 32}}</string>
- <reference key="NSSuperview" ref="1063351425"/>
- <reference key="NSNextKeyView" ref="969197541"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="773075235">
+ <object class="NSButtonCell" key="NSCell" id="691241873">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
- <string key="NSContents">Allow Access</string>
+ <string key="NSContents"/>
<reference key="NSSupport" ref="25279989"/>
- <reference key="NSControlView" ref="663042750"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">129</int>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSProgressIndicator" id="946119758">
- <reference key="NSNextResponder" ref="1063351425"/>
- <int key="NSvFlags">-2147482356</int>
- <object class="NSPSMatrix" key="NSDrawMatrix"/>
- <string key="NSFrame">{{189, 71}, {16, 16}}</string>
- <reference key="NSSuperview" ref="1063351425"/>
- <int key="NSpiFlags">20746</int>
- <double key="NSMinValue">16</double>
- <double key="NSMaxValue">100</double>
- </object>
- <object class="NSButton" id="439253191">
- <reference key="NSNextResponder" ref="1063351425"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{14, 99}, {150, 32}}</string>
- <reference key="NSSuperview" ref="1063351425"/>
- <reference key="NSNextKeyView" ref="663042750"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="1064574215">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">134217728</int>
- <string key="NSContents">More Information</string>
- <reference key="NSSupport" ref="25279989"/>
- <reference key="NSControlView" ref="439253191"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">129</int>
+ <reference key="NSControlView" ref="249247989"/>
+ <int key="NSButtonFlags">-2038415105</int>
+ <int key="NSButtonFlags2">161</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
@@ -236,7 +162,8 @@
</object>
<string key="NSFrameSize">{394, 201}</string>
<reference key="NSSuperview"/>
- <reference key="NSNextKeyView" ref="989334992"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="511623407"/>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -282,77 +209,15 @@
</object>
<int key="connectionID">55</int>
</object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">view_migration</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="1063351425"/>
- </object>
- <int key="connectionID">87</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">textField_migratioStatus</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="969197541"/>
- </object>
- <int key="connectionID">88</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">textField_migrationStatus</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="969197541"/>
- </object>
- <int key="connectionID">89</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">changedPreference:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="439253191"/>
- </object>
- <int key="connectionID">90</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">changedPreference:</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="663042750"/>
- </object>
- <int key="connectionID">91</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">button_migrationHelp</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="439253191"/>
- </object>
- <int key="connectionID">92</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">button_migrationOAuthStart</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="663042750"/>
- </object>
- <int key="connectionID">93</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">migrationSpinner</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="946119758"/>
- </object>
- <int key="connectionID">94</int>
- </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
- <reference key="object" ref="0"/>
+ <object class="NSArray" key="object" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
@@ -380,9 +245,10 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="511623407"/>
- <reference ref="444720455"/>
<reference ref="290214125"/>
<reference ref="901696267"/>
+ <reference ref="249247989"/>
+ <reference ref="444720455"/>
</object>
<reference key="parent" ref="0"/>
<string key="objectName">Setup</string>
@@ -435,79 +301,18 @@
<reference key="parent" ref="511623407"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">77</int>
- <reference key="object" ref="1063351425"/>
+ <int key="objectID">95</int>
+ <reference key="object" ref="249247989"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="946119758"/>
- <reference ref="969197541"/>
- <reference ref="989334992"/>
- <reference ref="663042750"/>
- <reference ref="439253191"/>
+ <reference ref="691241873"/>
</object>
- <reference key="parent" ref="0"/>
- <string key="objectName">Migration</string>
+ <reference key="parent" ref="610496814"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">78</int>
- <reference key="object" ref="946119758"/>
- <reference key="parent" ref="1063351425"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">79</int>
- <reference key="object" ref="969197541"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="363377028"/>
- </object>
- <reference key="parent" ref="1063351425"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">80</int>
- <reference key="object" ref="989334992"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="334008518"/>
- </object>
- <reference key="parent" ref="1063351425"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">81</int>
- <reference key="object" ref="663042750"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="773075235"/>
- </object>
- <reference key="parent" ref="1063351425"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">82</int>
- <reference key="object" ref="439253191"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1064574215"/>
- </object>
- <reference key="parent" ref="1063351425"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">83</int>
- <reference key="object" ref="1064574215"/>
- <reference key="parent" ref="439253191"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">84</int>
- <reference key="object" ref="773075235"/>
- <reference key="parent" ref="663042750"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">85</int>
- <reference key="object" ref="334008518"/>
- <reference key="parent" ref="989334992"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">86</int>
- <reference key="object" ref="363377028"/>
- <reference key="parent" ref="969197541"/>
+ <int key="objectID">96</int>
+ <reference key="object" ref="691241873"/>
+ <reference key="parent" ref="249247989"/>
</object>
</object>
</object>
@@ -518,67 +323,27 @@
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
- <string>43.IBEditorWindowLastContentRect</string>
<string>43.IBPluginDependency</string>
- <string>43.ImportedFromIB2</string>
<string>44.IBPluginDependency</string>
- <string>44.ImportedFromIB2</string>
<string>45.IBPluginDependency</string>
- <string>45.ImportedFromIB2</string>
<string>46.IBPluginDependency</string>
- <string>46.ImportedFromIB2</string>
<string>47.IBPluginDependency</string>
- <string>47.ImportedFromIB2</string>
<string>48.IBPluginDependency</string>
<string>49.IBPluginDependency</string>
<string>50.IBPluginDependency</string>
- <string>77.IBEditorWindowLastContentRect</string>
- <string>77.IBPluginDependency</string>
- <string>77.ImportedFromIB2</string>
- <string>78.IBPluginDependency</string>
- <string>78.ImportedFromIB2</string>
- <string>79.IBPluginDependency</string>
- <string>79.ImportedFromIB2</string>
- <string>80.IBPluginDependency</string>
- <string>80.ImportedFromIB2</string>
- <string>81.IBPluginDependency</string>
- <string>81.ImportedFromIB2</string>
- <string>82.IBPluginDependency</string>
- <string>83.IBPluginDependency</string>
- <string>84.IBPluginDependency</string>
- <string>85.IBPluginDependency</string>
- <string>86.IBPluginDependency</string>
+ <string>95.IBPluginDependency</string>
+ <string>96.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{663, 648}, {394, 201}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{663, 648}, {394, 201}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -598,15 +363,11 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">94</int>
+ <int key="maxID">96</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
- <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
- <integer value="1050" key="NS.object.0"/>
- </object>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
diff -r 7e2f115c4422 -r 9e53b161122a Plugins/Purple Service/AIFacebookXMPPAccountViewController.h
--- a/Plugins/Purple Service/AIFacebookXMPPAccountViewController.h Fri Jun 24 16:04:07 2011 -0500
+++ b/Plugins/Purple Service/AIFacebookXMPPAccountViewController.h Fri Jun 24 17:04:11 2011 -0500
@@ -11,23 +11,16 @@
@interface AIFacebookXMPPAccountViewController : PurpleAccountViewController {
NSButton *button_OAuthStart;
- NSView *view_migration;
- NSTextField *textField_migrationStatus;
- NSButton *button_migrationHelp;
- NSButton *button_migrationOAuthStart;
- NSProgressIndicator *migrationSpinner;
NSTextField *textField_OAuthStatus;
NSProgressIndicator *spinner;
+
+ NSButton *button_help;
}
@property (assign) IBOutlet NSProgressIndicator *spinner;
@property (assign) IBOutlet NSTextField *textField_OAuthStatus;
@property (assign) IBOutlet NSButton *button_OAuthStart;
- at property (assign) IBOutlet NSView *view_migration;
- at property (assign) IBOutlet NSTextField *textField_migrationStatus;
- at property (assign) IBOutlet NSButton *button_migrationHelp;
- at property (assign) IBOutlet NSButton *button_migrationOAuthStart;
- at property (assign) IBOutlet NSProgressIndicator *migrationSpinner;
+- (IBAction)showHelp:(id)sender;
@end
diff -r 7e2f115c4422 -r 9e53b161122a Plugins/Purple Service/AIFacebookXMPPAccountViewController.m
--- a/Plugins/Purple Service/AIFacebookXMPPAccountViewController.m Fri Jun 24 16:04:07 2011 -0500
+++ b/Plugins/Purple Service/AIFacebookXMPPAccountViewController.m Fri Jun 24 17:04:11 2011 -0500
@@ -12,8 +12,10 @@
#import <Adium/AIAccountControllerProtocol.h>
#import <AIUtilities/AIStringAdditions.h>
+#import "PurpleFacebookAccount.h"
+
@implementation AIFacebookXMPPAccountViewController
- at synthesize view_migration, textField_migrationStatus, button_migrationHelp, button_migrationOAuthStart, migrationSpinner;
+
@synthesize spinner, textField_OAuthStatus, button_OAuthStart;
- (void)dealloc
@@ -33,10 +35,7 @@
}
- (NSView *)setupView
-{
- if ([(AIFacebookXMPPAccount *)account migratingAccount])
- return view_migration;
-
+{
return view_setup;
}
@@ -102,14 +101,18 @@
*/
- (IBAction)changedPreference:(id)sender
{
- if (sender == button_OAuthStart || sender == button_migrationOAuthStart) {
+ if (sender == button_OAuthStart) {
[(AIFacebookXMPPAccount *)account requestFacebookAuthorization];
[button_OAuthStart setEnabled:NO];
- } else if (sender == button_migrationHelp) {
- [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://trac.adium.im/wiki/FacebookChat"]];
} else
[super changedPreference:sender];
}
+/* xxx it'd be better to link to an entry in our docs */
+- (IBAction)showHelp:(id)sender
+{
+ [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://trac.adium.im/wiki/FacebookChat"]];
+}
+
@end
diff -r 7e2f115c4422 -r 9e53b161122a Plugins/Purple Service/AIFacebookXMPPService.h
--- a/Plugins/Purple Service/AIFacebookXMPPService.h Fri Jun 24 16:04:07 2011 -0500
+++ b/Plugins/Purple Service/AIFacebookXMPPService.h Fri Jun 24 17:04:11 2011 -0500
@@ -8,6 +8,8 @@
#import "PurpleService.h"
+#define FACEBOOK_XMPP_SERVICE_ID @"FBXMPP"
+
@interface AIFacebookXMPPService : PurpleService {
}
diff -r 7e2f115c4422 -r 9e53b161122a Plugins/Purple Service/AIFacebookXMPPService.m
--- a/Plugins/Purple Service/AIFacebookXMPPService.m Fri Jun 24 16:04:07 2011 -0500
+++ b/Plugins/Purple Service/AIFacebookXMPPService.m Fri Jun 24 17:04:11 2011 -0500
@@ -54,15 +54,15 @@
}
- (NSString *)serviceCodeUniqueID{
- return @"FBXMPP";
+ return FACEBOOK_XMPP_SERVICE_ID;
}
- (NSString *)serviceID{
- return @"FBXMPP";
+ return FACEBOOK_XMPP_SERVICE_ID;
}
- (NSString *)serviceClass{
- return @"FBXMPP";
+ return @"Facebook";
}
- (NSString *)shortDescription{
@@ -73,6 +73,11 @@
return @"Facebook (XMPP)";
}
+- (BOOL)isSocialNetworkingService
+{
+ return YES;
+}
More information about the commits
mailing list