mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 02:45:25 +00:00
Monotone-Parent: f5ee2ec8548efd153e23d6c78a411316b0defab4
Monotone-Revision: 740354dfcd0512fd381f1b3bd4a3ee95dfa21338 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-02-12T15:48:53 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
2008-02-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoFolder.m ([SOGoFolder
|
||||
-fetchContentObjectNames]): new model method for all subclasses.
|
||||
This will be removed in the future since toOneRelationshipKeys
|
||||
must be sufficient.
|
||||
|
||||
* SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder
|
||||
-defaultFilenameExtension]): removed useless method.
|
||||
([-toOneRelationshipKeys]): moved method into SOGoFolder.m.
|
||||
|
||||
2008-02-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartICalViewer.m
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
- (NSString *) displayName;
|
||||
|
||||
- (NSString *) folderType;
|
||||
- (NSArray *) fetchContentObjectNames;
|
||||
|
||||
/* sorting */
|
||||
- (NSComparisonResult) compare: (id) otherFolder;
|
||||
|
||||
@@ -101,6 +101,17 @@
|
||||
return obj;
|
||||
}
|
||||
|
||||
#warning we should remove this method
|
||||
- (NSArray *) toOneRelationshipKeys
|
||||
{
|
||||
return [self fetchContentObjectNames];
|
||||
}
|
||||
|
||||
- (NSArray *) fetchContentObjectNames
|
||||
{
|
||||
return [NSArray array];
|
||||
}
|
||||
|
||||
- (BOOL) isFolderish
|
||||
{
|
||||
return YES;
|
||||
|
||||
@@ -342,6 +342,7 @@ static BOOL sendFolderAdvisories = NO;
|
||||
}
|
||||
if ([records isKindOfClass: [NSException class]])
|
||||
return records;
|
||||
|
||||
return [records objectsForKey: @"c_name"];
|
||||
}
|
||||
|
||||
@@ -383,6 +384,7 @@ static BOOL sendFolderAdvisories = NO;
|
||||
}
|
||||
}
|
||||
|
||||
#warning this method is dirty code
|
||||
- (NSDictionary *) fetchContentStringsAndNamesOfAllObjects
|
||||
{
|
||||
NSDictionary *files;
|
||||
@@ -398,48 +400,6 @@ static BOOL sendFolderAdvisories = NO;
|
||||
return files;
|
||||
}
|
||||
|
||||
/* reflection */
|
||||
|
||||
- (NSString *) defaultFilenameExtension
|
||||
{
|
||||
/*
|
||||
Override to add an extension to a filename
|
||||
|
||||
Note: be careful with that, needs to be consistent with object lookup!
|
||||
*/
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray *) toOneRelationshipKeys
|
||||
{
|
||||
/* toOneRelationshipKeys are the 'files' contained in a folder */
|
||||
NSMutableArray *ma;
|
||||
NSArray *names;
|
||||
NSString *name, *ext;
|
||||
unsigned i, count;
|
||||
NSRange r;
|
||||
|
||||
names = [self fetchContentObjectNames];
|
||||
count = [names count];
|
||||
ext = [self defaultFilenameExtension];
|
||||
if (count && [ext length] > 0)
|
||||
{
|
||||
ma = [NSMutableArray arrayWithCapacity: count];
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
name = [names objectAtIndex: i];
|
||||
r = [name rangeOfString: @"."];
|
||||
if (r.length == 0)
|
||||
name = [NSMutableString stringWithFormat: @"%@.%@", name, ext];
|
||||
[ma addObject: name];
|
||||
}
|
||||
|
||||
names = ma;
|
||||
}
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
#warning this code should be cleaned up
|
||||
#warning this code is a dup of UIxFolderActions,\
|
||||
we should remove the methods there instead
|
||||
|
||||
Reference in New Issue
Block a user