Monotone-Parent: d73281348e68338299c1595a484a8a1033de3cd1
Monotone-Revision: 736e8f74ef949a89cef749c9c8e331ea534cdcd8 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-07-28T22:43:28 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
fc0aa87fed
commit
a3dd5bc0ca
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2006-07-25 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoUser+Mail.m: if only one identity is to be
|
||||
returned, put it in an NSArray before returning it (fixes
|
||||
bug#217).
|
||||
|
||||
2006-07-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/SOGoUI/NSString+URL.m ([NSString -hostlessURL]): new method
|
||||
that returns a url string stripped from its "http://hostname"
|
||||
prefix.
|
||||
|
||||
* UI/SOGoUI/NSDictionary+URL.[hm]: moved from UI/Common.
|
||||
|
||||
* UI/SOGoUI/NSString+URL.[hm]: moved from UI/Common.
|
||||
|
||||
2006-07-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailerUI/WOContext+UIxMailer.m ([WOContext
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
identity = [self primaryMailIdentity];
|
||||
shares = [self valueForKey:@"additionalIMAP4AccountsAndEMails"];
|
||||
if ([shares count] == 0)
|
||||
return identity;
|
||||
return [NSArray arrayWithObject: identity];
|
||||
|
||||
identities = [NSMutableArray arrayWithCapacity:[shares count] + 1];
|
||||
if (identity != nil) [identities addObject:identity];
|
||||
|
|
|
@ -9,9 +9,6 @@ CommonUI_PRINCIPAL_CLASS = CommonUIProduct
|
|||
CommonUI_LANGUAGES = English French
|
||||
|
||||
CommonUI_OBJC_FILES += \
|
||||
NSString+URL.m \
|
||||
NSDictionary+URL.m \
|
||||
\
|
||||
CommonUIProduct.m \
|
||||
UIxPageFrame.m \
|
||||
UIxPrintPageFrame.m \
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
#import "NSString+URL.h"
|
||||
#import "NSDictionary+URL.h"
|
||||
|
||||
@implementation NSString (SOGoURLExtension)
|
||||
|
||||
- (NSString *) composeURLWithAction: (NSString *) action
|
||||
parameters: (NSDictionary *) urlParameters
|
||||
andHash: (BOOL) useHash
|
||||
{
|
||||
NSMutableString *completeURL;
|
||||
|
||||
completeURL = [NSMutableString new];
|
||||
[completeURL autorelease];
|
||||
|
||||
[completeURL appendString: self];
|
||||
if (![completeURL hasSuffix: @"/"])
|
||||
[completeURL appendString: @"/"];
|
||||
[completeURL appendString: action];
|
||||
[completeURL appendString: [urlParameters asURLParameters]];
|
||||
if (useHash)
|
||||
[completeURL appendString: @"#"];
|
||||
|
||||
return completeURL;
|
||||
}
|
||||
|
||||
@end
|
|
@ -12,6 +12,10 @@ libSOGoUI_HEADER_FILES_INSTALL_DIR = /SOGoUI
|
|||
FHS_HEADER_DIRS = SOGoUI
|
||||
|
||||
libSOGoUI_HEADER_FILES += \
|
||||
\
|
||||
NSDictionary+URL.h \
|
||||
NSString+URL.h \
|
||||
\
|
||||
UIxComponent.h \
|
||||
SOGoDateFormatter.h \
|
||||
SOGoAptFormatter.h \
|
||||
|
@ -19,6 +23,10 @@ libSOGoUI_HEADER_FILES += \
|
|||
WOContext+UIx.h \
|
||||
|
||||
libSOGoUI_OBJC_FILES += \
|
||||
\
|
||||
NSDictionary+URL.m \
|
||||
NSString+URL.m \
|
||||
\
|
||||
UIxComponent.m \
|
||||
SOGoDateFormatter.m \
|
||||
SOGoAptFormatter.m \
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
- (NSString *) composeURLWithAction: (NSString *) action
|
||||
parameters: (NSDictionary *) urlParameters
|
||||
andHash: (BOOL) useHash;
|
||||
- (NSString *) hostlessURL;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* NSSTRING_URL_H */
|
|
@ -0,0 +1,66 @@
|
|||
/* NSString+URL.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse group conseil
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "NSString+URL.h"
|
||||
#import "NSDictionary+URL.h"
|
||||
|
||||
@implementation NSString (SOGoURLExtension)
|
||||
|
||||
- (NSString *) composeURLWithAction: (NSString *) action
|
||||
parameters: (NSDictionary *) urlParameters
|
||||
andHash: (BOOL) useHash
|
||||
{
|
||||
NSMutableString *completeURL;
|
||||
|
||||
completeURL = [NSMutableString new];
|
||||
[completeURL autorelease];
|
||||
|
||||
[completeURL appendString: self];
|
||||
if (![completeURL hasSuffix: @"/"])
|
||||
[completeURL appendString: @"/"];
|
||||
[completeURL appendString: action];
|
||||
[completeURL appendString: [urlParameters asURLParameters]];
|
||||
if (useHash)
|
||||
[completeURL appendString: @"#"];
|
||||
|
||||
return completeURL;
|
||||
}
|
||||
|
||||
- (NSString *) hostlessURL
|
||||
{
|
||||
NSString *newURL;
|
||||
NSRange hostR, locationR;
|
||||
|
||||
if ([self hasPrefix: @"/"])
|
||||
newURL = [self copy];
|
||||
else
|
||||
{
|
||||
hostR = [self rangeOfString: @"://"];
|
||||
locationR = [[self substringFromIndex: (hostR.location + hostR.length)]
|
||||
rangeOfString: @"/"];
|
||||
newURL = [self substringFromIndex: (hostR.location + hostR.length + locationR.location)];
|
||||
}
|
||||
|
||||
return newURL;
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue