adium-1.4 2835:1e8c89f99dfe: Simplify the "status message" conta...
commits at adium.im
commits at adium.im
Fri Nov 27 20:51:03 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/1e8c89f99dfe
revision: 2835:1e8c89f99dfe
author: Zachary West <zacw at adium.im>
date: Fri Nov 27 15:50:57 2009 -0500
Simplify the "status message" contact/account property into one getter method. Correct error -1728 from AS on contact's status messages. Fixes #13460.
The totally undocumented -1728 error appears to be caused by runtime type disagreeing with event type. "status message" is apparently assumed to only have 1 code, so specifying one for contacts and one for accounts was confusing it when it was going to fetch it.
diffs (77 lines):
diff -r e7db526620d1 -r 1e8c89f99dfe Frameworks/Adium Framework/Source/AIAccount.m
--- a/Frameworks/Adium Framework/Source/AIAccount.m Fri Nov 27 13:41:37 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccount.m Fri Nov 27 15:50:57 2009 -0500
@@ -1208,14 +1208,6 @@
}
/**
- * @brief Returns the current status message as rich text
- */
-- (NSTextStorage *)scriptingStatusMessage
-{
- return [[[NSTextStorage alloc] initWithAttributedString:self.statusState.statusMessage] autorelease];
-}
-
-/**
* @brief Returns a mutable status
*
* If the current status is built in, we create a temporary copy of the current status and set that.
diff -r e7db526620d1 -r 1e8c89f99dfe Frameworks/Adium Framework/Source/AIListContact.m
--- a/Frameworks/Adium Framework/Source/AIListContact.m Fri Nov 27 13:41:37 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIListContact.m Fri Nov 27 15:50:57 2009 -0500
@@ -873,6 +873,7 @@
containerSpecifier:containerRef key:@"contacts" name:self.UID] autorelease];
}
+
- (NSArray *)groupsAsArray
{
return self.groups.allObjects;
diff -r e7db526620d1 -r 1e8c89f99dfe Frameworks/Adium Framework/Source/AIListObject.m
--- a/Frameworks/Adium Framework/Source/AIListObject.m Fri Nov 27 13:41:37 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIListObject.m Fri Nov 27 15:50:57 2009 -0500
@@ -602,16 +602,6 @@
}
}
-- (NSString *)scriptingStatusMessage
-{
- return [self statusMessageString];
-}
-- (void)setScriptingStatusMessage:(NSString *)message
-{
- [[NSScriptCommand currentCommand] setScriptErrorNumber:errOSACantAssign];
- [[NSScriptCommand currentCommand] setScriptErrorString:@"Can't set the status of a contact."];
-}
-
- (void)setBaseAvailableStatusAndNotify:(NotifyTiming)notify
{
[self setStatusWithName:nil
@@ -826,6 +816,15 @@
}
return 0;
}
+
+/**
+ * @brief Returns the current status message as rich text
+ */
+- (NSTextStorage *)scriptingStatusMessage
+{
+ return [[[NSTextStorage alloc] initWithAttributedString:self.statusMessage] autorelease];
+}
+
@end
/*
diff -r e7db526620d1 -r 1e8c89f99dfe Resources/Adium.sdef
--- a/Resources/Adium.sdef Fri Nov 27 13:41:37 2009 -0500
+++ b/Resources/Adium.sdef Fri Nov 27 15:50:57 2009 -0500
@@ -227,7 +227,7 @@
<property name="status type" code="Psts" type="status types" access="r" description="The current status of this contact">
<cocoa key="scriptingStatusType" />
</property>
- <property name="status message" code="Psmg" type="rich text" access="r" description="The custom status message for this contact.">
+ <property name="status message" code="Pasm" type="rich text" access="r" description="The custom status message for this contact.">
<cocoa key="scriptingStatusMessage" />
</property>
<property name="image" code="Pimg" type="TIFF picture" access="rw" description="The image associated with this contact.">
More information about the commits
mailing list