mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-04 06:32:18 +00:00
Monotone-Parent: 2fdf0ead0781ef2362dd389811d5db44ca4cc84a
Monotone-Revision: c91eef7edcfd08d414664c25a590b6268a7e58e2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-29T04:19:32 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -16,8 +16,7 @@ libSOGoUI_HEADER_FILES += \
|
||||
\
|
||||
UIxJSClose.h \
|
||||
UIxComponent.h \
|
||||
SOGoAptFormatter.h \
|
||||
WOContext+UIx.h \
|
||||
SOGoAptFormatter.h
|
||||
|
||||
libSOGoUI_OBJC_FILES += \
|
||||
\
|
||||
@@ -25,7 +24,6 @@ libSOGoUI_OBJC_FILES += \
|
||||
UIxComponent.m \
|
||||
UIxModuleAccessDenied.m \
|
||||
SOGoAptFormatter.m \
|
||||
WOContext+UIx.m \
|
||||
SOGoACLAdvisory.m \
|
||||
SOGoFolderAdvisory.m
|
||||
|
||||
|
||||
@@ -193,6 +193,7 @@
|
||||
NGMutableHashMap *headerMap;
|
||||
NGMimeMessage *message;
|
||||
NGMimeMultipartBody *body;
|
||||
SOGoMailer *mailer;
|
||||
SOGoUser *activeUser;
|
||||
NSDictionary *identity;
|
||||
NSString *from, *fullMail;
|
||||
@@ -222,9 +223,10 @@
|
||||
[message setBody: body];
|
||||
[body release];
|
||||
|
||||
[[SOGoMailer sharedMailer] sendMimePart: message
|
||||
toRecipients: [NSArray arrayWithObject: recipient]
|
||||
sender: from];
|
||||
mailer = [SOGoMailer mailerWithDomainDefaults: [activeUser domainDefaults]];
|
||||
[mailer sendMimePart: message
|
||||
toRecipients: [NSArray arrayWithObject: recipient]
|
||||
sender: from];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -172,6 +172,7 @@
|
||||
NGMutableHashMap *headerMap;
|
||||
NGMimeMessage *message;
|
||||
NGMimeMultipartBody *body;
|
||||
SOGoDomainDefaults *dd;
|
||||
SOGoUser *activeUser;
|
||||
NSDictionary *identity;
|
||||
NSString *from, *fullMail;
|
||||
@@ -201,9 +202,11 @@
|
||||
[message setBody: body];
|
||||
[body release];
|
||||
|
||||
[[SOGoMailer sharedMailer] sendMimePart: message
|
||||
toRecipients: [NSArray arrayWithObject: recipient]
|
||||
sender: from];
|
||||
dd = [activeUser domainDefaults];
|
||||
[[SOGoMailer mailerWithDomainDefaults: dd]
|
||||
sendMimePart: message
|
||||
toRecipients: [NSArray arrayWithObject: recipient]
|
||||
sender: from];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+21
-23
@@ -22,7 +22,6 @@
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSKeyValueCoding.h>
|
||||
#import <Foundation/NSPathUtilities.h>
|
||||
#import <Foundation/NSString.h>
|
||||
@@ -39,14 +38,15 @@
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGExtensions/NSURL+misc.h>
|
||||
|
||||
#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoObject.h>
|
||||
#import <SoObjects/SOGo/SOGoContentObject.h>
|
||||
// #import <SoObjects/SOGo/SOGoCustomGroupFolder.h>
|
||||
#import <SoObjects/SOGo/SOGoPermissions.h>
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SOGo/NSObject+Utilities.h>
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
#import <SOGo/SOGoContentObject.h>
|
||||
#import <SOGo/SOGoObject.h>
|
||||
#import <SOGo/SOGoPermissions.h>
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
|
||||
#import "UIxJSClose.h"
|
||||
|
||||
@@ -64,21 +64,15 @@ static NSMutableArray *abbrDayLabelKeys = nil;
|
||||
static NSMutableArray *monthLabelKeys = nil;
|
||||
static NSMutableArray *abbrMonthLabelKeys = nil;
|
||||
|
||||
static BOOL uixDebugEnabled = NO;
|
||||
|
||||
+ (int)version {
|
||||
return [super version] + 0 /* v2 */;
|
||||
}
|
||||
|
||||
+ (void)initialize {
|
||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
NSAssert2([super version] == 2,
|
||||
@"invalid superclass (%@) version %i !",
|
||||
NSStringFromClass([self superclass]), [super version]);
|
||||
|
||||
uixDebugEnabled = [ud boolForKey:@"SOGoUIxDebugEnabled"];
|
||||
|
||||
if (dayLabelKeys == nil) {
|
||||
dayLabelKeys = [[NSMutableArray alloc] initWithCapacity:7];
|
||||
[dayLabelKeys addObject:@"Sunday"];
|
||||
@@ -409,16 +403,16 @@ static BOOL uixDebugEnabled = NO;
|
||||
|
||||
- (NSCalendarDate *) selectedDate
|
||||
{
|
||||
NSTimeZone *userTimeZone;
|
||||
SOGoUserDefaults *ud;
|
||||
|
||||
if (!_selectedDate)
|
||||
{
|
||||
userTimeZone = [[context activeUser] timeZone];
|
||||
ud = [[context activeUser] userDefaults];
|
||||
_selectedDate
|
||||
= [NSCalendarDate
|
||||
dateFromShortDateString: [self queryParameterForKey: @"day"]
|
||||
andShortTimeString: [self queryParameterForKey: @"hm"]
|
||||
inTimeZone: userTimeZone];
|
||||
inTimeZone: [ud timeZone]];
|
||||
[_selectedDate retain];
|
||||
}
|
||||
|
||||
@@ -427,10 +421,10 @@ static BOOL uixDebugEnabled = NO;
|
||||
|
||||
- (NSString *) dateStringForDate: (NSCalendarDate *) _date
|
||||
{
|
||||
NSTimeZone *userTimeZone;
|
||||
SOGoUserDefaults *ud;
|
||||
|
||||
userTimeZone = [[context activeUser] timeZone];
|
||||
[_date setTimeZone: userTimeZone];
|
||||
ud = [[context activeUser] userDefaults];
|
||||
[_date setTimeZone: [ud timeZone]];
|
||||
|
||||
return [_date descriptionWithCalendarFormat: @"%Y%m%d"];
|
||||
}
|
||||
@@ -659,9 +653,13 @@ static BOOL uixDebugEnabled = NO;
|
||||
return SOGoBuildDate;
|
||||
}
|
||||
|
||||
- (BOOL)isUIxDebugEnabled
|
||||
- (BOOL) isUIxDebugEnabled
|
||||
{
|
||||
return uixDebugEnabled;
|
||||
SOGoSystemDefaults *sd;
|
||||
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
|
||||
return [sd uixDebugEnabled];
|
||||
}
|
||||
|
||||
@end /* UIxComponent */
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2000-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with OGo; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __SOGoUI_WOContext_UIx_H_
|
||||
#define __SOGoUI_WOContext_UIx_H_
|
||||
|
||||
#include <NGObjWeb/WOContext.h>
|
||||
|
||||
@interface WOContext (UIx)
|
||||
|
||||
- (BOOL)isUIxDebugEnabled;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __SOGoUI_WOContext_UIx_H_ */
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2000-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with OGo; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import "WOContext+UIx.h"
|
||||
|
||||
@implementation WOContext (UIx)
|
||||
|
||||
- (BOOL)isUIxDebugEnabled {
|
||||
NSNumber *bv;
|
||||
|
||||
if ((bv = [self objectForKey:@"_isUIxDebugEnabled"]) == nil) {
|
||||
NSUserDefaults *ud;
|
||||
BOOL uixDebugEnabled;
|
||||
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
uixDebugEnabled = [ud boolForKey:@"SOGoUIxDebugEnabled"];
|
||||
bv = [NSNumber numberWithBool:uixDebugEnabled];
|
||||
[self setObject:bv forKey:@"_isUIxDebugEnabled"];
|
||||
}
|
||||
return [bv boolValue];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user