mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 19:35:38 +00:00
Monotone-Parent: 773965cc12e1e34ce72a11b7b25f3ff6e0dc7887
Monotone-Revision: c0da933d3e86c470a7d83491a010f1ba6edc3fcd Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-03-25T19:59:13 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -37,6 +37,27 @@
|
||||
|
||||
@implementation UIxContactsListViewContainer
|
||||
|
||||
- (void) _setupContext
|
||||
{
|
||||
SOGoUser *activeUser;
|
||||
NSString *module;
|
||||
SOGoContactFolders *clientObject;
|
||||
|
||||
activeUser = [context activeUser];
|
||||
clientObject = [[self clientObject] container];
|
||||
|
||||
module = [clientObject nameInContainer];
|
||||
|
||||
ud = [activeUser userSettings];
|
||||
moduleSettings = [ud objectForKey: module];
|
||||
if (!moduleSettings)
|
||||
{
|
||||
moduleSettings = [NSMutableDictionary new];
|
||||
[moduleSettings autorelease];
|
||||
}
|
||||
[ud setObject: moduleSettings forKey: module];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
@@ -120,4 +141,34 @@
|
||||
return [[self queryParameterForKey: @"popup"] boolValue];
|
||||
}
|
||||
|
||||
- (NSString *) verticalDragHandleStyle
|
||||
{
|
||||
NSString *vertical;
|
||||
|
||||
[self _setupContext];
|
||||
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
|
||||
|
||||
return (vertical ? [vertical stringByAppendingFormat: @"px"] : nil);
|
||||
}
|
||||
|
||||
- (NSString *) horizontalDragHandleStyle
|
||||
{
|
||||
NSString *horizontal;
|
||||
|
||||
[self _setupContext];
|
||||
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
|
||||
|
||||
return (horizontal ? [horizontal stringByAppendingFormat: @"px"] : nil);
|
||||
}
|
||||
|
||||
- (NSString *) contactsListContentStyle
|
||||
{
|
||||
int height;
|
||||
|
||||
[self _setupContext];
|
||||
height = [[moduleSettings objectForKey: @"DragHandleVertical"] intValue];
|
||||
|
||||
return (height ? [NSString stringWithFormat: @"%ipx", (height - 27)] : nil);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user