adium 2902:2911fea407a3: Revert the language-grabbing behavior f...
commits at adium.im
commits at adium.im
Mon Nov 9 19:16:23 UTC 2009
details: http://hg.adium.im/adium/rev/2911fea407a3
revision: 2902:2911fea407a3
author: Zachary West <zacw at adium.im>
date: Mon Nov 09 14:12:33 2009 -0500
Revert the language-grabbing behavior for 10.5, since it doesn't behave as expec
ted until 10.6. Fixes #13389.
-userPreferredLanguages and -availableLanguages work the same on 10.6, but that
doesn't appear to be the case on 10.5.
(transplanted from dea3ff874bf1f4d9b87cff7dcf40e7553d3f9655)
Subject: adium 2903:e39580ed382a: Apply focus classes to all tracked content. Refs #1335.
details: http://hg.adium.im/adium/rev/e39580ed382a
revision: 2903:e39580ed382a
author: Zachary West <zacw at adium.im>
date: Mon Nov 09 14:14:32 2009 -0500
Apply focus classes to all tracked content. Refs #1335.
(transplanted from 4b03c62063a55f8f1232b46496c3b88560125585)
Subject: adium 2904:32b94cf58806: Helpful to retain the correct language sometimes. Refs #13389.
details: http://hg.adium.im/adium/rev/32b94cf58806
revision: 2904:32b94cf58806
author: Zachary West <zacw at adium.im>
date: Mon Nov 09 14:15:48 2009 -0500
Helpful to retain the correct language sometimes. Refs #13389.
(transplanted from 9596a7e497075dd72b2f89c93a5257a76ef5f232)
diffs (67 lines):
diff -r ba9a84282496 -r 32b94cf58806 Plugins/WebKit Message View/AIWebKitMessageViewController.m
--- a/Plugins/WebKit Message View/AIWebKitMessageViewController.m Mon Nov 09 09:30:27 2009 -0800
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewController.m Mon Nov 09 14:15:48 2009 -0500
@@ -676,23 +676,26 @@
[topicElement setInnerHTML:[messageStyle completedTemplateForContent:content similar:similar]];
} else {
- // Mark the current location (the start of this element) if it's a mention.
- if (content.trackContent && [content.displayClasses containsObject:@"mention"]) {
- [self markCurrentLocation];
- }
-
- if (adium.interfaceController.activeChat != content.chat && [content.type isEqualToString:CONTENT_MESSAGE_TYPE]) {
- if (nextMessageFocus) {
- [self.markedScroller addMarkAt:[self.currentOffsetHeight integerValue] withIdentifier:@"focus" withColor:[NSColor redColor]];
-
- // Add a class for "first message to lose focus"
- [content addDisplayClass:@"firstFocus"];
-
- nextMessageFocus = NO;
+ if (content.trackContent) {
+ // Mark the current location (the start of this element) if it's a mention.
+ if ([content.displayClasses containsObject:@"mention"]) {
+ [self markCurrentLocation];
}
- // Add a class for "this message received while out of focus"
- [content addDisplayClass:@"focus"];
+ // Apply focus classes appropriately.
+ if (adium.interfaceController.activeChat != content.chat) {
+ if (nextMessageFocus) {
+ [self.markedScroller addMarkAt:[self.currentOffsetHeight integerValue] withIdentifier:@"focus" withColor:[NSColor redColor]];
+
+ // Add a class for "first content to lose focus"
+ [content addDisplayClass:@"firstFocus"];
+
+ nextMessageFocus = NO;
+ }
+
+ // Add a class for "this content received while out of focus"
+ [content addDisplayClass:@"focus"];
+ }
}
//Add the content object
diff -r ba9a84282496 -r 32b94cf58806 Source/OWSpellingPerContactPlugin.m
--- a/Source/OWSpellingPerContactPlugin.m Mon Nov 09 09:30:27 2009 -0800
+++ b/Source/OWSpellingPerContactPlugin.m Mon Nov 09 14:15:48 2009 -0500
@@ -56,11 +56,14 @@
if ([NSApp isOnSnowLeopardOrBetter]) {
preferredLanguages = [[NSSpellChecker sharedSpellChecker] userPreferredLanguages];
} else {
- preferredLanguages = [[NSSpellChecker sharedSpellChecker] availableLanguages];
+ preferredLanguages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"];
}
-
- if (preferredLanguages.count) {
- preferredLanguage = [preferredLanguages objectAtIndex:0];
+
+ for (NSString *language in preferredLanguages) {
+ if ([[NSSpellChecker sharedSpellChecker] setLanguage:language]) {
+ preferredLanguage = [language retain];
+ break;
+ }
}
}
More information about the commits
mailing list