summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bc768c4)
Show nodes immediately with translated UUIDs. Fix bug where browser of first created account didn't translate UUIDs.
16 files changed:
- (PithosAccountNode *)accountNode {
if (!accountNode) {
- (PithosAccountNode *)accountNode {
if (!accountNode) {
- accountNode = [[PithosAccountNode alloc] initWithPithos:self.pithos];
+ accountNode = [[PithosAccountNode alloc] initWithPithosAccountManager:self andPithos:self.pithos];
accountNode.childrenUpdatedNotificationName = nil;
accountNode.inheritChildrenUpdatedNotificationName = YES;
accountNode.childrenUpdatedNotificationName = nil;
accountNode.inheritChildrenUpdatedNotificationName = YES;
- accountNode.pithosAccountManager = self;
}
return accountNode;
}
- (PithosSharingAccountsNode *)sharingAccountsNode {
if (!sharingAccountsNode) {
}
return accountNode;
}
- (PithosSharingAccountsNode *)sharingAccountsNode {
if (!sharingAccountsNode) {
- sharingAccountsNode = [[PithosSharingAccountsNode alloc] initWithPithos:self.pithos];
+ sharingAccountsNode = [[PithosSharingAccountsNode alloc] initWithPithosAccountManager:self andPithos:self.pithos];
sharingAccountsNode.childrenUpdatedNotificationName = nil;
sharingAccountsNode.inheritChildrenUpdatedNotificationName = YES;
sharingAccountsNode.childrenUpdatedNotificationName = nil;
sharingAccountsNode.inheritChildrenUpdatedNotificationName = YES;
- sharingAccountsNode.pithosAccountManager = self;
}
return sharingAccountsNode;
}
}
return sharingAccountsNode;
}
self.syncActive = NO;
// XXX Show preferences with self as the selected account?
} else {
self.syncActive = NO;
// XXX Show preferences with self as the selected account?
} else {
+ [self updateUserCatalogForForDisplaynames:nil UUIDs:[NSArray arrayWithObject:authUser]];
+
self.active = YES;
if (syncDaemon) {
self.syncDaemon.pithos = self.pithos;
self.active = YES;
if (syncDaemon) {
self.syncDaemon.pithos = self.pithos;
}
if (sharingAccountsNode && self.sharingAccountsNode.children) {
}
}
if (sharingAccountsNode && self.sharingAccountsNode.children) {
}
-
- [self updateUserCatalogForForDisplaynames:nil UUIDs:[NSArray arrayWithObject:authUser]];
@property(nonatomic, strong) ASIPithosAccountRequest *refreshMetadataAccountRequest;
@property(nonatomic, strong) NSMutableDictionary *translatedGroups;
@property(nonatomic, strong) ASIPithosAccountRequest *refreshMetadataAccountRequest;
@property(nonatomic, strong) NSMutableDictionary *translatedGroups;
-- (id)initWithPithos:(ASIPithos *)aPithos;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager andPithos:(ASIPithos *)aPithos;
- (void)applyInfo;
- (void)refreshInfo;
- (void)applyInfo;
- (void)refreshInfo;
#pragma mark -
#pragma mark Object Lifecycle
#pragma mark -
#pragma mark Object Lifecycle
-- (id)initWithPithos:(ASIPithos *)aPithos {
- if ((self = [super init])) {
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager andPithos:(ASIPithos *)aPithos {
+ if ((self = [super initWithPithosAccountManager:aPithosAccountManager])) {
pithos = aPithos;
}
return self;
pithos = aPithos;
}
return self;
newChildren = [[NSMutableArray alloc] init];
NSMutableIndexSet *keptNodes = [NSMutableIndexSet indexSet];
for (ASIPithosContainer *container in containers) {
newChildren = [[NSMutableArray alloc] init];
NSMutableIndexSet *keptNodes = [NSMutableIndexSet indexSet];
for (ASIPithosContainer *container in containers) {
- PithosContainerNode *node = [[PithosContainerNode alloc] initWithPithos:pithos pithosContainer:container];
+ PithosContainerNode *node = [[PithosContainerNode alloc] initWithPithosAccountManager:pithosAccountManager
+ andPithos:pithos
+ pithosContainer:container];
node.parent = self;
node.shared = shared;
node.sharingAccount = sharingAccount;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
node.parent = self;
node.shared = shared;
node.sharingAccount = sharingAccount;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
- node.pithosAccountManager = pithosAccountManager;
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
[activityProgressIndicator setMaxValue:1.0];
activityFacility = [PithosActivityFacility defaultPithosActivityFacility];
[activityProgressIndicator setMaxValue:1.0];
activityFacility = [PithosActivityFacility defaultPithosActivityFacility];
- self.accountNode = [[PithosAccountNode alloc] initWithPithos:pithos];
- accountNode.pithosAccountManager = pithosAccountManager;
+ self.accountNode = [[PithosAccountNode alloc] initWithPithosAccountManager:pithosAccountManager andPithos:pithos];
containersNode = [[PithosEmptyNode alloc] initWithDisplayName:@"CONTAINERS" icon:nil];
containersNodeChildren = [[NSMutableArray alloc] init];
sharedNode = [[PithosEmptyNode alloc] initWithDisplayName:@"SHARED" icon:nil];
containersNode = [[PithosEmptyNode alloc] initWithDisplayName:@"CONTAINERS" icon:nil];
containersNodeChildren = [[NSMutableArray alloc] init];
sharedNode = [[PithosEmptyNode alloc] initWithDisplayName:@"SHARED" icon:nil];
- mySharedNode = [[PithosAccountNode alloc] initWithPithos:pithos];
- mySharedNode.pithosAccountManager = pithosAccountManager;
+ mySharedNode = [[PithosAccountNode alloc] initWithPithosAccountManager:pithosAccountManager andPithos:pithos];
mySharedNode.displayName = @"shared by me";
mySharedNode.shared = YES;
mySharedNode.icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kUserIcon)];
mySharedNode.displayName = @"shared by me";
mySharedNode.shared = YES;
mySharedNode.icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kUserIcon)];
- othersSharedNode = [[PithosSharingAccountsNode alloc] initWithPithos:pithos];
- othersSharedNode.pithosAccountManager = pithosAccountManager;
+ othersSharedNode = [[PithosSharingAccountsNode alloc] initWithPithosAccountManager:pithosAccountManager andPithos:pithos];
othersSharedNode.displayName = @"shared with me";
othersSharedNode.icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGroupIcon)];
othersSharedNode.displayName = @"shared with me";
othersSharedNode.icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGroupIcon)];
<int key="NSvFlags">269</int>
<string key="NSFrame">{{49, 18}, {102, 19}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">269</int>
<string key="NSFrame">{{49, 18}, {102, 19}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1036336951">
<reference key="NSNextKeyView"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1036336951">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 45}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 45}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="711438167"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="984886579">
<reference key="NSNextKeyView" ref="711438167"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="984886579">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 61}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 61}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="348582496"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="358475028">
<reference key="NSNextKeyView" ref="348582496"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="358475028">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 77}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 77}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="490957876"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="423776930">
<reference key="NSNextKeyView" ref="490957876"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="423776930">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 93}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 93}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="458298377"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="27846884">
<reference key="NSNextKeyView" ref="458298377"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="27846884">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 109}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 109}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="933584688"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="726762919">
<reference key="NSNextKeyView" ref="933584688"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="726762919">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 125}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{1, 125}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="183377333"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="558074580">
<reference key="NSNextKeyView" ref="183377333"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="558074580">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 45}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 45}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="241278852"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="948332378">
<reference key="NSNextKeyView" ref="241278852"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="948332378">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 61}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 61}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="361683768"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="373378417">
<int key="NSCellFlags">67239488</int>
<int key="NSCellFlags2">4196352</int>
<reference key="NSNextKeyView" ref="361683768"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="373378417">
<int key="NSCellFlags">67239488</int>
<int key="NSCellFlags2">4196352</int>
- <string key="NSContents">Modified</string>
+ <string key="NSContents">Modified by</string>
<reference key="NSSupport" ref="611945789"/>
<reference key="NSControlView" ref="348582496"/>
<reference key="NSBackgroundColor" ref="363018318"/>
<reference key="NSSupport" ref="611945789"/>
<reference key="NSControlView" ref="348582496"/>
<reference key="NSBackgroundColor" ref="363018318"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 77}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 77}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="779495175"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="622580923">
<reference key="NSNextKeyView" ref="779495175"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="622580923">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 93}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 93}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="130674256"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="599752880">
<reference key="NSNextKeyView" ref="130674256"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="599752880">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 109}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 109}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="363250715"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="11695648">
<reference key="NSNextKeyView" ref="363250715"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="11695648">
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 125}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
<int key="NSvFlags">271</int>
<string key="NSFrame">{{101, 125}, {98, 14}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="261591603"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="59179920">
<reference key="NSNextKeyView" ref="261591603"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="59179920">
</object>
<string key="NSFrame">{{36, 147}, {128, 128}}</string>
<reference key="NSSuperview" ref="1005"/>
</object>
<string key="NSFrame">{{36, 147}, {128, 128}}</string>
<reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="774296355"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="327417217">
<reference key="NSNextKeyView" ref="774296355"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="327417217">
</object>
<string key="NSFrameSize">{200, 295}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSFrameSize">{200, 295}</string>
<reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="501039666"/>
<string key="NSClassName">NSView</string>
</object>
<reference key="NSNextKeyView" ref="501039666"/>
<string key="NSClassName">NSView</string>
</object>
<string key="NSLabel">value: representedObject.translatedModifiedBy</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">representedObject.translatedModifiedBy</string>
<string key="NSLabel">value: representedObject.translatedModifiedBy</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">representedObject.translatedModifiedBy</string>
+ <object class="NSDictionary" key="NSOptions">
+ <string key="NS.key.0">NSNullPlaceholder</string>
+ <string key="NS.object.0">-</string>
+ </object>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
- <int key="connectionID">98</int>
+ <int key="connectionID">101</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">98</int>
+ <int key="maxID">101</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
-- (id)initWithPithos:(ASIPithos *)aPithos pithosContainer:(ASIPithosContainer *)aPithosContainer;
-- (id)initWithPithos:(ASIPithos *)aPithos pithosContainer:(ASIPithosContainer *)aPithosContainer icon:(NSImage *)anIcon;
-- (id)initWithPithos:(ASIPithos *)aPithos containerName:(NSString *)aContainerName;
-- (id)initWithPithos:(ASIPithos *)aPithos containerName:(NSString *)aContainerName icon:(NSImage *)anIcon;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos pithosContainer:(ASIPithosContainer *)aPithosContainer;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos pithosContainer:(ASIPithosContainer *)aPithosContainer icon:(NSImage *)anIcon;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos containerName:(NSString *)aContainerName;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos containerName:(NSString *)aContainerName icon:(NSImage *)anIcon;
@property(nonatomic, strong) ASIPithos *pithos;
@property(nonatomic, strong) ASIPithosContainer *pithosContainer;
@property(nonatomic, strong) ASIPithos *pithos;
@property(nonatomic, strong) ASIPithosContainer *pithosContainer;
#pragma mark -
#pragma mark Object Lifecycle
#pragma mark -
#pragma mark Object Lifecycle
-- (id)initWithPithos:(ASIPithos *)aPithos pithosContainer:(ASIPithosContainer *)aPithosContainer icon:(NSImage *)anIcon {
- if ((self = [super init])) {
- self.pithos = aPithos;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos pithosContainer:(ASIPithosContainer *)aPithosContainer icon:(NSImage *)anIcon {
+ if ((self = [super initWithPithosAccountManager:aPithosAccountManager])) {
+ pithos = aPithos;
self.pithosContainer = aPithosContainer;
self.pithosContainer = aPithosContainer;
self.icon = anIcon;
}
return self;
}
self.icon = anIcon;
}
return self;
}
-- (id)initWithPithos:(ASIPithos *)aPithos pithosContainer:(ASIPithosContainer *)aPithosContainer {
- return [self initWithPithos:aPithos pithosContainer:aPithosContainer icon:nil];
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos pithosContainer:(ASIPithosContainer *)aPithosContainer {
+ return [self initWithPithosAccountManager:aPithosAccountManager andPithos:aPithos pithosContainer:aPithosContainer icon:nil];
-- (id)initWithPithos:(ASIPithos *)aPithos containerName:(NSString *)aContainerName icon:(NSImage *)anIcon {
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos containerName:(NSString *)aContainerName icon:(NSImage *)anIcon {
ASIPithosContainer *container = [ASIPithosContainer container];
container.name = aContainerName;
ASIPithosContainer *container = [ASIPithosContainer container];
container.name = aContainerName;
- return [self initWithPithos:aPithos pithosContainer:container icon:anIcon];
+ return [self initWithPithosAccountManager:aPithosAccountManager andPithos:aPithos pithosContainer:container icon:anIcon];
-- (id)initWithPithos:(ASIPithos *)aPithos containerName:(NSString *)aContainerName {
- return [self initWithPithos:aPithos containerName:aContainerName icon:nil];
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos containerName:(NSString *)aContainerName {
+ return [self initWithPithosAccountManager:aPithosAccountManager andPithos:aPithos containerName:aContainerName icon:nil];
NSUInteger sameNameObjectIndex = [objectNames indexOfObject:[object.name substringToIndex:([object.name length] - 1)]];
if ((sameNameObjectIndex == NSNotFound) ||
![PithosUtilities isContentTypeDirectory:[[objects objectAtIndex:sameNameObjectIndex] contentType]]) {
NSUInteger sameNameObjectIndex = [objectNames indexOfObject:[object.name substringToIndex:([object.name length] - 1)]];
if ((sameNameObjectIndex == NSNotFound) ||
![PithosUtilities isContentTypeDirectory:[[objects objectAtIndex:sameNameObjectIndex] contentType]]) {
- PithosSubdirNode *node = [[PithosSubdirNode alloc] initWithPithos:pithos
- pithosContainer:pithosContainer
- pithosObject:object];
+ PithosSubdirNode *node = [[PithosSubdirNode alloc] initWithPithosAccountManager:pithosAccountManager
+ andPithos:pithos
+ pithosContainer:pithosContainer
+ pithosObject:object];
node.parent = self;
node.shared = shared;
node.sharingAccount = sharingAccount;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
node.parent = self;
node.shared = shared;
node.sharingAccount = sharingAccount;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
- node.pithosAccountManager = pithosAccountManager;
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
[newChildren addObject:node];
}
} else if ([PithosUtilities isContentTypeDirectory:object.contentType]) {
[newChildren addObject:node];
}
} else if ([PithosUtilities isContentTypeDirectory:object.contentType]) {
- PithosSubdirNode *node = [[PithosSubdirNode alloc] initWithPithos:pithos
- pithosContainer:pithosContainer
- pithosObject:object];
+ PithosSubdirNode *node = [[PithosSubdirNode alloc] initWithPithosAccountManager:pithosAccountManager
+ andPithos:pithos
+ pithosContainer:pithosContainer
+ pithosObject:object];
node.parent = self;
node.shared = shared;
node.sharingAccount = sharingAccount;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
node.parent = self;
node.shared = shared;
node.sharingAccount = sharingAccount;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
- node.pithosAccountManager = pithosAccountManager;
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
}
[newChildren addObject:node];
} else {
}
[newChildren addObject:node];
} else {
- PithosObjectNode *node = [[PithosObjectNode alloc] initWithPithos:pithos
- pithosContainer:pithosContainer
- pithosObject:object];
+ PithosObjectNode *node = [[PithosObjectNode alloc] initWithPithosAccountManager:pithosAccountManager
+ andPithos:pithos
+ pithosContainer:pithosContainer
+ pithosObject:object];
node.parent = self;
node.shared = shared;
node.sharingAccount = sharingAccount;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
node.parent = self;
node.shared = shared;
node.sharingAccount = sharingAccount;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
- node.pithosAccountManager = pithosAccountManager;
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
@property(nonatomic, strong) ASIPithosContainer *pithosContainer;
@property(nonatomic, strong) ASIPithosObject *pithosObject;
@property(nonatomic, strong) ASIPithosContainer *pithosContainer;
@property(nonatomic, strong) ASIPithosObject *pithosObject;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager;
+
- (void)invalidateChildren;
- (void)invalidateChildrenRecursive;
- (void)refresh;
- (void)invalidateChildren;
- (void)invalidateChildrenRecursive;
- (void)refresh;
#pragma mark -
#pragma mark Object Lifecycle
#pragma mark -
#pragma mark Object Lifecycle
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager {
if ((self = [super init])) {
if ((self = [super init])) {
- pithosAccountManager = nil;
+ self.pithosAccountManager = aPithosAccountManager;
freshness = PithosNodeStateRefreshNeeded;
forcedRefresh = NO;
shared = NO;
freshness = PithosNodeStateRefreshNeeded;
forcedRefresh = NO;
shared = NO;
+- (id)init {
+ return [self initWithPithosAccountManager:nil];
+}
- (BOOL)isEqual:(id)anObject {
return ([anObject isKindOfClass:[self class]] && [((PithosNode *)anObject).url isEqual:self.url]);
- (BOOL)isEqual:(id)anObject {
return ([anObject isKindOfClass:[self class]] && [((PithosNode *)anObject).url isEqual:self.url]);
NSMutableArray *translatedPermissions;
}
NSMutableArray *translatedPermissions;
}
-- (id)initWithPithos:(ASIPithos *)aPithos
- pithosContainer:(ASIPithosContainer *)aPithosContainer
- pithosObject:(ASIPithosObject *)aPithosObject;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos
+ pithosContainer:(ASIPithosContainer *)aPithosContainer
+ pithosObject:(ASIPithosObject *)aPithosObject;
@property (nonatomic, strong) ASIPithos *pithos;
@property (nonatomic, strong) ASIPithosContainer *pithosContainer;
@property (nonatomic, strong) ASIPithos *pithos;
@property (nonatomic, strong) ASIPithosContainer *pithosContainer;
#pragma mark -
#pragma mark Object Lifecycle
#pragma mark -
#pragma mark Object Lifecycle
-- (id)initWithPithos:(ASIPithos *)aPithos
- pithosContainer:(ASIPithosContainer *)aPithosContainer
- pithosObject:(ASIPithosObject *)aPithosObject {
- if ((self = [super init])) {
- self.pithos = aPithos;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos
+ pithosContainer:(ASIPithosContainer *)aPithosContainer
+ pithosObject:(ASIPithosObject *)aPithosObject {
+ if ((self = [super initWithPithosAccountManager:aPithosAccountManager])) {
+ pithos = aPithos;
+ isLeafItem = YES;
self.pithosContainer = aPithosContainer;
self.pithosObject = aPithosObject;
self.pithosContainer = aPithosContainer;
self.pithosObject = aPithosObject;
@property(nonatomic, strong) ASIPithos *pithos;
@property(nonatomic, strong) ASIPithosRequest *sharingAccountsRequest;
@property(nonatomic, strong) ASIPithos *pithos;
@property(nonatomic, strong) ASIPithosRequest *sharingAccountsRequest;
-- (id)initWithPithos:(ASIPithos *)aPithos;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager andPithos:(ASIPithos *)aPithos;
@end
\ No newline at end of file
@end
\ No newline at end of file
#pragma mark -
#pragma mark Object Lifecycle
#pragma mark -
#pragma mark Object Lifecycle
-- (id)initWithPithos:(ASIPithos *)aPithos {
- if ((self = [super init])) {
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager andPithos:(ASIPithos *)aPithos {
+ if ((self = [super initWithPithosAccountManager:aPithosAccountManager])) {
pithos = aPithos;
self.sharingAccount = @"";
}
pithos = aPithos;
self.sharingAccount = @"";
}
NSMutableIndexSet *keptNodes = [NSMutableIndexSet indexSet];
for (ASIPithosAccount *account in sharingAccounts) {
if (![account.name isEqualToString:pithos.authUser]) {
NSMutableIndexSet *keptNodes = [NSMutableIndexSet indexSet];
for (ASIPithosAccount *account in sharingAccounts) {
if (![account.name isEqualToString:pithos.authUser]) {
- PithosAccountNode *node = [[PithosAccountNode alloc] initWithPithos:pithos];
+ PithosAccountNode *node = [[PithosAccountNode alloc] initWithPithosAccountManager:pithosAccountManager
+ andPithos:pithos];
node.parent = self;
node.shared = shared;
node.sharingAccount = account.name;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
node.parent = self;
node.shared = shared;
node.sharingAccount = account.name;
node.inheritChildrenUpdatedNotificationName = inheritChildrenUpdatedNotificationName;
- node.pithosAccountManager = pithosAccountManager;
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
if (children) {
NSUInteger oldIndex = [children indexOfObject:node];
if (oldIndex != NSNotFound) {
-- (id)initWithPithos:(ASIPithos *)aPithos
- pithosContainer:(ASIPithosContainer *)aPithosContainer
- pithosObject:(ASIPithosObject *)aPithosObject;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos
+ pithosContainer:(ASIPithosContainer *)aPithosContainer
+ pithosObject:(ASIPithosObject *)aPithosObject;
@property (nonatomic, strong) ASIPithosObject *pithosObject;
@property (nonatomic, strong) NSArray *versions;
@property (nonatomic, strong) ASIPithosObject *pithosObject;
@property (nonatomic, strong) NSArray *versions;
#pragma mark -
#pragma mark Object Lifecycle
#pragma mark -
#pragma mark Object Lifecycle
-- (id)initWithPithos:(ASIPithos *)aPithos
- pithosContainer:(ASIPithosContainer *)aPithosContainer
- pithosObject:(ASIPithosObject *)aPithosObject {
- if ((self = [super init])) {
- self.pithos = aPithos;
+- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager
+ andPithos:(ASIPithos *)aPithos
+ pithosContainer:(ASIPithosContainer *)aPithosContainer
+ pithosObject:(ASIPithosObject *)aPithosObject {
+ if ((self = [super initWithPithosAccountManager:aPithosAccountManager])) {
+ pithos = aPithos;
+ refreshParent = NO;
self.pithosContainer = aPithosContainer;
self.pithosObject = aPithosObject;
self.pithosContainer = aPithosContainer;
self.pithosObject = aPithosObject;
for (PithosAccount *pithosAccount in pithosAccounts) {
[pithosAccountsDictionary setObject:pithosAccount forKey:pithosAccount.name];
if (!currentPithosAccount && pithosAccount.active)
for (PithosAccount *pithosAccount in pithosAccounts) {
[pithosAccountsDictionary setObject:pithosAccount forKey:pithosAccount.name];
if (!currentPithosAccount && pithosAccount.active)
- currentPithosAccount = pithosAccount;
+ self.currentPithosAccount = pithosAccount;
}
if (!currentPithosAccount)
self.currentPithosAccount = [pithosAccounts objectAtIndex:0];
}
if (!currentPithosAccount)
self.currentPithosAccount = [pithosAccounts objectAtIndex:0];
+ self.pithosBrowserController.pithosAccountManager = currentPithosAccount;
if (currentPithosAccount.active) {
[self savePithosAccounts:self];
if (currentPithosAccount.active) {
[self savePithosAccounts:self];
- self.pithosBrowserController.pithosAccountManager = currentPithosAccount;
[self showPithosBrowser:self];
self.pithosBrowserController.pithos = currentPithosAccount.pithos;
} else {
[self showPithosBrowser:self];
self.pithosBrowserController.pithos = currentPithosAccount.pithos;
} else {
[self.pithosBrowserController.window close];
[self.pithosBrowserController resetBrowser];
self.currentPithosAccount = [pithosAccounts objectAtIndex:0];
[self.pithosBrowserController.window close];
[self.pithosBrowserController resetBrowser];
self.currentPithosAccount = [pithosAccounts objectAtIndex:0];
+ self.pithosBrowserController.pithosAccountManager = currentPithosAccount;
}
}
if ([self.syncPithosAccount isEqualTo:removedPithosAccount])
}
}
if ([self.syncPithosAccount isEqualTo:removedPithosAccount])