From 90fadc45da65e2cc40f70560d175c699e356fe7a Mon Sep 17 00:00:00 2001 From: Miltiadis Vasilakis Date: Thu, 29 Sep 2011 18:53:03 +0300 Subject: [PATCH] Shift-refresh forces no use of cache. Other changes. --- pithos-apple-common | 2 +- pithos-macos/PithosAccountNode.m | 8 +- pithos-macos/PithosBrowserController.m | 24 +- pithos-macos/PithosContainerNode.m | 6 +- pithos-macos/PithosFileUtilities.m | 20 +- pithos-macos/PithosNode.h | 4 + pithos-macos/PithosNode.m | 9 +- pithos-macos/PithosPreferencesController.h | 1 - pithos-macos/PithosPreferencesController.m | 32 +- pithos-macos/PithosPreferencesController.xib | 1597 ++++++++++++++++++-------- pithos-macos/PithosSharingAccountsNode.m | 8 +- pithos-macos/pithos_macosAppDelegate.m | 1 - 12 files changed, 1202 insertions(+), 510 deletions(-) diff --git a/pithos-apple-common b/pithos-apple-common index 83e121f..9d03a93 160000 --- a/pithos-apple-common +++ b/pithos-apple-common @@ -1 +1 @@ -Subproject commit 83e121faad77eff1bba9a13b42992429d381359d +Subproject commit 9d03a93cefc1d00120c777deb4c692f85b9cbc41 diff --git a/pithos-macos/PithosAccountNode.m b/pithos-macos/PithosAccountNode.m index 1087fcf..14d0642 100644 --- a/pithos-macos/PithosAccountNode.m +++ b/pithos-macos/PithosAccountNode.m @@ -88,7 +88,8 @@ static NSImage *sharedIcon = nil; accountRequest.delegate = self; accountRequest.didFinishSelector = @selector(accountRequestFinished:); accountRequest.didFailSelector = @selector(accountRequestFailed:); - accountRequest.downloadCache = [ASIDownloadCache sharedCache]; + if (!forcedRefresh) + accountRequest.downloadCache = [ASIDownloadCache sharedCache]; [accountRequest startAsynchronous]; break; case PithosNodeStateRefreshing: @@ -166,6 +167,7 @@ static NSImage *sharedIcon = nil; accountRequest = nil; [containers release]; containers = nil; + forcedRefresh = NO; @synchronized(self) { freshness = PithosNodeStateRefreshFinished; } @@ -181,7 +183,8 @@ static NSImage *sharedIcon = nil; if (sharingAccount) [accountRequest setRequestUserFromDefaultTo:sharingAccount]; accountRequest.delegate = self; - accountRequest.downloadCache = [ASIDownloadCache sharedCache]; + if (!forcedRefresh) + accountRequest.downloadCache = [ASIDownloadCache sharedCache]; [accountRequest startAsynchronous]; } } @@ -194,6 +197,7 @@ static NSImage *sharedIcon = nil; accountRequest = nil; [containers release]; containers = nil; + forcedRefresh = NO; @synchronized(self) { freshness = PithosNodeStateRefreshNeeded; } diff --git a/pithos-macos/PithosBrowserController.m b/pithos-macos/PithosBrowserController.m index 2672e8b..4ec654a 100644 --- a/pithos-macos/PithosBrowserController.m +++ b/pithos-macos/PithosBrowserController.m @@ -148,13 +148,14 @@ [browser loadColumnZero]; [containersNodeChildren removeAllObjects]; [outlineView reloadData]; - // Expand the folder outline view [outlineView expandItem:nil expandChildren:YES]; [outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO]; // Refresh account [accountNode refresh]; + [mySharedNode refresh]; + [othersSharedNode refresh]; } - (void)windowDidLoad { @@ -284,7 +285,7 @@ // Expand the folder outline view [outlineView expandItem:nil expandChildren:YES]; - if ((rootNode == containersNode) || (rootNode == sharedNode)) { + if ((rootNode == nil) || (rootNode == containersNode) || (rootNode == sharedNode)) { rootNode = [containersNodeChildren objectAtIndex:0]; [browser loadColumnZero]; } @@ -301,10 +302,21 @@ #pragma mark Actions - (IBAction)refresh:(id)sender { - if (sender) - [accountNode refresh]; - for (NSInteger column = [browser lastColumn]; column >= 0; column--) { - [(PithosNode *)[browser parentForItemsInColumn:column] invalidateChildren]; + if ([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask) { + if (sender) + [accountNode forceRefresh]; + for (NSInteger column = [browser lastColumn]; column >= 0; column--) { + PithosNode *node = (PithosNode *)[browser parentForItemsInColumn:column]; + node.forcedRefresh = YES; + [(PithosNode *)[browser parentForItemsInColumn:column] invalidateChildren]; + //[(PithosNode *)[browser parentForItemsInColumn:column] forceRefresh]; + } + } else { + if (sender) + [accountNode refresh]; + for (NSInteger column = [browser lastColumn]; column >= 0; column--) { + [(PithosNode *)[browser parentForItemsInColumn:column] invalidateChildren]; + } } [browser validateVisibleColumns]; } diff --git a/pithos-macos/PithosContainerNode.m b/pithos-macos/PithosContainerNode.m index 84663a6..0fa0e2a 100644 --- a/pithos-macos/PithosContainerNode.m +++ b/pithos-macos/PithosContainerNode.m @@ -132,7 +132,8 @@ static NSImage *sharedIcon = nil; containerRequest.delegate = self; containerRequest.didFinishSelector = @selector(containerRequestFinished:); containerRequest.didFailSelector = @selector(containerRequestFailed:); - containerRequest.downloadCache = [ASIDownloadCache sharedCache]; + if (!forcedRefresh) + containerRequest.downloadCache = [ASIDownloadCache sharedCache]; [containerRequest startAsynchronous]; break; case PithosNodeStateRefreshing: @@ -283,6 +284,7 @@ static NSImage *sharedIcon = nil; containerRequest = nil; [objects release]; objects = nil; + forcedRefresh = NO; @synchronized(self) { freshness = PithosNodeStateRefreshFinished; } @@ -303,6 +305,7 @@ static NSImage *sharedIcon = nil; if (sharingAccount) [containerRequest setRequestUserFromDefaultTo:sharingAccount]; containerRequest.delegate = self; + if (!forcedRefresh) containerRequest.downloadCache = [ASIDownloadCache sharedCache]; [containerRequest startAsynchronous]; } @@ -316,6 +319,7 @@ static NSImage *sharedIcon = nil; containerRequest = nil; [objects release]; objects = nil; + forcedRefresh = NO; @synchronized(self) { freshness = PithosNodeStateRefreshNeeded; } diff --git a/pithos-macos/PithosFileUtilities.m b/pithos-macos/PithosFileUtilities.m index 8e082be..8d4b564 100644 --- a/pithos-macos/PithosFileUtilities.m +++ b/pithos-macos/PithosFileUtilities.m @@ -481,6 +481,7 @@ metadata:nil destinationContainerName:destinationContainerName destinationObjectName:destinationObjectName + destinationAccount:nil sourceVersion:nil]; if (sharingAccount) [objectRequest setRequestUserFromDefaultTo:sharingAccount]; @@ -516,6 +517,7 @@ metadata:nil destinationContainerName:destinationContainerName destinationObjectName:objectName + destinationAccount:nil sourceVersion:nil]; if (sharingAccount) [objectRequest setRequestUserFromDefaultTo:sharingAccount]; @@ -533,6 +535,7 @@ metadata:nil destinationContainerName:destinationContainerName destinationObjectName:object.name + destinationAccount:nil sourceVersion:nil]; if (sharingAccount) [objectRequest setRequestUserFromDefaultTo:sharingAccount]; @@ -551,6 +554,7 @@ metadata:nil destinationContainerName:destinationContainerName destinationObjectName:destinationObjectName + destinationAccount:nil sourceVersion:nil]; if (sharingAccount) [objectRequest setRequestUserFromDefaultTo:sharingAccount]; @@ -574,6 +578,7 @@ metadata:nil destinationContainerName:destinationContainerName destinationObjectName:newObjectName + destinationAccount:nil sourceVersion:nil]; if (sharingAccount) [objectRequest setRequestUserFromDefaultTo:sharingAccount]; @@ -607,7 +612,8 @@ isPublic:ASIPithosObjectRequestPublicIgnore metadata:nil destinationContainerName:destinationContainerName - destinationObjectName:destinationObjectName]; + destinationObjectName:destinationObjectName + destinationAccount:nil]; return objectRequest; } @@ -636,7 +642,8 @@ isPublic:ASIPithosObjectRequestPublicIgnore metadata:nil destinationContainerName:destinationContainerName - destinationObjectName:objectName]]; + destinationObjectName:objectName + destinationAccount:nil]]; for (ASIPithosObject *object in objects) { [objectRequests addObject:[ASIPithosObjectRequest moveObjectDataRequestWithContainerName:containerName objectName:object.name @@ -648,7 +655,8 @@ isPublic:ASIPithosObjectRequestPublicIgnore metadata:nil destinationContainerName:destinationContainerName - destinationObjectName:object.name]]; + destinationObjectName:object.name + destinationAccount:nil]]; } } else { if (![objectName hasSuffix:@"/"]) { @@ -662,7 +670,8 @@ isPublic:ASIPithosObjectRequestPublicIgnore metadata:nil destinationContainerName:destinationContainerName - destinationObjectName:destinationObjectName]]; + destinationObjectName:destinationObjectName + destinationAccount:nil]]; } NSRange prefixRange = NSMakeRange(0, [objectName length]); NSString *newObjectName; @@ -681,7 +690,8 @@ isPublic:ASIPithosObjectRequestPublicIgnore metadata:nil destinationContainerName:destinationContainerName - destinationObjectName:newObjectName]]; + destinationObjectName:newObjectName + destinationAccount:nil]]; } } diff --git a/pithos-macos/PithosNode.h b/pithos-macos/PithosNode.h index e4594b0..b3b2cea 100644 --- a/pithos-macos/PithosNode.h +++ b/pithos-macos/PithosNode.h @@ -46,6 +46,7 @@ @interface PithosNode : NSObject { NSInteger freshness; + BOOL forcedRefresh; NSString *url; @@ -63,6 +64,8 @@ PithosNodeInfoController *pithosNodeInfoController; } +@property(nonatomic, assign) BOOL forcedRefresh; + @property(nonatomic, readonly) NSString *url; @property(nonatomic, assign) PithosNode *parent; @@ -81,6 +84,7 @@ - (void)invalidateChildren; - (void)invalidateChildrenRecursive; - (void)refresh; +- (void)forceRefresh; - (void)showPithosNodeInfo:(id)sender; - (void)pithosNodeInfoWillClose:(id)sender; diff --git a/pithos-macos/PithosNode.m b/pithos-macos/PithosNode.m index 4f1528a..ccb60cd 100644 --- a/pithos-macos/PithosNode.m +++ b/pithos-macos/PithosNode.m @@ -37,9 +37,10 @@ #import "PithosNode.h" #import "PithosNodeInfoController.h" +#import "ASIDownloadCache.h" @implementation PithosNode -@synthesize parent, shared, sharingAccount, displayName, isLeafItem, icon; +@synthesize forcedRefresh, parent, shared, sharingAccount, displayName, isLeafItem, icon; @dynamic url, children, pithosContainer, pithosObject; #pragma mark - @@ -48,6 +49,7 @@ - (id)init { if ((self == [super init])) { freshness = PithosNodeStateRefreshNeeded; + forcedRefresh = NO; shared = NO; isLeafItem = NO; } @@ -115,6 +117,11 @@ self.children; } +- (void)forceRefresh { + forcedRefresh = YES; + [self refresh]; +} + - (void)showPithosNodeInfo:(id)sender { // Abstract method } diff --git a/pithos-macos/PithosPreferencesController.h b/pithos-macos/PithosPreferencesController.h index f9160b7..091c4e9 100644 --- a/pithos-macos/PithosPreferencesController.h +++ b/pithos-macos/PithosPreferencesController.h @@ -54,6 +54,5 @@ - (IBAction)toolbarItemSelected:(id)sender; - (IBAction)authenticationLogin:(id)sender; -- (IBAction)authenticationManual:(id)sender; @end diff --git a/pithos-macos/PithosPreferencesController.m b/pithos-macos/PithosPreferencesController.m index 0f59d89..373620e 100644 --- a/pithos-macos/PithosPreferencesController.m +++ b/pithos-macos/PithosPreferencesController.m @@ -56,33 +56,19 @@ // Select the first tab when the window is loaded for the first time. [[window valueForKeyPath:@"toolbar"] setSelectedItemIdentifier:@"0"]; -// // Monitor changes. -// [userDefaultsController addObserver:self -// forKeyPath:@"values.authUser" -// options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) -// context:NULL]; -// [userDefaultsController addObserver:self -// forKeyPath:@"values.authToken" -// options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld) -// context:NULL]; - [window setDelegate:self]; } -// We do this to catch the case where the user enters a value into one of -// the text fields but closes the window without hitting enter or tab. -// TODO: Does not seem to work. -- (BOOL)windowShouldClose:(NSWindow *)window { - return [window makeFirstResponder:nil]; +- (void)windowWillClose:(NSNotification *)notification { + [[self window] makeFirstResponder:nil]; + NSString *authUser = [[userDefaultsController values] valueForKey:@"authUser"]; + NSString *authToken = [[userDefaultsController values] valueForKey:@"authToken"]; + [(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] authenticateWithAuthUser:authUser authToken:authToken]; } - (IBAction)toolbarItemSelected:(id)sender { } -//- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { -// NSLog(@"observeValueForKeyPath: %@ %@", keyPath, [userDefaultsController valueForKeyPath:keyPath]); -//} - #pragma mark - #pragma Authentication @@ -99,12 +85,4 @@ // XXX check the case where this happens for the first time } -- (IBAction)authenticationManual:(id)sender { - [userDefaultsController save:sender]; - // Because of delayed saves of the userDefaultsController, we use the TextField values directly, instead of - //NSString *authUser = [[userDefaultsController values] valueForKey:@"authUser"]; - //NSString *authToken = [[userDefaultsController values] valueForKey:@"authToken"]; - [(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] authenticateWithAuthUser:[authenticationUserTextField stringValue] authToken:[authenticationTokenTextField stringValue]]; -} - @end diff --git a/pithos-macos/PithosPreferencesController.xib b/pithos-macos/PithosPreferencesController.xib index bd03e83..50000a6 100644 --- a/pithos-macos/PithosPreferencesController.xib +++ b/pithos-macos/PithosPreferencesController.xib @@ -1,29 +1,39 @@ - 1070 - 11A511 - 1617 - 1138 - 566.00 + 1060 + 10K549 + 1306 + 1038.36 + 461.00 com.apple.InterfaceBuilder.CocoaPlugin - 1617 + 1306 YES - NSUserDefaultsController - NSToolbar - NSButton - NSButtonCell - NSTextFieldCell NSTabView + NSMenuItem + NSMenu + NSToolbarItem + NSButton NSCustomObject - NSTabViewItem - NSView - NSWindowTemplate + NSTableView NSTextField - NSToolbarItem + NSWindowTemplate + NSTextFieldCell + NSButtonCell + NSTableColumn + NSBox + NSView + NSPopUpButtonCell + NSToolbar + NSScrollView + NSTabViewItem + NSUserDefaultsController + NSScroller + NSTableHeaderView + NSPopUpButton YES @@ -50,7 +60,7 @@ 3 2 - {{403, 468}, {338, 135}} + {{403, 468}, {265, 159}} 1954022400 Pithos Preferences NSWindow @@ -70,7 +80,7 @@ YES 16C40F9F-7895-4E0A-9FAE-C1854DDC3902 - 39E17C0B-AF3B-4277-B1E2-E65416307BF2 + 643A9C77-8691-4CBA-A6FC-3C11E1B55252 YES @@ -96,17 +106,17 @@ YES 0 - + - 39E17C0B-AF3B-4277-B1E2-E65416307BF2 + 643A9C77-8691-4CBA-A6FC-3C11E1B55252 - Authentication - Authentication + Groups + Groups NSImage - NSUser + NSEveryone @@ -120,21 +130,20 @@ - + YES - + - + YES - + - - {338, 135} - {338, 135} + {265, 159} + {265, 159} 274 @@ -143,40 +152,41 @@ 12 - {338, 135} + {265, 159} - + YES 0 - + 274 YES - + 268 - {{17, 96}, {48, 17}} + {{12, 116}, {83, 14}} - + YES - + 68288064 71304192 - Folder: - + Sync pithos to: + LucidaGrande - 13 - 1044 + 11 + 3100 - + + YES 6 System controlColor - + 3 MC42NjY2NjY2NjY3AA @@ -192,29 +202,177 @@ - + - 270 - {{70, 93}, {248, 22}} + 268 + {{12, 62}, {64, 14}} - + YES - - -1804468671 - 272630784 - Folder - - + + 68288064 + 71304192 + User: + + YES + + + + + + + 268 + {{12, 41}, {64, 14}} + + + YES + + 68288064 + 71304192 + Token: + + + YES + + + + + + + 268 + {{7, 84}, {86, 14}} + + + YES + + 68288064 + 4195328 + Authentication: + + + YES + + + + + + + 268 + {{7, 138}, {49, 14}} + + + YES + + 68288064 + 4195328 + Syncing: + + + YES + + + + + + + -2147483634 + {{0, 99}, {265, 5}} + + + {0, 0} + + 67239424 + 0 + Box + + LucidaGrande + 13 + 1044 + 6 System textBackgroundColor - + 3 MQA + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + 3 + 2 + 0 + NO + + + + -2147483634 + {{0, 23}, {265, 5}} + + + {0, 0} + + 67239424 + 0 + Box + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + 3 + 2 + 0 + NO + + + + 289 + {{188, 2}, {72, 28}} + + + YES + + -2080244224 + 134348800 + Login + + + -2034876161 + 129 + + LucidaGrande + 11 + 16 + + + + 400 + 75 + + + + + 270 + {{81, 60}, {174, 19}} + + + YES + + -1804468671 + 272761856 + + + + YES + 6 System @@ -223,190 +381,508 @@ + + + 270 + {{81, 39}, {174, 19}} + + + YES + + -1804468671 + 272761856 + + + + YES + + + + + + + 268 + {{78, 19}, {63, 18}} + + + YES + + 67239424 + 131072 + Renew + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 268 + {{97, 111}, {161, 22}} + + + YES + + -2076049856 + 133120 + + + 109199615 + 129 + + + 400 + 75 + + + Item 1 + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + Item 2 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Item 3 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + 1 + YES + YES + 2 + + - {338, 135} - + {265, 159} + + General - + 1 - - + + 274 YES - - - 270 - {{70, 93}, {248, 22}} - - + + + 292 + {{5, 2}, {72, 28}} + + YES - - -1804468671 - 272630784 - User - - - YES - - + + -2080244224 + 134348800 + Revert + + + -2038021889 + 129 + + + + 400 + 75 - - - 268 - {{17, 95}, {48, 17}} - - + + + 289 + {{188, 2}, {72, 28}} + YES - - 68288064 - 71304192 - User: - - - - + + -2080244224 + 134348800 + Apply + + + -2034876161 + 129 + + + + 400 + 75 - - - 270 - {{70, 68}, {248, 22}} - - - YES - - -1804468671 - 272630784 - Token - - - YES - - + + + 4374 + + YES + + + 2304 + + YES + + + 4352 + {243, 78} + + + YES + + + 256 + {243, 17} + + + + + + + -2147483392 + {{224, 0}, {16, 17}} + + + + + YES + + 101 + 40 + 1000 + + 75628096 + 2048 + Name + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + Text Cell + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + YES + + + + 136 + 40 + 1000 + + 75628096 + 2048 + Members + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 1388314624 + + + 1 + 4 + 15 + 0 + YES + 0 + + + {{1, 17}, {243, 78}} + + + + + 4 + + + + -2147483392 + {{-100, -100}, {15, 102}} + + + + _doScroller: + 37 + 0.1947367936372757 + + + + -2147483392 + {{1, 119}, {223, 15}} + + + 1 + + _doScroller: + 0.57142859697341919 + + + + 2304 + + YES + + + {{1, 0}, {243, 17}} + + + + + 4 + + + {{10, 53}, {245, 96}} + + + 562 + + + + + + QSAAAEEgAABBmAAAQZgAAA - - - 268 - {{17, 71}, {48, 17}} - - + + + 292 + {{10, 33}, {18, 18}} + + YES - - 68288064 - 71304192 - Token: + + -2080244224 + 134217728 + - - - + + -2033434369 + 162 + + NSImage + NSAddTemplate + + + + 400 + 75 - - - 289 - {{228, 12}, {96, 32}} - - + + + 292 + {{27, 33}, {18, 18}} + + YES - - 67239424 + + -2080244224 134217728 - Login + - - -2038284033 - 129 + + -2033434369 + 162 + + NSImage + NSRemoveTemplate + - DQ - 200 - 25 + + 400 + 75 - - - 293 - {{121, 12}, {96, 32}} - - - YES - + + + -2147483634 + {{0, 23}, {265, 5}} + + + {0, 0} + 67239424 + 0 + Box + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + 3 + 2 + 0 + NO + + + + 292 + {{220, 33}, {18, 18}} + + + YES + + -2080244224 134217728 - Manual + - - -2038284033 - 129 + + -2033434369 + 162 + - Gw - 200 - 25 + + 400 + 75 - - - 268 - {{68, 46}, {63, 18}} - - + + + 292 + {{237, 33}, {18, 18}} + + YES - - 67239424 - 0 - Renew + + -2080244224 + 134217728 + - - 1211912703 - 2 - - NSImage - NSSwitch - - - NSSwitch - + + -2033434369 + 162 + - 200 - 25 + 400 + 75 - {338, 135} - - + {265, 159} + - Authentication + Groups - + 6 YES YES YES - + - {338, 135} + {{7, 11}, {265, 159}} {{0, 0}, {1680, 1028}} - {338, 213} - {338, 213} - YES + {265, 237} + {265, 237} YES @@ -417,123 +893,123 @@ YES - authenticationRenewCheckBox + window - + - 192 + 198 - - authenticationTokenTextField + + selectedIndex: window.toolbar.selectedItemIdentifier + + + + + + selectedIndex: window.toolbar.selectedItemIdentifier + selectedIndex + window.toolbar.selectedItemIdentifier + 2 + + + 208 + + + + toolbarItemSelected: - + - 193 + 209 - authenticationUserTextField + userDefaultsController - + - 194 + 211 - authenticationLogin: + toolbarItemSelected: - + - 196 + 214 - - authenticationManual: + + authenticationUserTextField - + - 197 + 353 - window + authenticationTokenTextField - + + + 354 + + + + authenticationRenewCheckBox + + + + 355 + + + + authenticationLogin: + + - 198 + 356 value: values.authUser - + - + value: values.authUser value values.authUser + + NSValidatesImmediately + + 2 - 204 + 373 value: values.authToken - + - + value: values.authToken value values.authToken + + NSValidatesImmediately + + 2 - 206 - - - - selectedIndex: window.toolbar.selectedItemIdentifier - - - - - - selectedIndex: window.toolbar.selectedItemIdentifier - selectedIndex - window.toolbar.selectedItemIdentifier - 2 - - - 208 - - - - toolbarItemSelected: - - - - 209 - - - - toolbarItemSelected: - - - - 210 - - - - userDefaultsController - - - - 211 + 374 @@ -578,8 +1054,8 @@ YES - + @@ -597,21 +1073,12 @@ YES - + - 10 - - - YES - - - - - 11 @@ -625,166 +1092,399 @@ YES - - + + + + + + + + + + + + - 63 - + 168 + + + + + 169 + + + + + 213 + + + + + 215 + YES - - - - - - - + - + - 167 - - + 216 + + + YES + + + + + + + + + + - 168 - - + 248 + + + YES + + + - 169 - - + 249 + + + YES + + + + + + 250 + + + + + 251 + + + + + 280 + + + YES + + + + + + + Scroll View - Table View - Metadata + + + 281 + + + YES + + + + + + 282 + + + YES + + + + + + 283 + + + + + 284 + + + + + 285 + + + + + 286 + + + YES + + + + + + + 287 + + + + + 288 + + + + + 289 + + + + + 290 + + + YES + + + + + + 291 + + + YES + + + + + + 292 + + + + + 293 + + + Text Field Cell - Text Cell + + + 294 + + + YES + + + + + + 295 + + + YES + + + + + + 296 + + + + + 297 + + - 179 - + 307 + YES - + - + + + + 310 + + - 180 - + 323 + YES - + - + - 178 - + 324 + YES - + - + - 177 - + 326 + YES - + - + + + + 327 + + + + + 328 + + + Horizontal Line - 173 - + 329 + YES - + - + - 172 - + 330 + YES - + - + + Content Encoding - 175 - + 331 + YES - + - + + Content Disposition - 186 - - + 332 + + - 189 - - + 333 + + - 188 - - + 334 + + - 184 - - + 335 + + - 183 - - + 337 + + - 181 - - + 338 + + + + + 343 + + + YES + + + - 182 - - + 344 + + - 199 - + 340 + YES - + - 200 - + 341 + + + + + 367 + YES - + - 201 - - + 368 + + + YES + + + + + + 369 + + + YES + + + + + + + + 370 + + + + + 371 + + - 202 - - + 372 + + @@ -795,41 +1495,71 @@ -1.IBPluginDependency -2.IBPluginDependency -3.IBPluginDependency - 10.IBPluginDependency 11.IBPluginDependency 12.IBPluginDependency - 167.IBPluginDependency - 167.designableToolbarItemIdentifier - 167.toolbarItem.selectable 168.IBPluginDependency 168.designableToolbarItemIdentifier 168.toolbarItem.selectable 169.IBPluginDependency - 172.IBPluginDependency - 173.IBPluginDependency - 175.IBPluginDependency - 177.IBPluginDependency - 178.IBPluginDependency - 179.IBPluginDependency - 180.IBPluginDependency - 181.IBPluginDependency - 182.IBPluginDependency - 183.IBPluginDependency - 184.IBPluginDependency - 186.IBPluginDependency - 188.IBPluginDependency - 189.IBPluginDependency - 199.IBPluginDependency - 200.IBPluginDependency - 201.IBPluginDependency - 202.IBPluginDependency + 213.IBPluginDependency + 213.designableToolbarItemIdentifier + 213.toolbarItem.selectable + 215.IBPluginDependency + 216.IBPluginDependency + 248.IBPluginDependency + 249.IBPluginDependency + 250.IBPluginDependency + 251.IBPluginDependency + 280.IBPluginDependency + 281.IBPluginDependency + 282.IBPluginDependency + 283.IBPluginDependency + 284.IBPluginDependency + 285.IBPluginDependency + 286.IBPluginDependency + 287.IBPluginDependency + 288.IBPluginDependency + 289.IBPluginDependency + 290.IBPluginDependency + 291.IBPluginDependency + 292.IBPluginDependency + 293.IBPluginDependency + 294.IBPluginDependency + 295.IBPluginDependency + 296.IBPluginDependency + 297.IBPluginDependency 3.IBPluginDependency 3.IBWindowTemplateEditedContentRect 3.NSWindowTemplate.visibleAtLaunch + 307.IBPluginDependency + 310.IBPluginDependency + 323.IBPluginDependency + 324.IBPluginDependency + 326.IBPluginDependency + 327.IBPluginDependency + 328.IBPluginDependency + 329.IBPluginDependency + 330.IBPluginDependency + 331.IBPluginDependency + 332.IBPluginDependency + 333.IBPluginDependency + 334.IBPluginDependency + 335.IBPluginDependency + 337.IBPluginDependency + 338.IBPluginDependency + 340.IBPluginDependency + 341.IBPluginDependency + 343.IBPluginDependency + 344.IBPluginDependency + 367.IBPluginDependency + 368.IBPluginDependency + 369.IBPluginDependency + 370.IBPluginDependency + 371.IBPluginDependency + 372.IBPluginDependency 4.IBPluginDependency 5.IBPluginDependency 6.IBPluginDependency - 63.IBPluginDependency YES @@ -839,12 +1569,17 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + 0 + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin 1 com.apple.InterfaceBuilder.CocoaPlugin - 0 - + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -871,6 +1606,31 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -885,106 +1645,9 @@ - 211 - - - - YES - - PithosPreferencesController - NSWindowController - - YES - - YES - authenticationLogin: - authenticationManual: - toolbarItemSelected: - - - YES - id - id - id - - - - YES - - YES - authenticationLogin: - authenticationManual: - toolbarItemSelected: - - - YES - - authenticationLogin: - id - - - authenticationManual: - id - - - toolbarItemSelected: - id - - - - - YES - - YES - authenticationRenewCheckBox - authenticationTokenTextField - authenticationUserTextField - userDefaultsController - - - YES - NSButton - NSTextField - NSTextField - NSUserDefaultsController - - - - YES - - YES - authenticationRenewCheckBox - authenticationTokenTextField - authenticationUserTextField - userDefaultsController - - - YES - - authenticationRenewCheckBox - NSButton - - - authenticationTokenTextField - NSTextField - - - authenticationUserTextField - NSTextField - - - userDefaultsController - NSUserDefaultsController - - - - - IBProjectSource - ./Classes/PithosPreferencesController.h - - - + 374 + 0 IBCocoaFramework @@ -997,15 +1660,23 @@ YES YES + NSAddTemplate + NSEveryone + NSMenuCheckmark + NSMenuMixedState NSPreferencesGeneral + NSRemoveTemplate NSSwitch - NSUser YES + {8, 8} {32, 32} - {15, 15} + {9, 8} + {7, 2} {32, 32} + {8, 8} + {15, 15} diff --git a/pithos-macos/PithosSharingAccountsNode.m b/pithos-macos/PithosSharingAccountsNode.m index 53394ce..76868ce 100644 --- a/pithos-macos/PithosSharingAccountsNode.m +++ b/pithos-macos/PithosSharingAccountsNode.m @@ -82,7 +82,8 @@ sharingAccountsRequest.delegate = self; sharingAccountsRequest.didFinishSelector = @selector(sharingAccountsRequestFinished:); sharingAccountsRequest.didFailSelector = @selector(sharingAccountsRequestFailed:); - sharingAccountsRequest.downloadCache = [ASIDownloadCache sharedCache]; + if (!forcedRefresh) + sharingAccountsRequest.downloadCache = [ASIDownloadCache sharedCache]; [sharingAccountsRequest startAsynchronous]; break; case PithosNodeStateRefreshing: @@ -155,6 +156,7 @@ sharingAccountsRequest = nil; [sharingAccounts release]; sharingAccounts = nil; + forcedRefresh = NO; @synchronized(self) { freshness = PithosNodeStateRefreshFinished; } @@ -166,7 +168,8 @@ sharingAccountsRequest = [[ASIPithosRequest listSharingAccountsRequestWithLimit:0 marker:[[someSharingAccounts lastObject] name]] retain]; sharingAccountsRequest.delegate = self; - sharingAccountsRequest.downloadCache = [ASIDownloadCache sharedCache]; + if (!forcedRefresh) + sharingAccountsRequest.downloadCache = [ASIDownloadCache sharedCache]; [sharingAccountsRequest startAsynchronous]; } } @@ -179,6 +182,7 @@ sharingAccountsRequest = nil; [sharingAccounts release]; sharingAccounts = nil; + forcedRefresh = NO; @synchronized(self) { freshness = PithosNodeStateRefreshNeeded; } diff --git a/pithos-macos/pithos_macosAppDelegate.m b/pithos-macos/pithos_macosAppDelegate.m index eb4a36b..2dd9d48 100644 --- a/pithos-macos/pithos_macosAppDelegate.m +++ b/pithos-macos/pithos_macosAppDelegate.m @@ -53,7 +53,6 @@ andSelector:@selector(handleAppleEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; - //[pithosBrowserController showWindow:self]; [self showPithosBrowser:self]; [self authenticateWithAuthUser:[[userDefaultsController values] valueForKey:@"authUser"] -- 1.7.10.4