adium-1.4 2805:9c32a9b78f76: Revert the "never use last saved st...
commits at adium.im
commits at adium.im
Mon Nov 23 22:02:28 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/9c32a9b78f76
revision: 2805:9c32a9b78f76
author: Zachary West <zacw at adium.im>
date: Mon Nov 23 17:02:25 2009 -0500
Revert the "never use last saved status" behavior. Re-fixes #6227.
The behavior was #ifdef'd out to appease MSN users, who wanted their status messages to propagate. Find some middle ground here: if a status message is currently set, a custom new-status window will retain it. Otherwise, it'll use the saved one. And we'll always use the last-saved status settings otherwise, so "autoreply" saving always works.
diffs (38 lines):
diff -r 32fc37922daf -r 9c32a9b78f76 Frameworks/Adium Framework/Source/AIStatusMenu.m
--- a/Frameworks/Adium Framework/Source/AIStatusMenu.m Mon Nov 23 16:38:26 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIStatusMenu.m Mon Nov 23 17:02:25 2009 -0500
@@ -400,7 +400,6 @@
baseStatusState = adium.statusController.activeStatusState;
}
-#ifdef USE_LAST_STATUS_OF_THIS_TYPE
/* If we are going to a custom state of a different type, we don't want to prefill with baseStatusState as it stands.
* Instead, we load the last used status of that type.
*/
@@ -411,17 +410,16 @@
AIStatus *lastStatusStateOfThisType = (lastStatusStateData ?
[NSKeyedUnarchiver unarchiveObjectWithData:lastStatusStateData] :
nil);
-
- baseStatusState = [[lastStatusStateOfThisType retain] autorelease];
+ if (lastStatusStateOfThisType) {
+ // Restore the current status message into this last-saved variety, since users tend want to keep them.
+ // If it doesn't exist, use the last-saved status message.
+ if (baseStatusState.statusMessage.length) {
+ lastStatusStateOfThisType.statusMessage = baseStatusState.statusMessage;
+ }
+
+ baseStatusState = [[lastStatusStateOfThisType retain] autorelease];
+ }
}
-
- /* Don't use the current status state as a base, and when going from Away to Available, don't autofill the Available
- * status message with the old away message.
- */
- if (baseStatusState.statusType != statusType) {
- baseStatusState = nil;
- }
-#endif
[AIEditStateWindowController editCustomState:baseStatusState
forType:statusType
More information about the commits
mailing list