adium-1.4 2911:f211430a455e: Enable the header control when ther...

commits at adium.im commits at adium.im
Wed Mar 17 02:26:05 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/f211430a455e
revision:	2911:f211430a455e
author:		Frank Dowsett <wixardy at adium.im>
date:		Tue Mar 16 22:14:34 2010 -0400

Enable the header control when there's a topic or a header and "Use regular chat style settings" is enabled. Fixes #13791
(transplanted from d7fe2ee7d9b1a0d3e83ed73053e8866c9cc958a2)

diffs (24 lines):

diff -r 1bcb24fe3222 -r f211430a455e Plugins/WebKit Message View/ESWebKitMessageViewPreferences.m
--- a/Plugins/WebKit Message View/ESWebKitMessageViewPreferences.m	Tue Mar 16 06:35:39 2010 -0400
+++ b/Plugins/WebKit Message View/ESWebKitMessageViewPreferences.m	Tue Mar 16 22:14:34 2010 -0400
@@ -337,8 +337,9 @@
 - (void)configureControlDimming
 {	
 	// Controls are enabled if we're the regular chat tab, or we're not using regular preferences.
-	BOOL anyControlsEnabled = (self.currentTab == AIWebkitRegularChat || ![[adium.preferenceController preferenceForKey:KEY_WEBKIT_USE_REGULAR_PREFERENCES
-																			group:self.preferenceGroupForCurrentTab] boolValue]);
+	BOOL useRegularPreferences = [[adium.preferenceController preferenceForKey:KEY_WEBKIT_USE_REGULAR_PREFERENCES
+																		 group:PREF_GROUP_WEBKIT_GROUP_MESSAGE_DISPLAY] boolValue];
+	BOOL anyControlsEnabled = (self.currentTab == AIWebkitRegularChat || !useRegularPreferences);
 	
 	// General controls with no other qualifiers.
 	[popUp_styles setEnabled:anyControlsEnabled];
@@ -366,7 +367,7 @@
 	if (self.currentTab == AIWebkitGroupChat)
 		[checkBox_showHeader setEnabled:[messageStyle hasTopic] && anyControlsEnabled];
 	else
-		[checkBox_showHeader setEnabled:[messageStyle hasHeader] && anyControlsEnabled];
+		[checkBox_showHeader setEnabled:[messageStyle hasHeader] || ([messageStyle hasTopic] && useRegularPreferences)];
 	
 	//Disable user icon toggling if the style doesn't support them
 	[checkBox_showUserIcons setEnabled:[messageStyle allowsUserIcons] && anyControlsEnabled];



More information about the commits mailing list