adium-1.4 3047:9742c064d31e: Initiate Chat is a menu item on mul...
commits at adium.im
commits at adium.im
Mon Sep 20 03:44:51 UTC 2010
details: http://hg.adium.im/adium-1.4/rev/9742c064d31e
revision: 3047:9742c064d31e
author: Evan Schoenberg
date: Sun Sep 19 22:44:41 2010 -0500
Initiate Chat is a menu item on multiple prpls (notably MSN and Google Talk via XMPP, on first blush), so move its localization substitution to the superclass
diffs (39 lines):
diff -r 4fc410bdfaf4 -r 9742c064d31e Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m Sun Sep 19 22:40:24 2010 -0500
+++ b/Plugins/Purple Service/CBPurpleAccount.m Sun Sep 19 22:44:41 2010 -0500
@@ -2775,12 +2775,17 @@
//Subclasses may override to provide a localized label and/or prevent a specified label from being shown
- (NSString *)titleForContactMenuLabel:(const char *)label forContact:(AIListContact *)inContact
{
- /* Remove the underscore 'hints' which libpurple includes for gtk usage */
- return [[NSString stringWithUTF8String:label] stringByReplacingOccurrencesOfString:@"_" withString:@""];
+ if ((strcmp(label, _("Initiate Chat")) == 0) || (strcmp(label, _("Initiate _Chat")) == 0)) {
+ return [NSString stringWithFormat:AILocalizedString(@"Initiate Multiuser Chat with %@",nil), inContact.formattedUID];
+
+ } else {
+ /* Remove the underscore 'hints' which libpurple includes for gtk usage */
+ return [[NSString stringWithUTF8String:label] stringByReplacingOccurrencesOfString:@"_" withString:@""];
+ }
}
/*!
-* @brief Menu items for the account's actions
+ * @brief Menu items for the account's actions
*
* Returns an array of menu items for account-specific actions. This is the best place to add protocol-specific
* actions that aren't otherwise supported by Adium. It will only be queried if the account is online.
diff -r 4fc410bdfaf4 -r 9742c064d31e Plugins/Purple Service/ESPurpleMSNAccount.m
--- a/Plugins/Purple Service/ESPurpleMSNAccount.m Sun Sep 19 22:40:24 2010 -0500
+++ b/Plugins/Purple Service/ESPurpleMSNAccount.m Sun Sep 19 22:44:41 2010 -0500
@@ -531,10 +531,7 @@
#pragma mark Contact List Menu Items
- (NSString *)titleForContactMenuLabel:(const char *)label forContact:(AIListContact *)inContact
{
- if ((strcmp(label, _("Initiate Chat")) == 0) || (strcmp(label, _("Initiate _Chat")) == 0)) {
- return [NSString stringWithFormat:AILocalizedString(@"Initiate Multiuser Chat with %@",nil),inContact.formattedUID];
-
- } else if (strcmp(label, _("Send to Mobile")) == 0) {
+ if (strcmp(label, _("Send to Mobile")) == 0) {
return [NSString stringWithFormat:AILocalizedString(@"Send to %@'s Mobile",nil),inContact.formattedUID];
}
More information about the commits
mailing list