adium 4251:8c28aa76cad0: Fix issue with user list not toggling c...
commits at adium.im
commits at adium.im
Tue Oct 25 08:22:58 UTC 2011
details: http://hg.adium.im/adium/rev/8c28aa76cad0
revision: 4251:8c28aa76cad0
branch: (none)
author: Stephen Holt <sholt at adium.im>
date: Tue Oct 25 01:22:42 2011 -0700
Fix issue with user list not toggling correctly in a previous commit.
diffs (71 lines):
diff -r c7060e64e8e8 -r 8c28aa76cad0 Plugins/Dual Window Interface/AIMessageViewController.m
--- a/Plugins/Dual Window Interface/AIMessageViewController.m Mon Oct 24 17:45:35 2011 -0700
+++ b/Plugins/Dual Window Interface/AIMessageViewController.m Tue Oct 25 01:22:42 2011 -0700
@@ -1256,7 +1256,7 @@
- (CGFloat)_userListViewDividerPositionIgnoringUserMinimum:(BOOL)ignoreUserMinimum
{
CGFloat splitViewWidth = splitView_verticalSplit.frame.size.width;
- CGFloat allowedWidth = (splitViewWidth / 2.0f) - [splitView_verticalSplit dividerThickness];
+ CGFloat allowedWidth = (splitViewWidth / 2) - [splitView_verticalSplit dividerThickness];
CGFloat width = ignoreUserMinimum ? USER_LIST_DEFAULT_WIDTH : userListMinWidth;
if (width > allowedWidth)
@@ -1299,18 +1299,9 @@
{
if ([aNotification object] == splitView_verticalSplit) {
NSRect userListFrame = view_userList.frame;
- BOOL isVisible = NO;
if (NSWidth(userListFrame) > 0) {
- //[view_userList setHidden:NO];
[self updateUserCount];
- [userListController reloadData];
- isVisible = YES;
}
- [adium.preferenceController setPreference:[NSNumber numberWithBool:isVisible]
- forKey:[KEY_USER_LIST_VISIBLE_PREFIX stringByAppendingFormat:@"%@.%@",
- chat.account.internalObjectID,
- chat.name]
- group:PREF_GROUP_DUAL_WINDOW_INTERFACE];
}
}
@@ -1333,17 +1324,18 @@
if ([self userListVisible]) {
if (userListOnRight) {
userFrame.size.width = AIfloor(currentFrame.size.width - [self _userListViewDividerPositionIgnoringUserMinimum:NO] + 0.50f);
- userFrame.origin.x = AIfloor(msgFrame.size.width + dividerThickness + 0.5f);
} else
userFrame.size.width = AIfloor([self _userListViewDividerPositionIgnoringUserMinimum:NO] + 0.50f);
- }
- else {
- userFrame.size.width = AIfloor(0.5f);
+ } else {
+ userFrame.size.width = 0;
if([view_userList isHidden]) {
- msgFrame.size.width++;
+ msgFrame.size.width += AIfloor(1 - dividerThickness);
}
}
+ if (userListOnRight)
+ userFrame.origin.x = AIfloor(msgFrame.size.width + dividerThickness + 0.5f);
+
[view_userList setFrame:userFrame];
[[splitView_textEntryHorizontal superview] setFrame:msgFrame];
} else if (splitView == splitView_textEntryHorizontal) {
@@ -1404,12 +1396,12 @@
//On the left: max size of user list
if (chat.isGroupChat) {
if (userListOnRight)
- return [self _userListViewDividerPositionIgnoringUserMinimum:YES];
+ return AIfloor([self _userListViewDividerPositionIgnoringUserMinimum:YES] + 0.5f);
else
- return (splitView_verticalSplit.frame.size.width / 2);
+ return AIfloor((splitView_verticalSplit.frame.size.width / 2) + 0.5f);
} else {
if (userListOnRight)
- return splitView_verticalSplit.frame.size.width;
+ return AIfloor(splitView_verticalSplit.frame.size.width + 0.5f);
else
return 0;
}
More information about the commits
mailing list