From 97c9a632d23b88952081fc38a9e2bc03eb2a7ac9 Mon Sep 17 00:00:00 2001 From: Miltiadis Vasilakis Date: Fri, 15 Mar 2013 18:21:31 +0200 Subject: [PATCH] Improve UUID translation in nodes Show nodes immediately with translated UUIDs. Fix bug where browser of first created account didn't translate UUIDs. --- pithos-macos/PithosAccount.m | 10 ++--- pithos-macos/PithosAccountNode.h | 2 +- pithos-macos/PithosAccountNode.m | 9 +++-- pithos-macos/PithosBrowserController.m | 9 ++--- pithos-macos/PithosBrowserPreviewController.xib | 25 ++++++++++-- pithos-macos/PithosContainerNode.h | 12 ++++-- pithos-macos/PithosContainerNode.m | 47 ++++++++++++----------- pithos-macos/PithosNode.h | 2 + pithos-macos/PithosNode.m | 7 +++- pithos-macos/PithosObjectNode.h | 7 ++-- pithos-macos/PithosObjectNode.m | 13 ++++--- pithos-macos/PithosSharingAccountsNode.h | 2 +- pithos-macos/PithosSharingAccountsNode.m | 8 ++-- pithos-macos/PithosSubdirNode.h | 7 ++-- pithos-macos/PithosSubdirNode.m | 13 ++++--- pithos-macos/pithos_macosAppDelegate.m | 5 ++- 16 files changed, 105 insertions(+), 73 deletions(-) diff --git a/pithos-macos/PithosAccount.m b/pithos-macos/PithosAccount.m index e054383..0250f15 100644 --- a/pithos-macos/PithosAccount.m +++ b/pithos-macos/PithosAccount.m @@ -361,20 +361,18 @@ - (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.pithosAccountManager = self; } 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.pithosAccountManager = self; } return sharingAccountsNode; } @@ -392,6 +390,8 @@ 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; @@ -409,8 +409,6 @@ } if (sharingAccountsNode && self.sharingAccountsNode.children) { } - - [self updateUserCatalogForForDisplaynames:nil UUIDs:[NSArray arrayWithObject:authUser]]; } } diff --git a/pithos-macos/PithosAccountNode.h b/pithos-macos/PithosAccountNode.h index b96f2e7..5fdd816 100644 --- a/pithos-macos/PithosAccountNode.h +++ b/pithos-macos/PithosAccountNode.h @@ -61,7 +61,7 @@ @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; diff --git a/pithos-macos/PithosAccountNode.m b/pithos-macos/PithosAccountNode.m index 329b610..4279efc 100644 --- a/pithos-macos/PithosAccountNode.m +++ b/pithos-macos/PithosAccountNode.m @@ -59,8 +59,8 @@ static NSImage *sharedIcon = nil; #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; @@ -264,12 +264,13 @@ static NSImage *sharedIcon = nil; 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.pithosAccountManager = pithosAccountManager; if (children) { NSUInteger oldIndex = [children indexOfObject:node]; if (oldIndex != NSNotFound) { diff --git a/pithos-macos/PithosBrowserController.m b/pithos-macos/PithosBrowserController.m index 357aa9f..3f8cbb0 100644 --- a/pithos-macos/PithosBrowserController.m +++ b/pithos-macos/PithosBrowserController.m @@ -209,18 +209,15 @@ [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]; - 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)]; - 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)]; diff --git a/pithos-macos/PithosBrowserPreviewController.xib b/pithos-macos/PithosBrowserPreviewController.xib index f04f81e..4c329f7 100644 --- a/pithos-macos/PithosBrowserPreviewController.xib +++ b/pithos-macos/PithosBrowserPreviewController.xib @@ -51,6 +51,7 @@ 269 {{49, 18}, {102, 19}} + YES @@ -76,6 +77,7 @@ 271 {{1, 45}, {98, 14}} + YES @@ -114,6 +116,7 @@ 271 {{1, 61}, {98, 14}} + YES @@ -132,6 +135,7 @@ 271 {{1, 77}, {98, 14}} + YES @@ -150,6 +154,7 @@ 271 {{1, 93}, {98, 14}} + YES @@ -168,6 +173,7 @@ 271 {{1, 109}, {98, 14}} + YES @@ -186,6 +192,7 @@ 271 {{1, 125}, {98, 14}} + YES @@ -204,6 +211,7 @@ 271 {{101, 45}, {98, 14}} + YES @@ -229,12 +237,13 @@ 271 {{101, 61}, {98, 14}} + YES 67239488 4196352 - Modified + Modified by @@ -246,6 +255,7 @@ 271 {{101, 77}, {98, 14}} + YES @@ -263,6 +273,7 @@ 271 {{101, 93}, {98, 14}} + YES @@ -280,6 +291,7 @@ 271 {{101, 109}, {98, 14}} + YES @@ -297,6 +309,7 @@ 271 {{101, 125}, {98, 14}} + YES @@ -326,6 +339,7 @@ {{36, 147}, {128, 128}} + YES @@ -341,6 +355,7 @@ {200, 295} + NSView @@ -458,10 +473,14 @@ value: representedObject.translatedModifiedBy value representedObject.translatedModifiedBy + + NSNullPlaceholder + - + 2 - 98 + 101 @@ -875,7 +894,7 @@ - 98 + 101 0 diff --git a/pithos-macos/PithosContainerNode.h b/pithos-macos/PithosContainerNode.h index 7fdc335..9028528 100644 --- a/pithos-macos/PithosContainerNode.h +++ b/pithos-macos/PithosContainerNode.h @@ -54,10 +54,14 @@ NSNumber *policyQuota; } -- (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; diff --git a/pithos-macos/PithosContainerNode.m b/pithos-macos/PithosContainerNode.m index e3d6200..a96a7cd 100644 --- a/pithos-macos/PithosContainerNode.m +++ b/pithos-macos/PithosContainerNode.m @@ -61,28 +61,31 @@ static NSImage *sharedIcon = nil; #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; - prefix = nil; 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; - 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]; } - (void)dealloc { @@ -269,14 +272,14 @@ static NSImage *sharedIcon = nil; 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.pithosAccountManager = pithosAccountManager; if (children) { NSUInteger oldIndex = [children indexOfObject:node]; if (oldIndex != NSNotFound) { @@ -293,14 +296,14 @@ static NSImage *sharedIcon = nil; [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.pithosAccountManager = pithosAccountManager; if (children) { NSUInteger oldIndex = [children indexOfObject:node]; if (oldIndex != NSNotFound) { @@ -314,14 +317,14 @@ static NSImage *sharedIcon = nil; } [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.pithosAccountManager = pithosAccountManager; if (children) { NSUInteger oldIndex = [children indexOfObject:node]; if (oldIndex != NSNotFound) { diff --git a/pithos-macos/PithosNode.h b/pithos-macos/PithosNode.h index 5461360..0708bb9 100644 --- a/pithos-macos/PithosNode.h +++ b/pithos-macos/PithosNode.h @@ -93,6 +93,8 @@ @property(nonatomic, strong) ASIPithosContainer *pithosContainer; @property(nonatomic, strong) ASIPithosObject *pithosObject; +- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager; + - (void)invalidateChildren; - (void)invalidateChildrenRecursive; - (void)refresh; diff --git a/pithos-macos/PithosNode.m b/pithos-macos/PithosNode.m index b7dbd99..c77db38 100644 --- a/pithos-macos/PithosNode.m +++ b/pithos-macos/PithosNode.m @@ -47,9 +47,9 @@ #pragma mark - #pragma mark Object Lifecycle -- (id)init { +- (id)initWithPithosAccountManager:(PithosAccount *)aPithosAccountManager { if ((self = [super init])) { - pithosAccountManager = nil; + self.pithosAccountManager = aPithosAccountManager; freshness = PithosNodeStateRefreshNeeded; forcedRefresh = NO; shared = NO; @@ -60,6 +60,9 @@ return self; } +- (id)init { + return [self initWithPithosAccountManager:nil]; +} - (BOOL)isEqual:(id)anObject { return ([anObject isKindOfClass:[self class]] && [((PithosNode *)anObject).url isEqual:self.url]); diff --git a/pithos-macos/PithosObjectNode.h b/pithos-macos/PithosObjectNode.h index f0b1318..a7b0230 100644 --- a/pithos-macos/PithosObjectNode.h +++ b/pithos-macos/PithosObjectNode.h @@ -56,9 +56,10 @@ 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; diff --git a/pithos-macos/PithosObjectNode.m b/pithos-macos/PithosObjectNode.m index 1cf8cf1..7587e6e 100644 --- a/pithos-macos/PithosObjectNode.m +++ b/pithos-macos/PithosObjectNode.m @@ -54,14 +54,15 @@ #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; - isLeafItem = YES; } return self; } diff --git a/pithos-macos/PithosSharingAccountsNode.h b/pithos-macos/PithosSharingAccountsNode.h index 5f86aea..bf3aa97 100644 --- a/pithos-macos/PithosSharingAccountsNode.h +++ b/pithos-macos/PithosSharingAccountsNode.h @@ -50,6 +50,6 @@ @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 diff --git a/pithos-macos/PithosSharingAccountsNode.m b/pithos-macos/PithosSharingAccountsNode.m index c30091c..76352d0 100644 --- a/pithos-macos/PithosSharingAccountsNode.m +++ b/pithos-macos/PithosSharingAccountsNode.m @@ -51,8 +51,8 @@ #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 = @""; } @@ -187,12 +187,12 @@ 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.pithosAccountManager = pithosAccountManager; if (children) { NSUInteger oldIndex = [children indexOfObject:node]; if (oldIndex != NSNotFound) { diff --git a/pithos-macos/PithosSubdirNode.h b/pithos-macos/PithosSubdirNode.h index 2d55b0e..6bb0e37 100644 --- a/pithos-macos/PithosSubdirNode.h +++ b/pithos-macos/PithosSubdirNode.h @@ -54,9 +54,10 @@ BOOL refreshParent; } -- (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; diff --git a/pithos-macos/PithosSubdirNode.m b/pithos-macos/PithosSubdirNode.m index d5744a1..7c3d513 100644 --- a/pithos-macos/PithosSubdirNode.m +++ b/pithos-macos/PithosSubdirNode.m @@ -62,14 +62,15 @@ static NSImage *sharedIcon = nil; #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; - refreshParent = NO; } return self; } diff --git a/pithos-macos/pithos_macosAppDelegate.m b/pithos-macos/pithos_macosAppDelegate.m index 01d4c87..95d22ae 100644 --- a/pithos-macos/pithos_macosAppDelegate.m +++ b/pithos-macos/pithos_macosAppDelegate.m @@ -97,14 +97,14 @@ currentPithosAccount, pithosAccounts, pithosAccountsDictionary, syncPithosAccoun 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]; + self.pithosBrowserController.pithosAccountManager = currentPithosAccount; if (currentPithosAccount.active) { [self savePithosAccounts:self]; - self.pithosBrowserController.pithosAccountManager = currentPithosAccount; [self showPithosBrowser:self]; self.pithosBrowserController.pithos = currentPithosAccount.pithos; } else { @@ -459,6 +459,7 @@ void LSSharedFileListChanged(LSSharedFileListRef inList, void *context) { [self.pithosBrowserController.window close]; [self.pithosBrowserController resetBrowser]; self.currentPithosAccount = [pithosAccounts objectAtIndex:0]; + self.pithosBrowserController.pithosAccountManager = currentPithosAccount; } } if ([self.syncPithosAccount isEqualTo:removedPithosAccount]) -- 1.7.10.4