adium-1.4 2763:dea3ff874bf1: Revert the language-grabbing behavi...
commits at adium.im
commits at adium.im
Mon Nov 9 19:14:36 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/dea3ff874bf1
revision: 2763:dea3ff874bf1
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.
Subject: adium-1.4 2764:4b03c62063a5: Apply focus classes to all tracked content. Refs #1335.
details: http://hg.adium.im/adium-1.4/rev/4b03c62063a5
revision: 2764:4b03c62063a5
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.
diffs (67 lines):
diff -r f0210f3bd788 -r 4b03c62063a5 Plugins/WebKit Message View/AIWebKitMessageViewController.m
--- a/Plugins/WebKit Message View/AIWebKitMessageViewController.m Sun Nov 08 12:33:35 2009 -0500
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewController.m Mon Nov 09 14:14:32 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 f0210f3bd788 -r 4b03c62063a5 Source/OWSpellingPerContactPlugin.m
--- a/Source/OWSpellingPerContactPlugin.m Sun Nov 08 12:33:35 2009 -0500
+++ b/Source/OWSpellingPerContactPlugin.m Mon Nov 09 14:14:32 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 = [[preferredLanguages objectAtIndex:0] retain];
+ break;
+ }
}
}
More information about the commits
mailing list