From: Miltiadis Vasilakis Date: Thu, 1 Mar 2012 11:01:58 +0000 (+0200) Subject: Support changes in container and object metadata. X-Git-Tag: v0.7~1 X-Git-Url: https://code.grnet.gr/git/pithos-macos/commitdiff_plain/46b46b83b82ab55ea8d993dac74bb73a2899fc1d Support changes in container and object metadata. --- diff --git a/pithos-apple-common b/pithos-apple-common index 097cb83..2f816d2 160000 --- a/pithos-apple-common +++ b/pithos-apple-common @@ -1 +1 @@ -Subproject commit 097cb8319ef7a831c06f6154df3c63b043382ff2 +Subproject commit 2f816d2a00400b8a2ccd2447872769fb72cc1a89 diff --git a/pithos-macos/PithosAccountNode.m b/pithos-macos/PithosAccountNode.m index 7f581af..d517b11 100644 --- a/pithos-macos/PithosAccountNode.m +++ b/pithos-macos/PithosAccountNode.m @@ -219,7 +219,8 @@ static NSImage *sharedIcon = nil; if (oldIndex != NSNotFound) { // Use the same pointer value, if possible node = [children objectAtIndex:oldIndex]; - node.pithosContainer = container; +// node.pithosContainer = container; + [node setLimitedPithosContainer:container]; [keptNodes addIndex:oldIndex]; } } diff --git a/pithos-macos/PithosContainerNode.h b/pithos-macos/PithosContainerNode.h index 9b60a4f..e89a986 100644 --- a/pithos-macos/PithosContainerNode.h +++ b/pithos-macos/PithosContainerNode.h @@ -69,5 +69,6 @@ - (void)applyInfo; - (void)refreshInfo; +- (void)setLimitedPithosContainer:(ASIPithosContainer *)aPithosContainer; @end \ No newline at end of file diff --git a/pithos-macos/PithosContainerNode.m b/pithos-macos/PithosContainerNode.m index 1752a0c..eb695c0 100644 --- a/pithos-macos/PithosContainerNode.m +++ b/pithos-macos/PithosContainerNode.m @@ -205,6 +205,20 @@ static NSImage *sharedIcon = nil; } } +- (void)setLimitedPithosContainer:(ASIPithosContainer *)aPithosContainer { + if (![pithosContainer isEqualTo:aPithosContainer]) { + self.pithosContainer.name = aPithosContainer.name; + self.pithosContainer.count = aPithosContainer.count; + self.pithosContainer.bytes = aPithosContainer.bytes; + self.pithosContainer.lastModified = aPithosContainer.lastModified; + self.pithosContainer.untilTimestamp = aPithosContainer.untilTimestamp; + if (!pithosNodeInfoController) { + self.pithosContainer.policy = aPithosContainer.policy; + self.pithosContainer = pithosContainer; + } + } +} + #pragma mark - #pragma mark ASIHTTPRequestDelegate @@ -287,7 +301,8 @@ static NSImage *sharedIcon = nil; // Use the same pointer value, if possible node = [children objectAtIndex:oldIndex]; node.pithosContainer = pithosContainer; - node.pithosObject = object; +// node.pithosObject = object; + [node setLimitedPithosObject:object]; [keptNodes addIndex:oldIndex]; } } @@ -308,7 +323,8 @@ static NSImage *sharedIcon = nil; // Use the same pointer value, if possible node = [children objectAtIndex:oldIndex]; node.pithosContainer = pithosContainer; - node.pithosObject = object; +// node.pithosObject = object; + [node setLimitedPithosObject:object]; [keptNodes addIndex:oldIndex]; } } @@ -326,7 +342,8 @@ static NSImage *sharedIcon = nil; // Use the same pointer value, if possible node = [children objectAtIndex:oldIndex]; node.pithosContainer = pithosContainer; - node.pithosObject = object; +// node.pithosObject = object; + [node setLimitedPithosObject:object]; [keptNodes addIndex:oldIndex]; } } @@ -513,8 +530,10 @@ static NSImage *sharedIcon = nil; #pragma mark Actions - (void)showPithosNodeInfo:(id)sender { - if (!pithosNodeInfoController) + if (!pithosNodeInfoController) { pithosNodeInfoController = [[PithosContainerNodeInfoController alloc] initWithPithosNode:self]; + [self refreshInfo]; + } [pithosNodeInfoController showWindow:sender]; [[pithosNodeInfoController window] makeKeyAndOrderFront:sender]; [NSApp activateIgnoringOtherApps:YES]; diff --git a/pithos-macos/PithosObjectNode.h b/pithos-macos/PithosObjectNode.h index 285ff0f..9e3ba72 100644 --- a/pithos-macos/PithosObjectNode.h +++ b/pithos-macos/PithosObjectNode.h @@ -63,5 +63,6 @@ - (void)applyInfo; - (void)refreshInfo; +- (void)setLimitedPithosObject:(ASIPithosObject *)aPithosObject; @end \ No newline at end of file diff --git a/pithos-macos/PithosObjectNode.m b/pithos-macos/PithosObjectNode.m index 9f6f4e0..6217018 100644 --- a/pithos-macos/PithosObjectNode.m +++ b/pithos-macos/PithosObjectNode.m @@ -131,6 +131,29 @@ [[NSNotificationCenter defaultCenter] postNotificationName:@"PithosBrowserRefreshNeeeded" object:self]; } +- (void)setLimitedPithosObject:(ASIPithosObject *)aPithosObject { + if (![pithosObject isEqualTo:aPithosObject]) { + self.pithosObject.subdir = aPithosObject.subdir; + self.pithosObject.name = aPithosObject.name; + self.pithosObject.hash = aPithosObject.hash; + self.pithosObject.objectHash = aPithosObject.objectHash; + self.pithosObject.UUID = aPithosObject.UUID; + self.pithosObject.bytes = aPithosObject.bytes; + self.pithosObject.contentType = aPithosObject.contentType; + self.pithosObject.lastModified = aPithosObject.lastModified; + self.pithosObject.version = aPithosObject.version; + self.pithosObject.versionTimestamp = aPithosObject.versionTimestamp; + self.pithosObject.modifiedBy = aPithosObject.modifiedBy; + self.pithosObject.sharedBy = aPithosObject.sharedBy; + self.pithosObject.allowedTo = aPithosObject.allowedTo; + if (!pithosNodeInfoController) { + self.pithosObject.sharing = aPithosObject.sharing; + self.pithosObject.publicURI = aPithosObject.publicURI; + self.pithosObject = pithosObject; + } + } +} + #pragma mark - #pragma mark ASIHTTPRequestDelegate @@ -272,8 +295,10 @@ #pragma mark Actions - (void)showPithosNodeInfo:(id)sender { - if (!pithosNodeInfoController) + if (!pithosNodeInfoController) { pithosNodeInfoController = [[PithosObjectNodeInfoController alloc] initWithPithosNode:self]; + [self refreshInfo]; + } [pithosNodeInfoController showWindow:sender]; [[pithosNodeInfoController window] makeKeyAndOrderFront:sender]; [NSApp activateIgnoringOtherApps:YES]; diff --git a/pithos-macos/PithosPreferencesController.xib b/pithos-macos/PithosPreferencesController.xib index d59fa89..48f9634 100644 --- a/pithos-macos/PithosPreferencesController.xib +++ b/pithos-macos/PithosPreferencesController.xib @@ -81,6 +81,7 @@ 256 {118, 177} + _NS:1828 YES @@ -89,6 +90,7 @@ 256 {118, 17} + _NS:1830 @@ -189,6 +191,7 @@ {{1, 17}, {118, 177}} + _NS:1826 @@ -200,6 +203,7 @@ -2147483392 {{224, 17}, {15, 102}} + _NS:1845 @@ -212,6 +216,7 @@ -2147483392 {{1, 48.325627356767654}, {82.028970718383789, 15}} + _NS:1847 1 @@ -228,6 +233,7 @@ {{1, 0}, {118, 17}} + _NS:1831 @@ -237,6 +243,7 @@ {{20, 47}, {120, 195}} + _NS:1824 133682 @@ -251,14 +258,15 @@ 18 {{147, 37}, {265, 211}} - + + _NS:608 YES 1 - + 256 YES @@ -267,6 +275,7 @@ 268 {{14, 145}, {41, 14}} + YES @@ -290,6 +299,7 @@ 266 {{60, 143}, {168, 19}} + YES @@ -318,6 +328,7 @@ 266 {{60, 85}, {168, 19}} + YES @@ -336,6 +347,7 @@ 266 {{60, 58}, {168, 19}} + YES @@ -354,6 +366,7 @@ 268 {{14, 87}, {41, 14}} + YES @@ -372,6 +385,7 @@ 268 {{14, 60}, {41, 14}} + YES @@ -390,6 +404,7 @@ 268 {{14, 112}, {86, 14}} + YES @@ -408,6 +423,7 @@ -2147483634 {{-3, 132}, {251, 5}} + {0, 0} @@ -431,6 +447,7 @@ 268 {{57, 34}, {63, 18}} + YES @@ -459,6 +476,7 @@ 289 {{161, 4}, {72, 28}} + YES @@ -485,6 +503,7 @@ 289 {{91, 4}, {72, 28}} + YES @@ -504,6 +523,8 @@ {{10, 33}, {245, 165}} + + _NS:610 @@ -600,7 +621,6 @@ 289 {{161, 4}, {72, 28}} - YES -2080244224 @@ -674,7 +694,7 @@ 3 - + 256 YES @@ -1041,7 +1061,7 @@ 289 {{161, 4}, {72, 28}} - + YES -2080244224 @@ -1082,7 +1102,6 @@ {{10, 33}, {245, 165}} - Groups @@ -1090,14 +1109,14 @@ - + 0 YES YES YES - + @@ -1105,6 +1124,7 @@ 292 {{20, 19}, {20, 20}} + _NS:2510 YES @@ -1129,6 +1149,7 @@ 292 {{39, 19}, {20, 20}} + _NS:2510 YES @@ -1151,6 +1172,7 @@ {425, 262} + {{0, 0}, {1280, 778}} @@ -2951,7 +2973,283 @@ 865 - + + + YES + + GroupAndGroupMemberFormatter + NSFormatter + + IBProjectSource + ./Classes/GroupAndGroupMemberFormatter.h + + + + NonEmptyStringFormatter + NSFormatter + + IBProjectSource + ./Classes/NonEmptyStringFormatter.h + + + + PithosBrowserController + NSWindowController + + YES + + YES + forceRefresh: + refresh: + + + YES + id + id + + + + YES + + YES + forceRefresh: + refresh: + + + YES + + forceRefresh: + id + + + refresh: + id + + + + + YES + + YES + activityProgressIndicator + activityTextField + browser + browserMenu + horizontalSplitView + leftBottomView + leftTopView + outlineView + outlineViewMenu + verticalSplitView + + + YES + NSProgressIndicator + NSTextField + NSBrowser + NSMenu + NSSplitView + NSView + NSView + NSOutlineView + NSMenu + NSSplitView + + + + YES + + YES + activityProgressIndicator + activityTextField + browser + browserMenu + horizontalSplitView + leftBottomView + leftTopView + outlineView + outlineViewMenu + verticalSplitView + + + YES + + activityProgressIndicator + NSProgressIndicator + + + activityTextField + NSTextField + + + browser + NSBrowser + + + browserMenu + NSMenu + + + horizontalSplitView + NSSplitView + + + leftBottomView + NSView + + + leftTopView + NSView + + + outlineView + NSOutlineView + + + outlineViewMenu + NSMenu + + + verticalSplitView + NSSplitView + + + + + IBProjectSource + ./Classes/PithosBrowserController.h + + + + PithosPreferencesController + NSWindowController + + YES + + YES + addAccount: + groupsApply: + groupsRevert: + login: + loginCancel: + removeAccount: + syncApply: + syncCancel: + + + YES + id + id + id + id + id + id + id + id + + + + YES + + YES + addAccount: + groupsApply: + groupsRevert: + login: + loginCancel: + removeAccount: + syncApply: + syncCancel: + + + YES + + addAccount: + id + + + groupsApply: + id + + + groupsRevert: + id + + + login: + id + + + loginCancel: + id + + + removeAccount: + id + + + syncApply: + id + + + syncCancel: + id + + + + + YES + + YES + accountsArrayController + groupsDictionaryController + pithosBrowserController + selectedGroupMembersDictionaryController + + + YES + NSArrayController + NSDictionaryController + PithosBrowserController + NSDictionaryController + + + + YES + + YES + accountsArrayController + groupsDictionaryController + pithosBrowserController + selectedGroupMembersDictionaryController + + + YES + + accountsArrayController + NSArrayController + + + groupsDictionaryController + NSDictionaryController + + + pithosBrowserController + PithosBrowserController + + + selectedGroupMembersDictionaryController + NSDictionaryController + + + + + IBProjectSource + ./Classes/PithosPreferencesController.h + + + + 0 IBCocoaFramework diff --git a/pithos-macos/PithosSubdirNode.h b/pithos-macos/PithosSubdirNode.h index abaf74f..76c23ed 100644 --- a/pithos-macos/PithosSubdirNode.h +++ b/pithos-macos/PithosSubdirNode.h @@ -59,5 +59,6 @@ - (void)applyInfo; - (void)refreshInfo; +- (void)setLimitedPithosObject:(ASIPithosObject *)aPithosObject; @end \ No newline at end of file diff --git a/pithos-macos/PithosSubdirNode.m b/pithos-macos/PithosSubdirNode.m index c8175c7..7cf150f 100644 --- a/pithos-macos/PithosSubdirNode.m +++ b/pithos-macos/PithosSubdirNode.m @@ -140,6 +140,29 @@ static NSImage *sharedIcon = nil; } } +- (void)setLimitedPithosObject:(ASIPithosObject *)aPithosObject { + if (![pithosObject isEqualTo:aPithosObject]) { + self.pithosObject.subdir = aPithosObject.subdir; + self.pithosObject.name = aPithosObject.name; + self.pithosObject.hash = aPithosObject.hash; + self.pithosObject.objectHash = aPithosObject.objectHash; + self.pithosObject.UUID = aPithosObject.UUID; + self.pithosObject.bytes = aPithosObject.bytes; + self.pithosObject.contentType = aPithosObject.contentType; + self.pithosObject.lastModified = aPithosObject.lastModified; + self.pithosObject.version = aPithosObject.version; + self.pithosObject.versionTimestamp = aPithosObject.versionTimestamp; + self.pithosObject.modifiedBy = aPithosObject.modifiedBy; + self.pithosObject.sharedBy = aPithosObject.sharedBy; + self.pithosObject.allowedTo = aPithosObject.allowedTo; + if (!pithosNodeInfoController) { + self.pithosObject.sharing = aPithosObject.sharing; + self.pithosObject.publicURI = aPithosObject.publicURI; + self.pithosObject = pithosObject; + } + } +} + #pragma mark - #pragma mark ASIHTTPRequestDelegate @@ -369,8 +392,10 @@ static NSImage *sharedIcon = nil; #pragma mark Actions - (void)showPithosNodeInfo:(id)sender { - if (!pithosNodeInfoController) + if (!pithosNodeInfoController) { pithosNodeInfoController = [[PithosObjectNodeInfoController alloc] initWithPithosNode:self]; + [self refreshInfo]; + } [pithosNodeInfoController showWindow:sender]; [[pithosNodeInfoController window] makeKeyAndOrderFront:sender]; [NSApp activateIgnoringOtherApps:YES];