X-Git-Url: https://code.grnet.gr/git/pithos-macos/blobdiff_plain/258db46f261ba5b910f5441d3469f5fb64d28800..e8e3d71e3b001f4783889dcab46bf356f488b279:/pithos-macos/PithosBrowserController.m diff --git a/pithos-macos/PithosBrowserController.m b/pithos-macos/PithosBrowserController.m index 17420db..e8f0743 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)]; @@ -280,6 +277,10 @@ [downloadCallbackQueue cancelAllOperations]; [downloadCallbackQueue setSuspended:YES]; + [accountNode pithosNodeWillBeRemoved]; + [mySharedNode pithosNodeWillBeRemoved]; + [othersSharedNode pithosNodeWillBeRemoved]; + rootNode = nil; [browser loadColumnZero]; [containersNodeChildren removeAllObjects]; @@ -1960,9 +1961,9 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column { - (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMinimumPosition ofSubviewAt:(NSInteger)dividerIndex { if (splitView == verticalSplitView) - return 120; + return 140; else - return ([horizontalSplitView bounds].size.height - 108); + return ([horizontalSplitView bounds].size.height - 142); } - (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMaximumPosition ofSubviewAt:(NSInteger)dividerIndex { @@ -1972,17 +1973,12 @@ forDraggedRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column { return ([horizontalSplitView bounds].size.height - 108); } -- (CGFloat)splitView:(NSSplitView *)splitView constrainSplitPosition:(CGFloat)proposedPosition ofSubviewAt:(NSInteger)dividerIndex { - if (splitView == verticalSplitView) { - if (proposedPosition < 120) - return 120; - else if (proposedPosition > 220) - return 220; - else - return proposedPosition; - } else { - return ([horizontalSplitView bounds].size.height - 108); +- (BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)view { + if (((splitView == verticalSplitView) && (view == leftView)) || + ((splitView == horizontalSplitView) && (view == leftBottomView))) { + return NO; } + return YES; } #pragma mark -