Using system icons based on file extension.
authorMiltiadis Vasilakis <mvasilak@gmail.com>
Wed, 10 Aug 2011 10:59:04 +0000 (13:59 +0300)
committerMiltiadis Vasilakis <mvasilak@gmail.com>
Wed, 10 Aug 2011 10:59:04 +0000 (13:59 +0300)
Initial implementation of browser leaf preview.
Simplified authentication panel.
Login through redirection and url handling implemented.
Some refactoring.
Other minor fixes.

24 files changed:
Icons/object.png [deleted file]
Icons/subdir.png [deleted file]
pithos-macos.xcodeproj/project.pbxproj
pithos-macos/FileSystemBrowserCell.h [new file with mode: 0644]
pithos-macos/FileSystemBrowserCell.m [new file with mode: 0644]
pithos-macos/PithosAccountNode.h [moved from pithos-macos/PithosAccount.h with 97% similarity]
pithos-macos/PithosAccountNode.m [moved from pithos-macos/PithosAccount.m with 96% similarity]
pithos-macos/PithosBrowserController.h
pithos-macos/PithosBrowserController.m
pithos-macos/PithosBrowserController.xib
pithos-macos/PithosBrowserPreviewController.xib [new file with mode: 0644]
pithos-macos/PithosContainerNode.h [moved from pithos-macos/PithosContainer.h with 90% similarity]
pithos-macos/PithosContainerNode.m [moved from pithos-macos/PithosContainer.m with 88% similarity]
pithos-macos/PithosEmptyNode.h [moved from pithos-macos/PithosEmpty.h with 97% similarity]
pithos-macos/PithosEmptyNode.m [moved from pithos-macos/PithosEmpty.m with 89% similarity]
pithos-macos/PithosNode.h
pithos-macos/PithosNode.m
pithos-macos/PithosObjectNode.h [moved from pithos-macos/PithosObject.h with 83% similarity]
pithos-macos/PithosObjectNode.m [moved from pithos-macos/PithosObject.m with 65% similarity]
pithos-macos/PithosSubdirNode.h [moved from pithos-macos/PithosSubdir.h with 86% similarity]
pithos-macos/PithosSubdirNode.m [moved from pithos-macos/PithosSubdir.m with 72% similarity]
pithos-macos/pithos-macos-Info.plist
pithos-macos/pithos_macosAppDelegate.h
pithos-macos/pithos_macosAppDelegate.m

diff --git a/Icons/object.png b/Icons/object.png
deleted file mode 100644 (file)
index cdaef80..0000000
Binary files a/Icons/object.png and /dev/null differ
diff --git a/Icons/subdir.png b/Icons/subdir.png
deleted file mode 100644 (file)
index 96c5e0d..0000000
Binary files a/Icons/subdir.png and /dev/null differ
index 49b98df..5980bf2 100644 (file)
                610DD35413E6C09100ED982F /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 610DD35313E6C09100ED982F /* CoreServices.framework */; };
                610DD35613E6C0A700ED982F /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 610DD35513E6C0A700ED982F /* SystemConfiguration.framework */; };
                610DD35913E6C3D200ED982F /* PithosNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD35813E6C3D100ED982F /* PithosNode.m */; };
-               610DD36413E6E2E400ED982F /* PithosAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD36313E6E2E400ED982F /* PithosAccount.m */; };
-               610DD36713E6E69D00ED982F /* PithosContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD36613E6E69D00ED982F /* PithosContainer.m */; };
-               610DD37213E7059900ED982F /* PithosObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD37113E7059900ED982F /* PithosObject.m */; };
-               610DD37513E7064F00ED982F /* PithosSubdir.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD37413E7064F00ED982F /* PithosSubdir.m */; };
+               610DD36413E6E2E400ED982F /* PithosAccountNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD36313E6E2E400ED982F /* PithosAccountNode.m */; };
+               610DD36713E6E69D00ED982F /* PithosContainerNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD36613E6E69D00ED982F /* PithosContainerNode.m */; };
+               610DD37213E7059900ED982F /* PithosObjectNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD37113E7059900ED982F /* PithosObjectNode.m */; };
+               610DD37513E7064F00ED982F /* PithosSubdirNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD37413E7064F00ED982F /* PithosSubdirNode.m */; };
                610DD46313E950E600ED982F /* 01-refresh.png in Resources */ = {isa = PBXBuildFile; fileRef = 610DD46213E950E600ED982F /* 01-refresh.png */; };
                610DD49D13EAE03400ED982F /* container.png in Resources */ = {isa = PBXBuildFile; fileRef = 610DD49A13EAE03300ED982F /* container.png */; };
-               610DD49E13EAE03400ED982F /* object.png in Resources */ = {isa = PBXBuildFile; fileRef = 610DD49B13EAE03300ED982F /* object.png */; };
-               610DD49F13EAE03400ED982F /* subdir.png in Resources */ = {isa = PBXBuildFile; fileRef = 610DD49C13EAE03400ED982F /* subdir.png */; };
-               611FFCAF13EBF0B900E43E18 /* PithosEmpty.m in Sources */ = {isa = PBXBuildFile; fileRef = 611FFCAE13EBF0B900E43E18 /* PithosEmpty.m */; };
+               611FFCAF13EBF0B900E43E18 /* PithosEmptyNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 611FFCAE13EBF0B900E43E18 /* PithosEmptyNode.m */; };
                611FFCB313EBF40900E43E18 /* ImageAndTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 611FFCB213EBF40900E43E18 /* ImageAndTextCell.m */; };
+               6121250913F033F500063041 /* PithosBrowserPreviewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6121250813F033F400063041 /* PithosBrowserPreviewController.xib */; };
+               6139837113EFEECC004CE444 /* FileSystemBrowserCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */; };
                61E99D9413EC348500E48DA5 /* 145-persondot.png in Resources */ = {isa = PBXBuildFile; fileRef = 61E99D9313EC348500E48DA5 /* 145-persondot.png */; };
 /* End PBXBuildFile section */
 
                610DD35513E6C0A700ED982F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
                610DD35713E6C3D100ED982F /* PithosNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosNode.h; sourceTree = "<group>"; };
                610DD35813E6C3D100ED982F /* PithosNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosNode.m; sourceTree = "<group>"; };
-               610DD36213E6E2E400ED982F /* PithosAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosAccount.h; sourceTree = "<group>"; };
-               610DD36313E6E2E400ED982F /* PithosAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosAccount.m; sourceTree = "<group>"; };
-               610DD36513E6E69D00ED982F /* PithosContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosContainer.h; sourceTree = "<group>"; };
-               610DD36613E6E69D00ED982F /* PithosContainer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosContainer.m; sourceTree = "<group>"; };
-               610DD37013E7059800ED982F /* PithosObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosObject.h; sourceTree = "<group>"; };
-               610DD37113E7059900ED982F /* PithosObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosObject.m; sourceTree = "<group>"; };
-               610DD37313E7064E00ED982F /* PithosSubdir.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosSubdir.h; sourceTree = "<group>"; };
-               610DD37413E7064F00ED982F /* PithosSubdir.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosSubdir.m; sourceTree = "<group>"; };
+               610DD36213E6E2E400ED982F /* PithosAccountNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosAccountNode.h; sourceTree = "<group>"; };
+               610DD36313E6E2E400ED982F /* PithosAccountNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosAccountNode.m; sourceTree = "<group>"; };
+               610DD36513E6E69D00ED982F /* PithosContainerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosContainerNode.h; sourceTree = "<group>"; };
+               610DD36613E6E69D00ED982F /* PithosContainerNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosContainerNode.m; sourceTree = "<group>"; };
+               610DD37013E7059800ED982F /* PithosObjectNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosObjectNode.h; sourceTree = "<group>"; };
+               610DD37113E7059900ED982F /* PithosObjectNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosObjectNode.m; sourceTree = "<group>"; };
+               610DD37313E7064E00ED982F /* PithosSubdirNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosSubdirNode.h; sourceTree = "<group>"; };
+               610DD37413E7064F00ED982F /* PithosSubdirNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosSubdirNode.m; sourceTree = "<group>"; };
                610DD46213E950E600ED982F /* 01-refresh.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "01-refresh.png"; sourceTree = "<group>"; };
                610DD49A13EAE03300ED982F /* container.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = container.png; sourceTree = "<group>"; };
-               610DD49B13EAE03300ED982F /* object.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = object.png; sourceTree = "<group>"; };
-               610DD49C13EAE03400ED982F /* subdir.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = subdir.png; sourceTree = "<group>"; };
-               611FFCAD13EBF0B800E43E18 /* PithosEmpty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosEmpty.h; sourceTree = "<group>"; };
-               611FFCAE13EBF0B900E43E18 /* PithosEmpty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosEmpty.m; sourceTree = "<group>"; };
-               611FFCB113EBF40900E43E18 /* ImageAndTextCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageAndTextCell.h; sourceTree = "<group>"; };
-               611FFCB213EBF40900E43E18 /* ImageAndTextCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageAndTextCell.m; sourceTree = "<group>"; };
+               611FFCAD13EBF0B800E43E18 /* PithosEmptyNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosEmptyNode.h; sourceTree = "<group>"; };
+               611FFCAE13EBF0B900E43E18 /* PithosEmptyNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosEmptyNode.m; sourceTree = "<group>"; };
+               611FFCB113EBF40900E43E18 /* ImageAndTextCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ImageAndTextCell.h; path = "pithos-macos/ImageAndTextCell.h"; sourceTree = "<group>"; };
+               611FFCB213EBF40900E43E18 /* ImageAndTextCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ImageAndTextCell.m; path = "pithos-macos/ImageAndTextCell.m"; sourceTree = "<group>"; };
+               6121250813F033F400063041 /* PithosBrowserPreviewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PithosBrowserPreviewController.xib; sourceTree = "<group>"; };
+               6139836F13EFEECC004CE444 /* FileSystemBrowserCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSystemBrowserCell.h; path = "pithos-macos/FileSystemBrowserCell.h"; sourceTree = "<group>"; };
+               6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileSystemBrowserCell.m; path = "pithos-macos/FileSystemBrowserCell.m"; sourceTree = "<group>"; };
                61E99D9313EC348500E48DA5 /* 145-persondot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "145-persondot.png"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
                610DD2E613E6BB2000ED982F = {
                        isa = PBXGroup;
                        children = (
+                               6139837313F01CFC004CE444 /* Other */,
                                610DD31A13E6BD4200ED982F /* asi-http-request */,
                                610DD2FB13E6BB2000ED982F /* pithos-macos */,
                                610DD2F413E6BB2000ED982F /* Frameworks */,
                                610DD34C13E6BEF400ED982F /* PithosBrowserController.h */,
                                610DD34D13E6BEF400ED982F /* PithosBrowserController.m */,
                                610DD34F13E6C00E00ED982F /* PithosBrowserController.xib */,
+                               6121250813F033F400063041 /* PithosBrowserPreviewController.xib */,
                                610DD35713E6C3D100ED982F /* PithosNode.h */,
                                610DD35813E6C3D100ED982F /* PithosNode.m */,
-                               610DD36213E6E2E400ED982F /* PithosAccount.h */,
-                               610DD36313E6E2E400ED982F /* PithosAccount.m */,
-                               610DD36513E6E69D00ED982F /* PithosContainer.h */,
-                               610DD36613E6E69D00ED982F /* PithosContainer.m */,
-                               610DD37013E7059800ED982F /* PithosObject.h */,
-                               610DD37113E7059900ED982F /* PithosObject.m */,
-                               610DD37313E7064E00ED982F /* PithosSubdir.h */,
-                               610DD37413E7064F00ED982F /* PithosSubdir.m */,
-                               611FFCAD13EBF0B800E43E18 /* PithosEmpty.h */,
-                               611FFCAE13EBF0B900E43E18 /* PithosEmpty.m */,
-                               611FFCB113EBF40900E43E18 /* ImageAndTextCell.h */,
-                               611FFCB213EBF40900E43E18 /* ImageAndTextCell.m */,
+                               610DD36213E6E2E400ED982F /* PithosAccountNode.h */,
+                               610DD36313E6E2E400ED982F /* PithosAccountNode.m */,
+                               610DD36513E6E69D00ED982F /* PithosContainerNode.h */,
+                               610DD36613E6E69D00ED982F /* PithosContainerNode.m */,
+                               610DD37013E7059800ED982F /* PithosObjectNode.h */,
+                               610DD37113E7059900ED982F /* PithosObjectNode.m */,
+                               610DD37313E7064E00ED982F /* PithosSubdirNode.h */,
+                               610DD37413E7064F00ED982F /* PithosSubdirNode.m */,
+                               611FFCAD13EBF0B800E43E18 /* PithosEmptyNode.h */,
+                               611FFCAE13EBF0B900E43E18 /* PithosEmptyNode.m */,
                        );
                        path = "pithos-macos";
                        sourceTree = "<group>";
                                610DD46213E950E600ED982F /* 01-refresh.png */,
                                61E99D9313EC348500E48DA5 /* 145-persondot.png */,
                                610DD49A13EAE03300ED982F /* container.png */,
-                               610DD49B13EAE03300ED982F /* object.png */,
-                               610DD49C13EAE03400ED982F /* subdir.png */,
                        );
                        path = Icons;
                        sourceTree = SOURCE_ROOT;
                };
+               6139837313F01CFC004CE444 /* Other */ = {
+                       isa = PBXGroup;
+                       children = (
+                               611FFCB113EBF40900E43E18 /* ImageAndTextCell.h */,
+                               611FFCB213EBF40900E43E18 /* ImageAndTextCell.m */,
+                               6139836F13EFEECC004CE444 /* FileSystemBrowserCell.h */,
+                               6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */,
+                       );
+                       name = Other;
+                       sourceTree = "<group>";
+               };
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
                                610DD35013E6C00E00ED982F /* PithosBrowserController.xib in Resources */,
                                610DD46313E950E600ED982F /* 01-refresh.png in Resources */,
                                610DD49D13EAE03400ED982F /* container.png in Resources */,
-                               610DD49E13EAE03400ED982F /* object.png in Resources */,
-                               610DD49F13EAE03400ED982F /* subdir.png in Resources */,
                                61E99D9413EC348500E48DA5 /* 145-persondot.png in Resources */,
+                               6121250913F033F500063041 /* PithosBrowserPreviewController.xib in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                610DD34A13E6BD8B00ED982F /* ASIPithosRequest.m in Sources */,
                                610DD34E13E6BEF400ED982F /* PithosBrowserController.m in Sources */,
                                610DD35913E6C3D200ED982F /* PithosNode.m in Sources */,
-                               610DD36413E6E2E400ED982F /* PithosAccount.m in Sources */,
-                               610DD36713E6E69D00ED982F /* PithosContainer.m in Sources */,
-                               610DD37213E7059900ED982F /* PithosObject.m in Sources */,
-                               610DD37513E7064F00ED982F /* PithosSubdir.m in Sources */,
-                               611FFCAF13EBF0B900E43E18 /* PithosEmpty.m in Sources */,
+                               610DD36413E6E2E400ED982F /* PithosAccountNode.m in Sources */,
+                               610DD36713E6E69D00ED982F /* PithosContainerNode.m in Sources */,
+                               610DD37213E7059900ED982F /* PithosObjectNode.m in Sources */,
+                               610DD37513E7064F00ED982F /* PithosSubdirNode.m in Sources */,
+                               611FFCAF13EBF0B900E43E18 /* PithosEmptyNode.m in Sources */,
                                611FFCB313EBF40900E43E18 /* ImageAndTextCell.m in Sources */,
+                               6139837113EFEECC004CE444 /* FileSystemBrowserCell.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/pithos-macos/FileSystemBrowserCell.h b/pithos-macos/FileSystemBrowserCell.h
new file mode 100644 (file)
index 0000000..2704946
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+     File: FileSystemBrowserCell.h
+ Abstract: A cell that can draw an image/icon and a label color.
+  Version: 1.1
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface FileSystemBrowserCell : NSTextFieldCell {
+@private
+    NSImage *_image;
+    NSColor *_labelColor;
+}
+
+@property(retain) NSImage *image;
+@property(retain) NSColor *labelColor;
+
+@end
diff --git a/pithos-macos/FileSystemBrowserCell.m b/pithos-macos/FileSystemBrowserCell.m
new file mode 100644 (file)
index 0000000..4893a6a
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+     File: FileSystemBrowserCell.m
+ Abstract: A cell that can draw an image/icon and a label color.
+  Version: 1.1
+ Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple
+ Inc. ("Apple") in consideration of your agreement to the following
+ terms, and your use, installation, modification or redistribution of
+ this Apple software constitutes acceptance of these terms.  If you do
+ not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ In consideration of your agreement to abide by the following terms, and
+ subject to these terms, Apple grants you a personal, non-exclusive
+ license, under Apple's copyrights in this original Apple software (the
+ "Apple Software"), to use, reproduce, modify and redistribute the Apple
+ Software, with or without modifications, in source and/or binary forms;
+ provided that if you redistribute the Apple Software in its entirety and
+ without modifications, you must retain this notice and the following
+ text and disclaimers in all such redistributions of the Apple Software.
+ Neither the name, trademarks, service marks or logos of Apple Inc. may
+ be used to endorse or promote products derived from the Apple Software
+ without specific prior written permission from Apple.  Except as
+ expressly stated in this notice, no other rights or licenses, express or
+ implied, are granted by Apple herein, including but not limited to any
+ patent rights that may be infringed by your derivative works or by other
+ works in which the Apple Software may be incorporated.
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE
+ MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
+ THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
+ OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
+ MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
+ AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
+ STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+ Copyright (C) 2011 Apple Inc. All Rights Reserved.
+ */
+
+#import "FileSystemBrowserCell.h"
+
+@implementation FileSystemBrowserCell
+
+#define ICON_SIZE              16.0    // Our Icons are ICON_SIZE x ICON_SIZE 
+#define ICON_INSET_HORIZ       4.0     // Distance to inset the icon from the left edge. 
+#define ICON_TEXT_SPACING      2.0     // Distance between the end of the icon and the text part 
+#define ICON_INSET_VERT         2.0     // Distance from top/bottom of icon
+
+- (id)init {
+    self = [super init];
+    [self setLineBreakMode:NSLineBreakByTruncatingTail];
+    return self;
+}
+
+- (id)copyWithZone:(NSZone *)zone {
+    FileSystemBrowserCell *result = [super copyWithZone:zone];
+    result->_image = nil;
+    result.image = self.image;
+    result->_labelColor = nil;
+    result.labelColor = self.labelColor;
+    return result;
+}
+
+- (void)dealloc {
+    [_image release];
+    [_labelColor release];
+    [super dealloc];
+}
+
+@synthesize image = _image;
+@synthesize labelColor = _labelColor;
+
+- (NSRect)imageRectForBounds:(NSRect)bounds {
+    bounds.origin.x += ICON_INSET_HORIZ;
+    bounds.size.width = ICON_SIZE;
+    bounds.origin.y += trunc((bounds.size.height - ICON_SIZE) / 2.0); 
+    bounds.size.height = ICON_SIZE;
+    return bounds;
+}
+
+- (NSRect)titleRectForBounds:(NSRect)bounds {
+    // Inset the title for the image
+    CGFloat inset = (ICON_INSET_HORIZ + ICON_SIZE + ICON_TEXT_SPACING);
+    bounds.origin.x += inset;
+    bounds.size.width -= inset;
+    return [super titleRectForBounds:bounds];
+}
+
+- (NSSize)cellSizeForBounds:(NSRect)aRect {
+    // Make our cells a bit higher than normal to give some additional space for the icon to fit.
+    NSSize theSize = [super cellSizeForBounds:aRect];
+    theSize.width += (ICON_INSET_HORIZ + ICON_SIZE + ICON_TEXT_SPACING);
+    theSize.height = ICON_INSET_VERT + ICON_SIZE + ICON_INSET_VERT;
+    return theSize;
+}
+
+- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
+    // First draw a label background color
+    if (self.labelColor != nil) {
+        [[self.labelColor colorWithAlphaComponent:0.2] set];
+        NSRectFillUsingOperation(cellFrame, NSCompositeSourceOver);
+    }
+    
+    NSRect imageRect = [self imageRectForBounds:cellFrame];
+    if (self.image) {
+        // Flip images that don't agree with our flipped state
+        BOOL flipped = [controlView isFlipped] != [self.image isFlipped];
+        if (flipped) {
+            [[NSGraphicsContext currentContext] saveGraphicsState];
+            NSAffineTransform *transform = [[NSAffineTransform alloc] init];
+            [transform translateXBy:0 yBy:cellFrame.origin.y + cellFrame.size.height];
+            [transform scaleXBy:1.0 yBy:-1.0];
+            [transform translateXBy:0 yBy:-cellFrame.origin.y];
+            [transform concat];
+            [transform release];
+        }
+        [self.image drawInRect:imageRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
+        if (flipped) {
+            [[NSGraphicsContext currentContext] restoreGraphicsState];
+        }
+    }
+    CGFloat inset = (ICON_INSET_HORIZ + ICON_SIZE + ICON_TEXT_SPACING);
+    cellFrame.origin.x += inset;
+    cellFrame.size.width -= inset;
+    cellFrame.origin.y += 1; // Looks better
+    cellFrame.size.height -= 1;
+    [super drawInteriorWithFrame:cellFrame inView:controlView];
+}
+
+- (void)drawWithExpansionFrame:(NSRect)cellFrame inView:(NSView *)view {
+    // We want to exclude the icon from the expansion frame when you hover over the cell
+    [super drawInteriorWithFrame:cellFrame inView:view];
+}
+
+@end
similarity index 97%
rename from pithos-macos/PithosAccount.h
rename to pithos-macos/PithosAccountNode.h
index 7300c8a..cfd6541 100644 (file)
@@ -37,7 +37,7 @@
 
 #import "PithosNode.h"
 
-@interface PithosAccount : PithosNode {
+@interface PithosAccountNode : PithosNode {
     NSMutableArray *containers;
     
     BOOL refreshing;
similarity index 96%
rename from pithos-macos/PithosAccount.m
rename to pithos-macos/PithosAccountNode.m
index efe9bcb..6df0a35 100644 (file)
 // interpreted as representing official policies, either expressed
 // or implied, of GRNET S.A.
 
-#import "PithosAccount.h"
-#import "PithosContainer.h"
+#import "PithosAccountNode.h"
+#import "PithosContainerNode.h"
 #import "ASIPithosAccountRequest.h"
 #import "ASIPithosContainer.h"
 #import "ASIDownloadCache.h"
 
-@implementation PithosAccount
+@implementation PithosAccountNode
 
 #pragma mark -
 #pragma mark Object Lifecycle
@@ -77,7 +77,7 @@
             NSLog(@"using newChildren");
             NSMutableArray *newChildren = [NSMutableArray array];
             for (ASIPithosContainer *container in containers) {
-                PithosContainer *node = [[[PithosContainer alloc] initWithContainerName:container.name] autorelease];
+                PithosContainerNode *node = [[[PithosContainerNode alloc] initWithPithosContainer:container] autorelease];
                 if (children) {
                     NSUInteger oldIndex = [children indexOfObject:node];
                     if (oldIndex != NSNotFound)
index 5616d93..38e6ec1 100644 (file)
@@ -42,6 +42,8 @@
     PithosNode *rootNode;
     
     NSMutableArray *outlineViewDataSourceArray;
+    
+    NSViewController *sharedPreviewController;
 }
 
 @property (nonatomic, retain) IBOutlet NSUserDefaultsController *userDefaultsController;
 @property (nonatomic, retain) IBOutlet NSBrowser *browser;
 
 @property (nonatomic, retain) IBOutlet NSPanel *authenticationPanel;
+@property (nonatomic, retain) IBOutlet NSTextField *authenticationUserTextField;
+@property (nonatomic, retain) IBOutlet NSTextField *authenticationTokenTextField;
+@property (nonatomic, retain) IBOutlet NSButton *authenticationRenewCheckBox;
+@property (nonatomic, retain) IBOutlet NSButton *authenticationCancelPushButton;
+@property (nonatomic, retain) IBOutlet NSButton *authenticationManualPushButton;
+@property (nonatomic, retain) IBOutlet NSButton *authenticationLoginPushButton;
 
 - (IBAction)refresh:(id)sender;
 
+- (void)authenticateFromURLWithAuthUser:(NSString *)authUser authToken:(NSString *)authToken;
 - (IBAction)authenticationSelect:(id)sender;
-- (IBAction)authenticationDone:(id)sender;
+- (IBAction)authenticationLogin:(id)sender;
 - (IBAction)authenticationCancel:(id)sender;
+- (IBAction)authenticationManual:(id)sender;
 
 @end
index a4a4918..f5d2738 100644 (file)
 
 #import "PithosBrowserController.h"
 #import "ASIPithosRequest.h"
-#import "PithosAccount.h"
-#import "PithosContainer.h"
-#import "PithosEmpty.h"
+#import "PithosAccountNode.h"
+#import "PithosContainerNode.h"
+#import "PithosEmptyNode.h"
 #import "ImageAndTextCell.h"
+#import "FileSystemBrowserCell.h"
 
-@interface PithosBrowserCell : NSBrowserCell {}
+//@interface PithosBrowserCell : NSBrowserCell {}
+@interface PithosBrowserCell : FileSystemBrowserCell {}
 @end
 
 @implementation PithosBrowserCell
 
+- (id)init {
+    if ((self = [super init])) {
+        [self setLineBreakMode:NSLineBreakByTruncatingMiddle];
+    }
+    return self;
+}
+
 - (void)setObjectValue:(id)object {
     if ([object isKindOfClass:[PithosNode class]]) {
         PithosNode *node = (PithosNode *)object;
         [self setStringValue:node.displayName];
         [self setImage:node.icon];
-        // All cells are set as leafs because a branchingImage is already set!
-        // Maybe this cell is already inside an NSBrowserCell
-        [self setLeaf:YES];
+//        // All cells are set as leafs because a branchingImage is already set!
+//        // Maybe this cell is already inside an NSBrowserCell
+//        [self setLeaf:YES];
     } else {
         [super setObjectValue:object];
     }
 @end
 
 @interface PithosBrowserController (Private) {}
-- (void)authenticate;
+- (void)authenticateWithAuthUser:(NSString *)authUser authToken:(NSString *)authToken;
 - (void)resetContainers;
 @end
 
 @implementation PithosBrowserController
-@synthesize userDefaultsController, outlineViewDataSourceArray, splitView, outlineView, browser, authenticationPanel;
+@synthesize userDefaultsController, outlineViewDataSourceArray, splitView, outlineView, browser;
+@synthesize authenticationPanel, authenticationUserTextField, authenticationTokenTextField, authenticationRenewCheckBox, 
+            authenticationCancelPushButton, authenticationManualPushButton, authenticationLoginPushButton;
 
 #pragma mark -
 #pragma Object Lifecycle
 
 - (void)dealloc {
     [[NSNotificationCenter defaultCenter] removeObserver:self];
+    [sharedPreviewController release];
     [outlineViewDataSourceArray release];
     [rootNode release];
+    [authenticationLoginPushButton release];
+    [authenticationManualPushButton release];
+    [authenticationCancelPushButton release];
+    [authenticationRenewCheckBox release];
+    [authenticationTokenTextField release];
+    [authenticationUserTextField release];
     [authenticationPanel release];
     [browser release];
     [splitView release];
     
     // Create the outlineView tree
        NSTreeNode *treeNode = [NSTreeNode treeNodeWithRepresentedObject:
-                            [[[PithosEmpty alloc] initWithDisplayName:@"CONTAINERS" icon:nil] autorelease]];
+                            [[[PithosEmptyNode alloc] initWithDisplayName:@"CONTAINERS" icon:nil] autorelease]];
        [[treeNode mutableChildNodes] addObject:
      [NSTreeNode treeNodeWithRepresentedObject:
-      [[[PithosContainer alloc] initWithContainerName:@"pithos"] autorelease]]];
+      [[[PithosContainerNode alloc] initWithContainerName:@"pithos"] autorelease]]];
        [[treeNode mutableChildNodes] addObject:
      [NSTreeNode treeNodeWithRepresentedObject:
-      [[[PithosContainer alloc] initWithContainerName:@"trash"] autorelease]]];
+      [[[PithosContainerNode alloc] initWithContainerName:@"trash"] autorelease]]];
     
     self.outlineViewDataSourceArray = [NSMutableArray arrayWithObject:treeNode];
     
                                                  name:@"PithosNodeChildrenUpdated" 
                                                object:nil];
 
-    [self authenticate];
+    [self authenticateWithAuthUser:[authenticationUserTextField stringValue] authToken:[authenticationTokenTextField stringValue]];
 }
 
 #pragma mark -
 #pragma mark -
 #pragma Authentication
 
-- (void)authenticate {
-    NSString *authURL = [[userDefaultsController values] valueForKey:@"authURL"];
-    NSString *username = [[userDefaultsController values] valueForKey:@"username"];
-    NSString *apiKey = [[userDefaultsController values] valueForKey:@"apiKey"];
-    NSString *storageURL = [[userDefaultsController values] valueForKey:@"storageURL"];
-    NSString *authToken = [[userDefaultsController values] valueForKey:@"authToken"];
+- (void)authenticateFromURLWithAuthUser:(NSString *)authUser authToken:(NSString *)authToken {
+    if ([authUser length] && [authToken length]) {
+        [authenticationUserTextField setStringValue:authUser];
+        [authenticationTokenTextField setStringValue:authToken];
+        [userDefaultsController save:self];
+        [self authenticateWithAuthUser:authUser authToken:authToken];
+    }
+    // XXX else maybe an error message?
+}
 
-    NSLog(@"Authentication - authURL:%@, username:%@, apiKey:%@, storageURL:%@, authToken:%@", authURL, username, apiKey, storageURL, authToken);
-    if (storageURL && authToken) {
-        [ASIPithosRequest setStorageURL:storageURL];
+- (void)authenticateWithAuthUser:(NSString *)authUser authToken:(NSString *)authToken {
+    // XXX hardcoded for now
+    NSString *storageURLPrefix = @"https://pithos.dev.grnet.gr/v1/";
+    
+    NSLog(@"Authentication - storageURLPrefix:%@, authUser:%@, authToken:%@", storageURLPrefix, authUser, authToken);
+    if ([authUser length] && [authToken length]) {
+    //if (authUser && ([authUser length] > 0) && authToken && ([authToken length] > 0)) {
+        [ASIPithosRequest setStorageURL:[storageURLPrefix stringByAppendingString:authUser]];
         [ASIPithosRequest setAuthToken:authToken];
         [self resetContainers];
-    } else if (authURL && username && apiKey) {
-        [ASIPithosRequest setAuthURL:authURL];
-        [ASIPithosRequest setUsername:username];
-        [ASIPithosRequest setApiKey:apiKey];        
-        NSError *error = [ASIPithosRequest authenticate];
-        if (error) {
-            // XXX Do something on error.
-            NSLog(@"error:%@", error);
-        } else {
-            [[userDefaultsController values] setValue:[ASIPithosRequest storageURL] forKey:@"storageURL"];
-            [[userDefaultsController values] setValue:[ASIPithosRequest authToken] forKey:@"authToken"];
-            [userDefaultsController save:nil];
-        }
-        [self resetContainers];
     } else {
         [self authenticationSelect:nil];
     }
 
 - (IBAction)authenticationSelect:(id)sender {
        [self.window makeFirstResponder:nil];
-    
        [NSApp beginSheet:authenticationPanel
           modalForWindow:self.window
         modalDelegate:self
                  contextInfo:nil];
 }
 
-- (IBAction)authenticationDone:(id)sender {
+- (IBAction)authenticationLogin:(id)sender {
        [NSApp endSheet:authenticationPanel];
        [authenticationPanel orderOut:self];
-    [userDefaultsController save:sender];
-    [self authenticate];
+    // XXX hardcoded for now
+    NSProcessInfo *processInfo = [NSProcessInfo processInfo];
+    NSString *loginURL = [NSString stringWithFormat:@"https://pithos.dev.grnet.gr/login?next=pithos://%@_%d",
+                          [processInfo processName], [processInfo processIdentifier]];
+    if ([authenticationRenewCheckBox state] == NSOnState)
+        loginURL = [loginURL stringByAppendingString:@"&renew="];
+    NSLog(@"loginURL: %@", loginURL);
+    [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:loginURL]];
+    // XXX Should we wait for results or do something else?
+    // XXX check the case where this happens for the first time
+    // XXX maybe don't remove the Panel, and let the handler do it
 }
 
 - (IBAction)authenticationCancel:(id)sender {
     [userDefaultsController revert:sender];
 }
 
+- (IBAction)authenticationManual:(id)sender {
+       [NSApp endSheet:authenticationPanel];
+       [authenticationPanel orderOut:self];
+    [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"];    
+    [self authenticateWithAuthUser:[authenticationUserTextField stringValue] authToken:[authenticationTokenTextField stringValue]];
+}
+
 #pragma mark -
 #pragma NSBrowserDelegate
 
     return node;
 }
 
+- (NSViewController *)browser:(NSBrowser *)browser previewViewControllerForLeafItem:(id)item {
+    if (sharedPreviewController == nil)
+        sharedPreviewController = [[NSViewController alloc] initWithNibName:@"PithosBrowserPreviewController" bundle:[NSBundle bundleForClass:[self class]]];
+    return sharedPreviewController;
+}
+
+
 #pragma mark -
 #pragma NSSplitViewDelegate
 
index 52b1fbc..d9e2794 100644 (file)
@@ -31,7 +31,6 @@
                        <string>NSView</string>
                        <string>NSToolbar</string>
                        <string>NSScrollView</string>
-                       <string>NSBox</string>
                        <string>NSUserDefaultsController</string>
                        <string>NSScroller</string>
                </object>
@@ -62,7 +61,7 @@
                                <int key="NSWindowBacking">2</int>
                                <string key="NSWindowRect">{{196, 240}, {690, 400}}</string>
                                <int key="NSWTFlags">544735232</int>
-                               <string key="NSWindowTitle">Window</string>
+                               <string key="NSWindowTitle">Pithos Browser</string>
                                <string key="NSWindowClass">NSWindow</string>
                                <object class="NSToolbar" key="NSViewClass" id="70997002">
                                        <object class="NSMutableString" key="NSToolbarIdentifier">
                                                                <string key="NSToolbarItemPaletteLabel">Authorization</string>
                                                                <nil key="NSToolbarItemToolTip"/>
                                                                <object class="NSButton" key="NSToolbarItemView" id="336305760">
-                                                                       <reference key="NSNextResponder"/>
+                                                                       <nil key="NSNextResponder"/>
                                                                        <int key="NSvFlags">268</int>
                                                                        <string key="NSFrame">{{23, 14}, {36, 25}}</string>
-                                                                       <reference key="NSSuperview"/>
-                                                                       <reference key="NSWindow"/>
-                                                                       <reference key="NSNextKeyView"/>
                                                                        <bool key="NSEnabled">YES</bool>
                                                                        <object class="NSButtonCell" key="NSCell" id="661833551">
                                                                                <int key="NSCellFlags">67239424</int>
                                                                <string key="NSToolbarItemPaletteLabel">Refresh</string>
                                                                <nil key="NSToolbarItemToolTip"/>
                                                                <object class="NSButton" key="NSToolbarItemView" id="105603186">
-                                                                       <reference key="NSNextResponder"/>
+                                                                       <nil key="NSNextResponder"/>
                                                                        <int key="NSvFlags">268</int>
                                                                        <string key="NSFrame">{{6, 14}, {36, 25}}</string>
-                                                                       <reference key="NSSuperview"/>
-                                                                       <reference key="NSWindow"/>
-                                                                       <reference key="NSNextKeyView"/>
                                                                        <bool key="NSEnabled">YES</bool>
                                                                        <object class="NSButtonCell" key="NSCell" id="669515004">
                                                                                <int key="NSCellFlags">67239424</int>
                                                                                                </object>
                                                                                        </object>
                                                                                        <string key="NSPathSeparator">/</string>
-                                                                                       <int key="NSMinColumnWidth">100</int>
+                                                                                       <int key="NSMinColumnWidth">160</int>
                                                                                        <int key="NSNumberOfVisibleColumns">3</int>
                                                                                        <int key="NSColumnResizingType">2</int>
                                                                                        <double key="NSPreferedColumnWidth">170</double>
                        <object class="NSWindowTemplate" id="909661358">
                                <int key="NSWindowStyleMask">73</int>
                                <int key="NSWindowBacking">2</int>
-                               <string key="NSWindowRect">{{169, 105}, {400, 209}}</string>
+                               <string key="NSWindowRect">{{169, 105}, {320, 135}}</string>
                                <int key="NSWTFlags">-1267203072</int>
                                <string key="NSWindowTitle">Authentication</string>
                                <string key="NSWindowClass">NSPanel</string>
                                <nil key="NSViewClass"/>
-                               <string key="NSWindowContentMinSize">{320, 209}</string>
+                               <string key="NSWindowContentMinSize">{320, 135}</string>
                                <object class="NSView" key="NSWindowView" id="645528012">
                                        <reference key="NSNextResponder"/>
                                        <int key="NSvFlags">256</int>
                                        <object class="NSMutableArray" key="NSSubviews">
                                                <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSTextField" id="44425851">
+                                               <object class="NSTextField" id="378776445">
                                                        <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">267</int>
-                                                       <string key="NSFrame">{{201, 171}, {188, 22}}</string>
+                                                       <int key="NSvFlags">270</int>
+                                                       <string key="NSFrame">{{62, 95}, {248, 22}}</string>
                                                        <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="566695904"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView" ref="153397654"/>
                                                        <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSTextFieldCell" key="NSCell" id="676773767">
+                                                       <object class="NSTextFieldCell" key="NSCell" id="420821865">
                                                                <int key="NSCellFlags">-1804468671</int>
                                                                <int key="NSCellFlags2">272630784</int>
-                                                               <string key="NSContents"/>
+                                                               <string key="NSContents">User</string>
                                                                <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSControlView" ref="44425851"/>
+                                                               <reference key="NSControlView" ref="378776445"/>
                                                                <bool key="NSDrawsBackground">YES</bool>
                                                                <object class="NSColor" key="NSBackgroundColor" id="114914064">
                                                                        <int key="NSColorSpace">6</int>
                                                                </object>
                                                        </object>
                                                </object>
-                                               <object class="NSTextField" id="378776445">
-                                                       <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">267</int>
-                                                       <string key="NSFrame">{{201, 144}, {188, 22}}</string>
-                                                       <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="353279760"/>
-                                                       <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSTextFieldCell" key="NSCell" id="420821865">
-                                                               <int key="NSCellFlags">-1804468671</int>
-                                                               <int key="NSCellFlags2">272630784</int>
-                                                               <string key="NSContents"/>
-                                                               <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSControlView" ref="378776445"/>
-                                                               <bool key="NSDrawsBackground">YES</bool>
-                                                               <reference key="NSBackgroundColor" ref="114914064"/>
-                                                               <reference key="NSTextColor" ref="1030733536"/>
-                                                       </object>
-                                               </object>
-                                               <object class="NSTextField" id="439428156">
-                                                       <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">267</int>
-                                                       <string key="NSFrame">{{201, 117}, {188, 22}}</string>
-                                                       <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="479715099"/>
-                                                       <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSTextFieldCell" key="NSCell" id="171009795">
-                                                               <int key="NSCellFlags">-1804468671</int>
-                                                               <int key="NSCellFlags2">272630784</int>
-                                                               <string key="NSContents"/>
-                                                               <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSControlView" ref="439428156"/>
-                                                               <bool key="NSDrawsBackground">YES</bool>
-                                                               <reference key="NSBackgroundColor" ref="114914064"/>
-                                                               <reference key="NSTextColor" ref="1030733536"/>
-                                                       </object>
-                                               </object>
-                                               <object class="NSTextField" id="178498602">
+                                               <object class="NSTextField" id="566695904">
                                                        <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">270</int>
-                                                       <string key="NSFrame">{{10, 174}, {188, 17}}</string>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{9, 98}, {48, 17}}</string>
                                                        <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="44425851"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView" ref="378776445"/>
                                                        <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSTextFieldCell" key="NSCell" id="176070199">
+                                                       <object class="NSTextFieldCell" key="NSCell" id="578763183">
                                                                <int key="NSCellFlags">68288064</int>
                                                                <int key="NSCellFlags2">71304192</int>
-                                                               <string key="NSContents">Authentication URL:</string>
+                                                               <string key="NSContents">User:</string>
                                                                <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSControlView" ref="178498602"/>
+                                                               <reference key="NSControlView" ref="566695904"/>
                                                                <object class="NSColor" key="NSBackgroundColor" id="155317598">
                                                                        <int key="NSColorSpace">6</int>
                                                                        <string key="NSCatalogName">System</string>
                                                                <reference key="NSTextColor" ref="75086281"/>
                                                        </object>
                                                </object>
-                                               <object class="NSTextField" id="566695904">
-                                                       <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">270</int>
-                                                       <string key="NSFrame">{{10, 147}, {188, 17}}</string>
-                                                       <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="378776445"/>
-                                                       <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSTextFieldCell" key="NSCell" id="578763183">
-                                                               <int key="NSCellFlags">68288064</int>
-                                                               <int key="NSCellFlags2">71304192</int>
-                                                               <string key="NSContents">Username:</string>
-                                                               <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSControlView" ref="566695904"/>
-                                                               <reference key="NSBackgroundColor" ref="155317598"/>
-                                                               <reference key="NSTextColor" ref="75086281"/>
-                                                       </object>
-                                               </object>
-                                               <object class="NSTextField" id="1071997738">
-                                                       <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">267</int>
-                                                       <string key="NSFrame">{{200, 67}, {188, 22}}</string>
-                                                       <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="153397654"/>
-                                                       <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSTextFieldCell" key="NSCell" id="502497633">
-                                                               <int key="NSCellFlags">-1804468671</int>
-                                                               <int key="NSCellFlags2">272630784</int>
-                                                               <string key="NSContents"/>
-                                                               <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSControlView" ref="1071997738"/>
-                                                               <bool key="NSDrawsBackground">YES</bool>
-                                                               <reference key="NSBackgroundColor" ref="114914064"/>
-                                                               <reference key="NSTextColor" ref="1030733536"/>
-                                                       </object>
-                                               </object>
                                                <object class="NSTextField" id="163672380">
                                                        <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">267</int>
-                                                       <string key="NSFrame">{{200, 40}, {188, 22}}</string>
+                                                       <int key="NSvFlags">270</int>
+                                                       <string key="NSFrame">{{62, 70}, {248, 22}}</string>
                                                        <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="862737677"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView" ref="315312063"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSTextFieldCell" key="NSCell" id="914100041">
                                                                <int key="NSCellFlags">-1804468671</int>
                                                                <int key="NSCellFlags2">272630784</int>
-                                                               <string key="NSContents"/>
+                                                               <string key="NSContents">Token</string>
                                                                <reference key="NSSupport" ref="957255455"/>
                                                                <reference key="NSControlView" ref="163672380"/>
                                                                <bool key="NSDrawsBackground">YES</bool>
                                                                <reference key="NSTextColor" ref="1030733536"/>
                                                        </object>
                                                </object>
-                                               <object class="NSTextField" id="682506304">
-                                                       <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">270</int>
-                                                       <string key="NSFrame">{{9, 70}, {188, 17}}</string>
-                                                       <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="1071997738"/>
-                                                       <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSTextFieldCell" key="NSCell" id="710980917">
-                                                               <int key="NSCellFlags">68288064</int>
-                                                               <int key="NSCellFlags2">71304192</int>
-                                                               <string key="NSContents">Storage URL:</string>
-                                                               <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSControlView" ref="682506304"/>
-                                                               <reference key="NSBackgroundColor" ref="155317598"/>
-                                                               <reference key="NSTextColor" ref="75086281"/>
-                                                       </object>
-                                               </object>
                                                <object class="NSTextField" id="153397654">
                                                        <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">270</int>
-                                                       <string key="NSFrame">{{9, 43}, {188, 17}}</string>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{9, 73}, {48, 17}}</string>
                                                        <reference key="NSSuperview" ref="645528012"/>
+                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="163672380"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSTextFieldCell" key="NSCell" id="546922485">
                                                                <int key="NSCellFlags">68288064</int>
                                                                <int key="NSCellFlags2">71304192</int>
-                                                               <string key="NSContents">Authentication Token:</string>
+                                                               <string key="NSContents">Token:</string>
                                                                <reference key="NSSupport" ref="957255455"/>
                                                                <reference key="NSControlView" ref="153397654"/>
                                                                <reference key="NSBackgroundColor" ref="155317598"/>
                                                                <reference key="NSTextColor" ref="75086281"/>
                                                        </object>
                                                </object>
-                                               <object class="NSTextField" id="353279760">
-                                                       <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">270</int>
-                                                       <string key="NSFrame">{{10, 120}, {188, 17}}</string>
-                                                       <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="439428156"/>
-                                                       <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSTextFieldCell" key="NSCell" id="268573029">
-                                                               <int key="NSCellFlags">68288064</int>
-                                                               <int key="NSCellFlags2">71304192</int>
-                                                               <string key="NSContents">API Key:</string>
-                                                               <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSControlView" ref="353279760"/>
-                                                               <reference key="NSBackgroundColor" ref="155317598"/>
-                                                               <reference key="NSTextColor" ref="75086281"/>
-                                                       </object>
-                                               </object>
-                                               <object class="NSTextField" id="499977140">
+                                               <object class="NSTextField" id="315312063">
                                                        <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">269</int>
-                                                       <string key="NSFrame">{{191, 96}, {18, 17}}</string>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{9, 48}, {48, 17}}</string>
                                                        <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="658501629"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView" ref="543810542"/>
                                                        <bool key="NSEnabled">YES</bool>
-                                                       <object class="NSTextFieldCell" key="NSCell" id="144286012">
+                                                       <object class="NSTextFieldCell" key="NSCell" id="319371752">
                                                                <int key="NSCellFlags">68288064</int>
                                                                <int key="NSCellFlags2">71304192</int>
-                                                               <string key="NSContents">or</string>
+                                                               <string key="NSContents">Renew</string>
                                                                <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSControlView" ref="499977140"/>
+                                                               <reference key="NSControlView" ref="315312063"/>
                                                                <reference key="NSBackgroundColor" ref="155317598"/>
                                                                <reference key="NSTextColor" ref="75086281"/>
                                                        </object>
                                                </object>
-                                               <object class="NSBox" id="479715099">
-                                                       <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">14</int>
-                                                       <string key="NSFrame">{{13, 101}, {175, 5}}</string>
-                                                       <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="499977140"/>
-                                                       <string key="NSOffsets">{0, 0}</string>
-                                                       <object class="NSTextFieldCell" key="NSTitleCell">
-                                                               <int key="NSCellFlags">67239424</int>
-                                                               <int key="NSCellFlags2">0</int>
-                                                               <string key="NSContents">Box</string>
-                                                               <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSBackgroundColor" ref="114914064"/>
-                                                               <object class="NSColor" key="NSTextColor">
-                                                                       <int key="NSColorSpace">3</int>
-                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
-                                                               </object>
-                                                       </object>
-                                                       <int key="NSBorderType">3</int>
-                                                       <int key="NSBoxType">2</int>
-                                                       <int key="NSTitlePosition">0</int>
-                                                       <bool key="NSTransparent">NO</bool>
-                                               </object>
-                                               <object class="NSBox" id="658501629">
-                                                       <reference key="NSNextResponder" ref="645528012"/>
-                                                       <int key="NSvFlags">11</int>
-                                                       <string key="NSFrame">{{215, 101}, {174, 5}}</string>
-                                                       <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="682506304"/>
-                                                       <string key="NSOffsets">{0, 0}</string>
-                                                       <object class="NSTextFieldCell" key="NSTitleCell">
-                                                               <int key="NSCellFlags">67239424</int>
-                                                               <int key="NSCellFlags2">0</int>
-                                                               <string key="NSContents">Box</string>
-                                                               <reference key="NSSupport" ref="957255455"/>
-                                                               <reference key="NSBackgroundColor" ref="114914064"/>
-                                                               <object class="NSColor" key="NSTextColor">
-                                                                       <int key="NSColorSpace">3</int>
-                                                                       <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes>
-                                                               </object>
-                                                       </object>
-                                                       <int key="NSBorderType">3</int>
-                                                       <int key="NSBoxType">2</int>
-                                                       <int key="NSTitlePosition">0</int>
-                                                       <bool key="NSTransparent">NO</bool>
-                                               </object>
                                                <object class="NSButton" id="1012315616">
                                                        <reference key="NSNextResponder" ref="645528012"/>
                                                        <int key="NSvFlags">289</int>
-                                                       <string key="NSFrame">{{299, 4}, {96, 32}}</string>
+                                                       <string key="NSFrame">{{218, 12}, {96, 32}}</string>
                                                        <reference key="NSSuperview" ref="645528012"/>
+                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSButtonCell" key="NSCell" id="193635979">
                                                                <int key="NSCellFlags">67239424</int>
                                                                <int key="NSCellFlags2">134217728</int>
-                                                               <string key="NSContents">Done</string>
+                                                               <string key="NSContents">Login</string>
                                                                <reference key="NSSupport" ref="957255455"/>
                                                                <reference key="NSControlView" ref="1012315616"/>
                                                                <int key="NSButtonFlags">-2038284033</int>
                                                <object class="NSButton" id="862737677">
                                                        <reference key="NSNextResponder" ref="645528012"/>
                                                        <int key="NSvFlags">292</int>
-                                                       <string key="NSFrame">{{6, 4}, {96, 32}}</string>
+                                                       <string key="NSFrame">{{6, 12}, {96, 32}}</string>
                                                        <reference key="NSSuperview" ref="645528012"/>
-                                                       <reference key="NSNextKeyView" ref="1012315616"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView" ref="952899772"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSButtonCell" key="NSCell" id="16013539">
                                                                <int key="NSCellFlags">67239424</int>
                                                                <int key="NSPeriodicInterval">25</int>
                                                        </object>
                                                </object>
+                                               <object class="NSButton" id="952899772">
+                                                       <reference key="NSNextResponder" ref="645528012"/>
+                                                       <int key="NSvFlags">293</int>
+                                                       <string key="NSFrame">{{112, 12}, {96, 32}}</string>
+                                                       <reference key="NSSuperview" ref="645528012"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView" ref="1012315616"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="359317600">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">134217728</int>
+                                                               <string key="NSContents">Manual</string>
+                                                               <reference key="NSSupport" ref="957255455"/>
+                                                               <reference key="NSControlView" ref="952899772"/>
+                                                               <int key="NSButtonFlags">-2038284033</int>
+                                                               <int key="NSButtonFlags2">129</int>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="543810542">
+                                                       <reference key="NSNextResponder" ref="645528012"/>
+                                                       <int key="NSvFlags">268</int>
+                                                       <string key="NSFrame">{{60, 47}, {63, 18}}</string>
+                                                       <reference key="NSSuperview" ref="645528012"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView" ref="862737677"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="682735888">
+                                                               <int key="NSCellFlags">67239424</int>
+                                                               <int key="NSCellFlags2">0</int>
+                                                               <string key="NSContents">Check</string>
+                                                               <reference key="NSSupport" ref="957255455"/>
+                                                               <reference key="NSControlView" ref="543810542"/>
+                                                               <int key="NSButtonFlags">1211912703</int>
+                                                               <int key="NSButtonFlags2">2</int>
+                                                               <object class="NSCustomResource" key="NSNormalImage">
+                                                                       <string key="NSClassName">NSImage</string>
+                                                                       <string key="NSResourceName">NSSwitch</string>
+                                                               </object>
+                                                               <object class="NSButtonImageSource" key="NSAlternateImage">
+                                                                       <string key="NSImageName">NSSwitch</string>
+                                                               </object>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">200</int>
+                                                               <int key="NSPeriodicInterval">25</int>
+                                                       </object>
+                                               </object>
                                        </object>
-                                       <string key="NSFrame">{{7, 11}, {400, 209}}</string>
+                                       <string key="NSFrame">{{7, 11}, {320, 135}}</string>
                                        <reference key="NSSuperview"/>
-                                       <reference key="NSNextKeyView" ref="178498602"/>
+                                       <reference key="NSWindow"/>
+                                       <reference key="NSNextKeyView" ref="566695904"/>
                                </object>
                                <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
-                               <string key="NSMinSize">{320, 231}</string>
+                               <string key="NSMinSize">{320, 157}</string>
                                <string key="NSMaxSize">{1e+13, 1e+13}</string>
                        </object>
                        <object class="NSTreeController" id="995272659">
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
-                                               <string key="label">value: values.username</string>
-                                               <reference key="source" ref="378776445"/>
+                                               <string key="label">value: values.authToken</string>
+                                               <reference key="source" ref="163672380"/>
                                                <reference key="destination" ref="505454360"/>
                                                <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="378776445"/>
+                                                       <reference key="NSSource" ref="163672380"/>
                                                        <reference key="NSDestination" ref="505454360"/>
-                                                       <string key="NSLabel">value: values.username</string>
+                                                       <string key="NSLabel">value: values.authToken</string>
                                                        <string key="NSBinding">value</string>
-                                                       <string key="NSKeyPath">values.username</string>
+                                                       <string key="NSKeyPath">values.authToken</string>
                                                        <int key="NSNibBindingConnectorVersion">2</int>
                                                </object>
                                        </object>
-                                       <int key="connectionID">102</int>
+                                       <int key="connectionID">111</int>
                                </object>
                                <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
-                                               <string key="label">value: values.apiKey</string>
-                                               <reference key="source" ref="439428156"/>
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">userDefaultsController</string>
+                                               <reference key="source" ref="1001"/>
                                                <reference key="destination" ref="505454360"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="439428156"/>
-                                                       <reference key="NSDestination" ref="505454360"/>
-                                                       <string key="NSLabel">value: values.apiKey</string>
-                                                       <string key="NSBinding">value</string>
-                                                       <string key="NSKeyPath">values.apiKey</string>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
                                        </object>
-                                       <int key="connectionID">104</int>
+                                       <int key="connectionID">120</int>
                                </object>
                                <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
-                                               <string key="label">value: values.storageURL</string>
-                                               <reference key="source" ref="1071997738"/>
-                                               <reference key="destination" ref="505454360"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="1071997738"/>
-                                                       <reference key="NSDestination" ref="505454360"/>
-                                                       <string key="NSLabel">value: values.storageURL</string>
-                                                       <string key="NSBinding">value</string>
-                                                       <string key="NSKeyPath">values.storageURL</string>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">authenticationPanel</string>
+                                               <reference key="source" ref="1001"/>
+                                               <reference key="destination" ref="909661358"/>
+                                       </object>
+                                       <int key="connectionID">122</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">authenticationCancel:</string>
+                                               <reference key="source" ref="1001"/>
+                                               <reference key="destination" ref="862737677"/>
                                        </object>
-                                       <int key="connectionID">107</int>
+                                       <int key="connectionID">123</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">authenticationSelect:</string>
+                                               <reference key="source" ref="1001"/>
+                                               <reference key="destination" ref="817791921"/>
+                                       </object>
+                                       <int key="connectionID">125</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
-                                               <string key="label">value: values.authToken</string>
-                                               <reference key="source" ref="163672380"/>
+                                               <string key="label">value: values.authUser</string>
+                                               <reference key="source" ref="378776445"/>
                                                <reference key="destination" ref="505454360"/>
                                                <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="163672380"/>
+                                                       <reference key="NSSource" ref="378776445"/>
                                                        <reference key="NSDestination" ref="505454360"/>
-                                                       <string key="NSLabel">value: values.authToken</string>
+                                                       <string key="NSLabel">value: values.authUser</string>
                                                        <string key="NSBinding">value</string>
-                                                       <string key="NSKeyPath">values.authToken</string>
+                                                       <string key="NSKeyPath">values.authUser</string>
                                                        <int key="NSNibBindingConnectorVersion">2</int>
                                                </object>
                                        </object>
-                                       <int key="connectionID">111</int>
+                                       <int key="connectionID">128</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBOutletConnection" key="connection">
-                                               <string key="label">userDefaultsController</string>
+                                               <string key="label">authenticationCancelPushButton</string>
                                                <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="505454360"/>
+                                               <reference key="destination" ref="862737677"/>
                                        </object>
-                                       <int key="connectionID">120</int>
+                                       <int key="connectionID">136</int>
                                </object>
                                <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
-                                               <string key="label">value: values.authURL</string>
-                                               <reference key="source" ref="44425851"/>
-                                               <reference key="destination" ref="505454360"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="44425851"/>
-                                                       <reference key="NSDestination" ref="505454360"/>
-                                                       <string key="NSLabel">value: values.authURL</string>
-                                                       <string key="NSBinding">value</string>
-                                                       <string key="NSKeyPath">values.authURL</string>
-                                                       <object class="NSDictionary" key="NSOptions">
-                                                               <string key="NS.key.0">NSValidatesImmediately</string>
-                                                               <boolean value="YES" key="NS.object.0"/>
-                                                       </object>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">authenticationLoginPushButton</string>
+                                               <reference key="source" ref="1001"/>
+                                               <reference key="destination" ref="1012315616"/>
                                        </object>
-                                       <int key="connectionID">121</int>
+                                       <int key="connectionID">137</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBOutletConnection" key="connection">
-                                               <string key="label">authenticationPanel</string>
+                                               <string key="label">authenticationManualPushButton</string>
                                                <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="909661358"/>
+                                               <reference key="destination" ref="952899772"/>
                                        </object>
-                                       <int key="connectionID">122</int>
+                                       <int key="connectionID">138</int>
                                </object>
                                <object class="IBConnectionRecord">
-                                       <object class="IBActionConnection" key="connection">
-                                               <string key="label">authenticationCancel:</string>
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">authenticationRenewCheckBox</string>
                                                <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="862737677"/>
+                                               <reference key="destination" ref="543810542"/>
                                        </object>
-                                       <int key="connectionID">123</int>
+                                       <int key="connectionID">139</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">authenticationTokenTextField</string>
+                                               <reference key="source" ref="1001"/>
+                                               <reference key="destination" ref="163672380"/>
+                                       </object>
+                                       <int key="connectionID">140</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">authenticationUserTextField</string>
+                                               <reference key="source" ref="1001"/>
+                                               <reference key="destination" ref="378776445"/>
+                                       </object>
+                                       <int key="connectionID">141</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBActionConnection" key="connection">
-                                               <string key="label">authenticationDone:</string>
+                                               <string key="label">authenticationManual:</string>
                                                <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="1012315616"/>
+                                               <reference key="destination" ref="952899772"/>
                                        </object>
-                                       <int key="connectionID">124</int>
+                                       <int key="connectionID">142</int>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBActionConnection" key="connection">
-                                               <string key="label">authenticationSelect:</string>
+                                               <string key="label">authenticationLogin:</string>
                                                <reference key="source" ref="1001"/>
-                                               <reference key="destination" ref="817791921"/>
+                                               <reference key="destination" ref="1012315616"/>
                                        </object>
-                                       <int key="connectionID">125</int>
+                                       <int key="connectionID">143</int>
                                </object>
                        </object>
                        <object class="IBMutableOrderedSet" key="objectRecords">
                                                <reference key="object" ref="645528012"/>
                                                <object class="NSMutableArray" key="children">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="178498602"/>
-                                                       <reference ref="44425851"/>
-                                                       <reference ref="378776445"/>
                                                        <reference ref="566695904"/>
-                                                       <reference ref="439428156"/>
-                                                       <reference ref="353279760"/>
-                                                       <reference ref="479715099"/>
-                                                       <reference ref="499977140"/>
-                                                       <reference ref="658501629"/>
-                                                       <reference ref="1071997738"/>
+                                                       <reference ref="378776445"/>
                                                        <reference ref="163672380"/>
-                                                       <reference ref="682506304"/>
                                                        <reference ref="153397654"/>
-                                                       <reference ref="1012315616"/>
+                                                       <reference ref="315312063"/>
+                                                       <reference ref="543810542"/>
                                                        <reference ref="862737677"/>
+                                                       <reference ref="1012315616"/>
+                                                       <reference ref="952899772"/>
                                                </object>
                                                <reference key="parent" ref="909661358"/>
                                        </object>
                                        <object class="IBObjectRecord">
-                                               <int key="objectID">49</int>
-                                               <reference key="object" ref="44425851"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="676773767"/>
-                                               </object>
-                                               <reference key="parent" ref="645528012"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">50</int>
-                                               <reference key="object" ref="676773767"/>
-                                               <reference key="parent" ref="44425851"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">51</int>
-                                               <reference key="object" ref="178498602"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="176070199"/>
-                                               </object>
-                                               <reference key="parent" ref="645528012"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">52</int>
-                                               <reference key="object" ref="176070199"/>
-                                               <reference key="parent" ref="178498602"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">57</int>
-                                               <reference key="object" ref="479715099"/>
-                                               <reference key="parent" ref="645528012"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
                                                <int key="objectID">62</int>
                                                <reference key="object" ref="566695904"/>
                                                <object class="NSMutableArray" key="children">
                                                <reference key="parent" ref="378776445"/>
                                        </object>
                                        <object class="IBObjectRecord">
-                                               <int key="objectID">66</int>
-                                               <reference key="object" ref="439428156"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="171009795"/>
-                                               </object>
-                                               <reference key="parent" ref="645528012"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">67</int>
-                                               <reference key="object" ref="171009795"/>
-                                               <reference key="parent" ref="439428156"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">68</int>
-                                               <reference key="object" ref="353279760"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="268573029"/>
-                                               </object>
-                                               <reference key="parent" ref="645528012"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">69</int>
-                                               <reference key="object" ref="268573029"/>
-                                               <reference key="parent" ref="353279760"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">70</int>
-                                               <reference key="object" ref="499977140"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="144286012"/>
-                                               </object>
-                                               <reference key="parent" ref="645528012"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">71</int>
-                                               <reference key="object" ref="144286012"/>
-                                               <reference key="parent" ref="499977140"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">73</int>
-                                               <reference key="object" ref="658501629"/>
-                                               <reference key="parent" ref="645528012"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">82</int>
-                                               <reference key="object" ref="1071997738"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="502497633"/>
-                                               </object>
-                                               <reference key="parent" ref="645528012"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
                                                <int key="objectID">83</int>
                                                <reference key="object" ref="163672380"/>
                                                <object class="NSMutableArray" key="children">
                                                <reference key="parent" ref="645528012"/>
                                        </object>
                                        <object class="IBObjectRecord">
-                                               <int key="objectID">84</int>
-                                               <reference key="object" ref="682506304"/>
-                                               <object class="NSMutableArray" key="children">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <reference ref="710980917"/>
-                                               </object>
-                                               <reference key="parent" ref="645528012"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
                                                <int key="objectID">85</int>
                                                <reference key="object" ref="153397654"/>
                                                <object class="NSMutableArray" key="children">
                                                <reference key="parent" ref="153397654"/>
                                        </object>
                                        <object class="IBObjectRecord">
-                                               <int key="objectID">87</int>
-                                               <reference key="object" ref="710980917"/>
-                                               <reference key="parent" ref="682506304"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
                                                <int key="objectID">88</int>
                                                <reference key="object" ref="914100041"/>
                                                <reference key="parent" ref="163672380"/>
                                        </object>
                                        <object class="IBObjectRecord">
-                                               <int key="objectID">89</int>
-                                               <reference key="object" ref="502497633"/>
-                                               <reference key="parent" ref="1071997738"/>
-                                       </object>
-                                       <object class="IBObjectRecord">
                                                <int key="objectID">91</int>
                                                <reference key="object" ref="1012315616"/>
                                                <object class="NSMutableArray" key="children">
                                                <reference key="object" ref="661833551"/>
                                                <reference key="parent" ref="336305760"/>
                                        </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">129</int>
+                                               <reference key="object" ref="543810542"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="682735888"/>
+                                               </object>
+                                               <reference key="parent" ref="645528012"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">130</int>
+                                               <reference key="object" ref="682735888"/>
+                                               <reference key="parent" ref="543810542"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">131</int>
+                                               <reference key="object" ref="315312063"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="319371752"/>
+                                               </object>
+                                               <reference key="parent" ref="645528012"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">132</int>
+                                               <reference key="object" ref="319371752"/>
+                                               <reference key="parent" ref="315312063"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">133</int>
+                                               <reference key="object" ref="952899772"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="359317600"/>
+                                               </object>
+                                               <reference key="parent" ref="645528012"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">134</int>
+                                               <reference key="object" ref="359317600"/>
+                                               <reference key="parent" ref="952899772"/>
+                                       </object>
                                </object>
                        </object>
                        <object class="NSMutableDictionary" key="flattenedProperties">
                                        <string>11.IBPluginDependency</string>
                                        <string>114.IBPluginDependency</string>
                                        <string>115.IBPluginDependency</string>
+                                       <string>129.IBPluginDependency</string>
                                        <string>13.IBPluginDependency</string>
+                                       <string>130.IBPluginDependency</string>
+                                       <string>131.IBPluginDependency</string>
+                                       <string>132.IBPluginDependency</string>
+                                       <string>133.IBPluginDependency</string>
+                                       <string>134.IBPluginDependency</string>
                                        <string>14.IBPluginDependency</string>
                                        <string>15.IBPluginDependency</string>
                                        <string>18.IBPluginDependency</string>
                                        <string>47.IBPluginDependency</string>
                                        <string>47.NSWindowTemplate.visibleAtLaunch</string>
                                        <string>48.IBPluginDependency</string>
-                                       <string>49.IBPluginDependency</string>
-                                       <string>50.IBPluginDependency</string>
-                                       <string>51.IBPluginDependency</string>
-                                       <string>52.IBPluginDependency</string>
-                                       <string>57.IBPluginDependency</string>
                                        <string>62.IBPluginDependency</string>
                                        <string>63.IBPluginDependency</string>
                                        <string>64.IBPluginDependency</string>
                                        <string>65.IBPluginDependency</string>
-                                       <string>66.IBPluginDependency</string>
-                                       <string>67.IBPluginDependency</string>
-                                       <string>68.IBPluginDependency</string>
-                                       <string>69.IBPluginDependency</string>
-                                       <string>70.IBPluginDependency</string>
-                                       <string>71.IBPluginDependency</string>
-                                       <string>73.IBPluginDependency</string>
                                        <string>8.IBPluginDependency</string>
-                                       <string>82.IBPluginDependency</string>
                                        <string>83.IBPluginDependency</string>
-                                       <string>84.IBPluginDependency</string>
                                        <string>85.IBPluginDependency</string>
                                        <string>86.IBPluginDependency</string>
-                                       <string>87.IBPluginDependency</string>
                                        <string>88.IBPluginDependency</string>
-                                       <string>89.IBPluginDependency</string>
                                        <string>91.IBPluginDependency</string>
                                        <string>92.IBPluginDependency</string>
                                        <string>93.IBPluginDependency</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <boolean value="NO"/>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <boolean value="NO"/>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                <reference key="dict.values" ref="0"/>
                        </object>
                        <nil key="sourceID"/>
-                       <int key="maxID">126</int>
+                       <int key="maxID">143</int>
                </object>
                <object class="IBClassDescriber" key="IBDocument.Classes">
                        <object class="NSMutableArray" key="referencedPartialClassDescriptions">
                                                <object class="NSArray" key="dict.sortedKeys">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
                                                        <string>authenticationCancel:</string>
-                                                       <string>authenticationDone:</string>
+                                                       <string>authenticationLogin:</string>
+                                                       <string>authenticationManual:</string>
                                                        <string>authenticationSelect:</string>
                                                        <string>refresh:</string>
                                                </object>
                                                        <string>id</string>
                                                        <string>id</string>
                                                        <string>id</string>
+                                                       <string>id</string>
                                                </object>
                                        </object>
                                        <object class="NSMutableDictionary" key="actionInfosByName">
                                                <object class="NSArray" key="dict.sortedKeys">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
                                                        <string>authenticationCancel:</string>
-                                                       <string>authenticationDone:</string>
+                                                       <string>authenticationLogin:</string>
+                                                       <string>authenticationManual:</string>
                                                        <string>authenticationSelect:</string>
                                                        <string>refresh:</string>
                                                </object>
                                                                <string key="candidateClassName">id</string>
                                                        </object>
                                                        <object class="IBActionInfo">
-                                                               <string key="name">authenticationDone:</string>
+                                                               <string key="name">authenticationLogin:</string>
+                                                               <string key="candidateClassName">id</string>
+                                                       </object>
+                                                       <object class="IBActionInfo">
+                                                               <string key="name">authenticationManual:</string>
                                                                <string key="candidateClassName">id</string>
                                                        </object>
                                                        <object class="IBActionInfo">
                                                <bool key="EncodedWithXMLCoder">YES</bool>
                                                <object class="NSArray" key="dict.sortedKeys">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>authenticationCancelPushButton</string>
+                                                       <string>authenticationLoginPushButton</string>
+                                                       <string>authenticationManualPushButton</string>
                                                        <string>authenticationPanel</string>
+                                                       <string>authenticationRenewCheckBox</string>
+                                                       <string>authenticationTokenTextField</string>
+                                                       <string>authenticationUserTextField</string>
                                                        <string>browser</string>
                                                        <string>outlineView</string>
                                                        <string>splitView</string>
                                                </object>
                                                <object class="NSMutableArray" key="dict.values">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>NSButton</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSButton</string>
                                                        <string>NSPanel</string>
+                                                       <string>NSButton</string>
+                                                       <string>NSTextField</string>
+                                                       <string>NSTextField</string>
                                                        <string>NSBrowser</string>
                                                        <string>NSOutlineView</string>
                                                        <string>NSSplitView</string>
                                                <bool key="EncodedWithXMLCoder">YES</bool>
                                                <object class="NSArray" key="dict.sortedKeys">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <string>authenticationCancelPushButton</string>
+                                                       <string>authenticationLoginPushButton</string>
+                                                       <string>authenticationManualPushButton</string>
                                                        <string>authenticationPanel</string>
+                                                       <string>authenticationRenewCheckBox</string>
+                                                       <string>authenticationTokenTextField</string>
+                                                       <string>authenticationUserTextField</string>
                                                        <string>browser</string>
                                                        <string>outlineView</string>
                                                        <string>splitView</string>
                                                <object class="NSMutableArray" key="dict.values">
                                                        <bool key="EncodedWithXMLCoder">YES</bool>
                                                        <object class="IBToOneOutletInfo">
+                                                               <string key="name">authenticationCancelPushButton</string>
+                                                               <string key="candidateClassName">NSButton</string>
+                                                       </object>
+                                                       <object class="IBToOneOutletInfo">
+                                                               <string key="name">authenticationLoginPushButton</string>
+                                                               <string key="candidateClassName">NSButton</string>
+                                                       </object>
+                                                       <object class="IBToOneOutletInfo">
+                                                               <string key="name">authenticationManualPushButton</string>
+                                                               <string key="candidateClassName">NSButton</string>
+                                                       </object>
+                                                       <object class="IBToOneOutletInfo">
                                                                <string key="name">authenticationPanel</string>
                                                                <string key="candidateClassName">NSPanel</string>
                                                        </object>
                                                        <object class="IBToOneOutletInfo">
+                                                               <string key="name">authenticationRenewCheckBox</string>
+                                                               <string key="candidateClassName">NSButton</string>
+                                                       </object>
+                                                       <object class="IBToOneOutletInfo">
+                                                               <string key="name">authenticationTokenTextField</string>
+                                                               <string key="candidateClassName">NSTextField</string>
+                                                       </object>
+                                                       <object class="IBToOneOutletInfo">
+                                                               <string key="name">authenticationUserTextField</string>
+                                                               <string key="candidateClassName">NSTextField</string>
+                                                       </object>
+                                                       <object class="IBToOneOutletInfo">
                                                                <string key="name">browser</string>
                                                                <string key="candidateClassName">NSBrowser</string>
                                                        </object>
                                <string>145-persondot</string>
                                <string>NSMenuCheckmark</string>
                                <string>NSMenuMixedState</string>
+                               <string>NSSwitch</string>
                                <string>NSToolbarCustomizeToolbarItemImage</string>
                        </object>
                        <object class="NSMutableArray" key="dict.values">
                                <string>{24, 26}</string>
                                <string>{9, 8}</string>
                                <string>{7, 2}</string>
+                               <string>{15, 15}</string>
                                <string>{32, 32}</string>
                        </object>
                </object>
diff --git a/pithos-macos/PithosBrowserPreviewController.xib b/pithos-macos/PithosBrowserPreviewController.xib
new file mode 100644 (file)
index 0000000..f807ddc
--- /dev/null
@@ -0,0 +1,904 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
+       <data>
+               <int key="IBDocument.SystemTarget">1060</int>
+               <string key="IBDocument.SystemVersion">10K549</string>
+               <string key="IBDocument.InterfaceBuilderVersion">1306</string>
+               <string key="IBDocument.AppKitVersion">1038.36</string>
+               <string key="IBDocument.HIToolboxVersion">461.00</string>
+               <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+                       <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+                       <string key="NS.object.0">1306</string>
+               </object>
+               <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string>NSTextField</string>
+                       <string>NSTextFieldCell</string>
+                       <string>NSButton</string>
+                       <string>NSCustomView</string>
+                       <string>NSImageCell</string>
+                       <string>NSButtonCell</string>
+                       <string>NSImageView</string>
+                       <string>NSUserDefaultsController</string>
+                       <string>NSCustomObject</string>
+               </object>
+               <object class="NSArray" key="IBDocument.PluginDependencies">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+               </object>
+               <object class="NSMutableDictionary" key="IBDocument.Metadata">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSArray" key="dict.sortedKeys" id="0">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                       </object>
+                       <reference key="dict.values" ref="0"/>
+               </object>
+               <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+                       <bool key="EncodedWithXMLCoder">YES</bool>
+                       <object class="NSCustomObject" id="1001">
+                               <string key="NSClassName">NSViewController</string>
+                       </object>
+                       <object class="NSCustomObject" id="1003">
+                               <string key="NSClassName">FirstResponder</string>
+                       </object>
+                       <object class="NSCustomObject" id="1004">
+                               <string key="NSClassName">NSApplication</string>
+                       </object>
+                       <object class="NSCustomView" id="1005">
+                               <reference key="NSNextResponder"/>
+                               <int key="NSvFlags">268</int>
+                               <object class="NSMutableArray" key="NSSubviews">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="NSButton" id="241278852">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">269</int>
+                                               <string key="NSFrame">{{59, 8}, {82, 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">
+                                                       <int key="NSCellFlags">-2080244224</int>
+                                                       <int key="NSCellFlags2">134217728</int>
+                                                       <string key="NSContents">More info...</string>
+                                                       <object class="NSFont" key="NSSupport">
+                                                               <string key="NSName">LucidaGrande</string>
+                                                               <double key="NSSize">12</double>
+                                                               <int key="NSfFlags">16</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="241278852"/>
+                                                       <int key="NSButtonFlags">-2038152961</int>
+                                                       <int key="NSButtonFlags2">164</int>
+                                                       <string key="NSAlternateContents"/>
+                                                       <string key="NSKeyEquivalent"/>
+                                                       <int key="NSPeriodicDelay">400</int>
+                                                       <int key="NSPeriodicInterval">75</int>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="361683768">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{1, 35}, {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">
+                                                       <int key="NSCellFlags">68288064</int>
+                                                       <int key="NSCellFlags2">71304192</int>
+                                                       <string key="NSContents">Version</string>
+                                                       <object class="NSFont" key="NSSupport" id="413757027">
+                                                               <string key="NSName">LucidaGrande-Bold</string>
+                                                               <double key="NSSize">11</double>
+                                                               <int key="NSfFlags">16</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="361683768"/>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <object class="NSColor" key="NSBackgroundColor" id="363018318">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">controlColor</string>
+                                                               <object class="NSColor" key="NSColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+                                                               </object>
+                                                       </object>
+                                                       <object class="NSColor" key="NSTextColor" id="183150230">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">disabledControlTextColor</string>
+                                                               <object class="NSColor" key="NSColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MC4zMzMzMzMzMzMzAA</bytes>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="779495175">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{1, 57}, {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">
+                                                       <int key="NSCellFlags">68288064</int>
+                                                       <int key="NSCellFlags2">71304192</int>
+                                                       <string key="NSContents">Modified by</string>
+                                                       <reference key="NSSupport" ref="413757027"/>
+                                                       <reference key="NSControlView" ref="779495175"/>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="183150230"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="130674256">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{1, 79}, {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">
+                                                       <int key="NSCellFlags">68288064</int>
+                                                       <int key="NSCellFlags2">71304192</int>
+                                                       <string key="NSContents">Modified</string>
+                                                       <reference key="NSSupport" ref="413757027"/>
+                                                       <reference key="NSControlView" ref="130674256"/>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="183150230"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="363250715">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{1, 101}, {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">
+                                                       <int key="NSCellFlags">68288064</int>
+                                                       <int key="NSCellFlags2">71304192</int>
+                                                       <string key="NSContents">Size</string>
+                                                       <reference key="NSSupport" ref="413757027"/>
+                                                       <reference key="NSControlView" ref="363250715"/>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="183150230"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="261591603">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{1, 123}, {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">
+                                                       <int key="NSCellFlags">68288064</int>
+                                                       <int key="NSCellFlags2">71304192</int>
+                                                       <string key="NSContents">Kind</string>
+                                                       <reference key="NSSupport" ref="413757027"/>
+                                                       <reference key="NSControlView" ref="261591603"/>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="183150230"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="774296355">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{1, 145}, {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">
+                                                       <int key="NSCellFlags">68288064</int>
+                                                       <int key="NSCellFlags2">71304192</int>
+                                                       <string key="NSContents">Name</string>
+                                                       <reference key="NSSupport" ref="413757027"/>
+                                                       <reference key="NSControlView" ref="774296355"/>
+                                                       <bool key="NSDrawsBackground">YES</bool>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="183150230"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="711438167">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{101, 35}, {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">
+                                                       <int key="NSCellFlags">67239488</int>
+                                                       <int key="NSCellFlags2">4196352</int>
+                                                       <string key="NSContents">Version</string>
+                                                       <object class="NSFont" key="NSSupport" id="611945789">
+                                                               <string key="NSName">LucidaGrande</string>
+                                                               <double key="NSSize">11</double>
+                                                               <int key="NSfFlags">16</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="711438167"/>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <object class="NSColor" key="NSTextColor" id="320633288">
+                                                               <int key="NSColorSpace">6</int>
+                                                               <string key="NSCatalogName">System</string>
+                                                               <string key="NSColorName">controlTextColor</string>
+                                                               <object class="NSColor" key="NSColor">
+                                                                       <int key="NSColorSpace">3</int>
+                                                                       <bytes key="NSWhite">MAA</bytes>
+                                                               </object>
+                                                       </object>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="348582496">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{101, 57}, {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>
+                                                       <string key="NSContents">Modified</string>
+                                                       <reference key="NSSupport" ref="611945789"/>
+                                                       <reference key="NSControlView" ref="348582496"/>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="320633288"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="490957876">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{101, 79}, {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">
+                                                       <int key="NSCellFlags">67239488</int>
+                                                       <int key="NSCellFlags2">4196352</int>
+                                                       <string key="NSContents">Modified</string>
+                                                       <reference key="NSSupport" ref="611945789"/>
+                                                       <reference key="NSControlView" ref="490957876"/>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="320633288"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="458298377">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{101, 101}, {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">
+                                                       <int key="NSCellFlags">67239488</int>
+                                                       <int key="NSCellFlags2">4196352</int>
+                                                       <string key="NSContents">Size</string>
+                                                       <reference key="NSSupport" ref="611945789"/>
+                                                       <reference key="NSControlView" ref="458298377"/>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="320633288"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="933584688">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{101, 123}, {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">
+                                                       <int key="NSCellFlags">67239488</int>
+                                                       <int key="NSCellFlags2">4196352</int>
+                                                       <string key="NSContents">Kind</string>
+                                                       <reference key="NSSupport" ref="611945789"/>
+                                                       <reference key="NSControlView" ref="933584688"/>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="320633288"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSTextField" id="183377333">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">271</int>
+                                               <string key="NSFrame">{{101, 145}, {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">
+                                                       <int key="NSCellFlags">67239488</int>
+                                                       <int key="NSCellFlags2">4196352</int>
+                                                       <string key="NSContents">Name</string>
+                                                       <reference key="NSSupport" ref="611945789"/>
+                                                       <reference key="NSControlView" ref="183377333"/>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="320633288"/>
+                                               </object>
+                                       </object>
+                                       <object class="NSImageView" id="501039666">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">269</int>
+                                               <object class="NSMutableSet" key="NSDragTypes">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <object class="NSArray" key="set.sortedObjects">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <string>Apple PDF pasteboard type</string>
+                                                               <string>Apple PICT pasteboard type</string>
+                                                               <string>Apple PNG pasteboard type</string>
+                                                               <string>NSFilenamesPboardType</string>
+                                                               <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
+                                                               <string>NeXT TIFF v4.0 pasteboard type</string>
+                                                       </object>
+                                               </object>
+                                               <string key="NSFrame">{{36, 167}, {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">
+                                                       <int key="NSCellFlags">130560</int>
+                                                       <int key="NSCellFlags2">33554432</int>
+                                                       <int key="NSAlign">0</int>
+                                                       <int key="NSScale">3</int>
+                                                       <int key="NSStyle">0</int>
+                                                       <bool key="NSAnimates">NO</bool>
+                                               </object>
+                                               <bool key="NSEditable">YES</bool>
+                                       </object>
+                                       <object class="NSTextField" id="547561616">
+                                               <reference key="NSNextResponder" ref="1005"/>
+                                               <int key="NSvFlags">268</int>
+                                               <string key="NSFrame">{{17, 303}, {56, 17}}</string>
+                                               <reference key="NSSuperview" ref="1005"/>
+                                               <reference key="NSWindow"/>
+                                               <reference key="NSNextKeyView" ref="501039666"/>
+                                               <bool key="NSEnabled">YES</bool>
+                                               <object class="NSTextFieldCell" key="NSCell" id="876025049">
+                                                       <int key="NSCellFlags">68288064</int>
+                                                       <int key="NSCellFlags2">272630784</int>
+                                                       <string key="NSContents">Preview:</string>
+                                                       <object class="NSFont" key="NSSupport">
+                                                               <string key="NSName">LucidaGrande</string>
+                                                               <double key="NSSize">13</double>
+                                                               <int key="NSfFlags">1044</int>
+                                                       </object>
+                                                       <reference key="NSControlView" ref="547561616"/>
+                                                       <reference key="NSBackgroundColor" ref="363018318"/>
+                                                       <reference key="NSTextColor" ref="320633288"/>
+                                               </object>
+                                       </object>
+                               </object>
+                               <string key="NSFrameSize">{200, 330}</string>
+                               <reference key="NSSuperview"/>
+                               <reference key="NSWindow"/>
+                               <reference key="NSNextKeyView" ref="547561616"/>
+                               <string key="NSClassName">NSView</string>
+                       </object>
+                       <object class="NSUserDefaultsController" id="684261592">
+                               <bool key="NSSharedInstance">YES</bool>
+                       </object>
+               </object>
+               <object class="IBObjectContainer" key="IBDocument.Objects">
+                       <object class="NSMutableArray" key="connectionRecords">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">view</string>
+                                               <reference key="source" ref="1001"/>
+                                               <reference key="destination" ref="1005"/>
+                                       </object>
+                                       <int key="connectionID">14</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: representedObject.icon</string>
+                                               <reference key="source" ref="501039666"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="501039666"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">value: representedObject.icon</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">representedObject.icon</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">24</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: representedObject.displayName</string>
+                                               <reference key="source" ref="183377333"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="183377333"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">value: representedObject.displayName</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">representedObject.displayName</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">34</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: representedObject.kind</string>
+                                               <reference key="source" ref="933584688"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="933584688"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">value: representedObject.kind</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">representedObject.kind</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">60</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: representedObject.size</string>
+                                               <reference key="source" ref="458298377"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="458298377"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">value: representedObject.size</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">representedObject.size</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">61</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: representedObject.modified</string>
+                                               <reference key="source" ref="490957876"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="490957876"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">value: representedObject.modified</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">representedObject.modified</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">65</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: representedObject.modifiedBy</string>
+                                               <reference key="source" ref="348582496"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="348582496"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">value: representedObject.modifiedBy</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">representedObject.modifiedBy</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">69</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: representedObject.version</string>
+                                               <reference key="source" ref="711438167"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="711438167"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">value: representedObject.version</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">representedObject.version</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">73</int>
+                               </object>
+                       </object>
+                       <object class="IBMutableOrderedSet" key="objectRecords">
+                               <object class="NSArray" key="orderedObjects">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">0</int>
+                                               <reference key="object" ref="0"/>
+                                               <reference key="children" ref="1000"/>
+                                               <nil key="parent"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-2</int>
+                                               <reference key="object" ref="1001"/>
+                                               <reference key="parent" ref="0"/>
+                                               <string key="objectName">File's Owner</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-1</int>
+                                               <reference key="object" ref="1003"/>
+                                               <reference key="parent" ref="0"/>
+                                               <string key="objectName">First Responder</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">-3</int>
+                                               <reference key="object" ref="1004"/>
+                                               <reference key="parent" ref="0"/>
+                                               <string key="objectName">Application</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">1</int>
+                                               <reference key="object" ref="1005"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="501039666"/>
+                                                       <reference ref="547561616"/>
+                                                       <reference ref="183377333"/>
+                                                       <reference ref="933584688"/>
+                                                       <reference ref="363250715"/>
+                                                       <reference ref="130674256"/>
+                                                       <reference ref="779495175"/>
+                                                       <reference ref="361683768"/>
+                                                       <reference ref="774296355"/>
+                                                       <reference ref="261591603"/>
+                                                       <reference ref="458298377"/>
+                                                       <reference ref="490957876"/>
+                                                       <reference ref="348582496"/>
+                                                       <reference ref="241278852"/>
+                                                       <reference ref="711438167"/>
+                                               </object>
+                                               <reference key="parent" ref="0"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">10</int>
+                                               <reference key="object" ref="684261592"/>
+                                               <reference key="parent" ref="0"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">20</int>
+                                               <reference key="object" ref="501039666"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="327417217"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                               <string key="objectName">Image View</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">21</int>
+                                               <reference key="object" ref="327417217"/>
+                                               <reference key="parent" ref="501039666"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">25</int>
+                                               <reference key="object" ref="547561616"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="876025049"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">26</int>
+                                               <reference key="object" ref="876025049"/>
+                                               <reference key="parent" ref="547561616"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">29</int>
+                                               <reference key="object" ref="183377333"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="59179920"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                               <string key="objectName">Name</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">30</int>
+                                               <reference key="object" ref="59179920"/>
+                                               <reference key="parent" ref="183377333"/>
+                                               <string key="objectName">Text Field Cell - Name</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">27</int>
+                                               <reference key="object" ref="774296355"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="558074580"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">28</int>
+                                               <reference key="object" ref="558074580"/>
+                                               <reference key="parent" ref="774296355"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">37</int>
+                                               <reference key="object" ref="261591603"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="726762919"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">38</int>
+                                               <reference key="object" ref="726762919"/>
+                                               <reference key="parent" ref="261591603"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">41</int>
+                                               <reference key="object" ref="363250715"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="27846884"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">42</int>
+                                               <reference key="object" ref="27846884"/>
+                                               <reference key="parent" ref="363250715"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">43</int>
+                                               <reference key="object" ref="130674256"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="423776930"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">44</int>
+                                               <reference key="object" ref="423776930"/>
+                                               <reference key="parent" ref="130674256"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">47</int>
+                                               <reference key="object" ref="779495175"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="358475028"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">48</int>
+                                               <reference key="object" ref="358475028"/>
+                                               <reference key="parent" ref="779495175"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">49</int>
+                                               <reference key="object" ref="361683768"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="984886579"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">50</int>
+                                               <reference key="object" ref="984886579"/>
+                                               <reference key="parent" ref="361683768"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">51</int>
+                                               <reference key="object" ref="933584688"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="11695648"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                               <string key="objectName">Content Type</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">52</int>
+                                               <reference key="object" ref="11695648"/>
+                                               <reference key="parent" ref="933584688"/>
+                                               <string key="objectName">Text Field Cell - Kind</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">55</int>
+                                               <reference key="object" ref="458298377"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="599752880"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                               <string key="objectName">Size</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">56</int>
+                                               <reference key="object" ref="599752880"/>
+                                               <reference key="parent" ref="458298377"/>
+                                               <string key="objectName">Text Field Cell - Size</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">62</int>
+                                               <reference key="object" ref="490957876"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="622580923"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                               <string key="objectName">Modified</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">63</int>
+                                               <reference key="object" ref="622580923"/>
+                                               <reference key="parent" ref="490957876"/>
+                                               <string key="objectName">Text Field Cell - Modified</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">66</int>
+                                               <reference key="object" ref="348582496"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="373378417"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                               <string key="objectName">Modified by</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">67</int>
+                                               <reference key="object" ref="373378417"/>
+                                               <reference key="parent" ref="348582496"/>
+                                               <string key="objectName">Text Field Cell - Modified by</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">70</int>
+                                               <reference key="object" ref="711438167"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="948332378"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                               <string key="objectName">Version</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">71</int>
+                                               <reference key="object" ref="948332378"/>
+                                               <reference key="parent" ref="711438167"/>
+                                               <string key="objectName">Text Field Cell - Version</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">74</int>
+                                               <reference key="object" ref="241278852"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="1036336951"/>
+                                               </object>
+                                               <reference key="parent" ref="1005"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">75</int>
+                                               <reference key="object" ref="1036336951"/>
+                                               <reference key="parent" ref="241278852"/>
+                                       </object>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="flattenedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <object class="NSArray" key="dict.sortedKeys">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>-1.IBPluginDependency</string>
+                                       <string>-2.IBPluginDependency</string>
+                                       <string>-3.IBPluginDependency</string>
+                                       <string>1.IBPluginDependency</string>
+                                       <string>1.WindowOrigin</string>
+                                       <string>1.editorWindowContentRectSynchronizationRect</string>
+                                       <string>20.IBPluginDependency</string>
+                                       <string>21.IBPluginDependency</string>
+                                       <string>25.IBPluginDependency</string>
+                                       <string>26.IBPluginDependency</string>
+                                       <string>27.IBPluginDependency</string>
+                                       <string>28.IBPluginDependency</string>
+                                       <string>29.IBPluginDependency</string>
+                                       <string>30.IBPluginDependency</string>
+                                       <string>37.IBPluginDependency</string>
+                                       <string>38.IBPluginDependency</string>
+                                       <string>41.IBPluginDependency</string>
+                                       <string>42.IBPluginDependency</string>
+                                       <string>43.IBPluginDependency</string>
+                                       <string>44.IBPluginDependency</string>
+                                       <string>47.IBPluginDependency</string>
+                                       <string>48.IBPluginDependency</string>
+                                       <string>49.IBPluginDependency</string>
+                                       <string>50.IBPluginDependency</string>
+                                       <string>51.IBPluginDependency</string>
+                                       <string>52.IBPluginDependency</string>
+                                       <string>55.IBPluginDependency</string>
+                                       <string>56.IBPluginDependency</string>
+                                       <string>62.IBPluginDependency</string>
+                                       <string>63.IBPluginDependency</string>
+                                       <string>66.IBPluginDependency</string>
+                                       <string>67.IBPluginDependency</string>
+                                       <string>70.IBPluginDependency</string>
+                                       <string>71.IBPluginDependency</string>
+                                       <string>74.IBPluginDependency</string>
+                                       <string>75.IBPluginDependency</string>
+                               </object>
+                               <object class="NSMutableArray" key="dict.values">
+                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>{628, 654}</string>
+                                       <string>{{357, 416}, {480, 272}}</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                               </object>
+                       </object>
+                       <object class="NSMutableDictionary" key="unlocalizedProperties">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <reference key="dict.sortedKeys" ref="0"/>
+                               <reference key="dict.values" ref="0"/>
+                       </object>
+                       <nil key="activeLocalization"/>
+                       <object class="NSMutableDictionary" key="localizations">
+                               <bool key="EncodedWithXMLCoder">YES</bool>
+                               <reference key="dict.sortedKeys" ref="0"/>
+                               <reference key="dict.values" ref="0"/>
+                       </object>
+                       <nil key="sourceID"/>
+                       <int key="maxID">75</int>
+               </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes"/>
+               <int key="IBDocument.localizationMode">0</int>
+               <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
+               <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+                       <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
+                       <integer value="3000" key="NS.object.0"/>
+               </object>
+               <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+               <int key="IBDocument.defaultPropertyAccessControl">3</int>
+       </data>
+</archive>
similarity index 90%
rename from pithos-macos/PithosContainer.h
rename to pithos-macos/PithosContainerNode.h
index fc63d4e..1798280 100644 (file)
 // or implied, of GRNET S.A.
 
 #import "PithosNode.h"
+#import "ASIPithosContainer.h"
 
-@interface PithosContainer : PithosNode {
-    NSString *containerName;
+@interface PithosContainerNode : PithosNode {
+    ASIPithosContainer *pithosContainer;
     
     NSMutableArray *objects;
     
@@ -47,8 +48,7 @@
     NSString *prefix;
 }
 
-@property(readonly) NSString *containerName;
-
+- (id)initWithPithosContainer:(ASIPithosContainer *)aPithosContainer;
 - (id)initWithContainerName:(NSString *)aContainerName;
 
 @end
similarity index 88%
rename from pithos-macos/PithosContainer.m
rename to pithos-macos/PithosContainerNode.m
index bd5b621..bfa527c 100644 (file)
 // interpreted as representing official policies, either expressed
 // or implied, of GRNET S.A.
 
-#import "PithosContainer.h"
-#import "PithosObject.h"
-#import "PithosSubdir.h"
+#import "PithosContainerNode.h"
+#import "PithosObjectNode.h"
+#import "PithosSubdirNode.h"
 #import "ASIPithosContainerRequest.h"
 #import "ASIPithosObject.h"
 #import "ASIDownloadCache.h"
 
 static NSImage *icon = nil;
 
-@implementation PithosContainer
-@synthesize containerName;
+@implementation PithosContainerNode
 
 + (void)initialize {
-       if (self == [PithosContainer class])
+       if (self == [PithosContainerNode class])
         icon = [[NSImage imageNamed:@"container"] retain];
 }
 
 #pragma mark -
 #pragma mark Object Lifecycle
 
-- (id)initWithContainerName:(NSString *)aContainerName {
+- (id)initWithPithosContainer:(ASIPithosContainer *)aPithosContainer {
     if ((self = [super init])) {
-        containerName = [aContainerName copy];
+        pithosContainer = [aPithosContainer retain];
         refreshing = NO;
         prefix = nil;
     }
     return self;
 }
 
+- (id)initWithContainerName:(NSString *)aContainerName {
+    ASIPithosContainer *container = [ASIPithosContainer container];
+    container.name = aContainerName;
+    return [self initWithPithosContainer:container];
+}
+
 - (void)dealloc {
     [prefix release];
     [objects release];
-    [containerName release];
+    [pithosContainer release];
     [super dealloc];
 }
 
@@ -91,7 +96,7 @@ static NSImage *icon = nil;
             NSMutableArray *newChildren = [NSMutableArray array];
             for (ASIPithosObject *object in objects) {
                 if (object.subdir) {
-                    PithosSubdir *node = [[[PithosSubdir alloc] initWithContainerName:containerName subdirName:object.name] autorelease];
+                    PithosSubdirNode *node = [[[PithosSubdirNode alloc] initWithPithosContainer:pithosContainer pithosObject:object] autorelease];
                     if (children) {
                         NSUInteger oldIndex = [children indexOfObject:node];
                         if (oldIndex != NSNotFound)
@@ -100,7 +105,7 @@ static NSImage *icon = nil;
                     }
                     [newChildren addObject:node];                
                 } else {
-                    PithosObject *node = [[[PithosObject alloc] initWithContainerName:containerName objectName:object.name] autorelease];
+                    PithosObjectNode *node = [[[PithosObjectNode alloc] initWithPithosContainer:pithosContainer pithosObject:object] autorelease];
                     if (children) {
                         NSUInteger oldIndex = [children indexOfObject:node];
                         if (oldIndex != NSNotFound)
@@ -122,7 +127,7 @@ static NSImage *icon = nil;
         [[NSNotificationCenter defaultCenter] postNotificationName:@"PithosNodeChildrenUpdated" object:self];
     } else {
         // Do an additional request to fetch more objects
-        ASIPithosContainerRequest *newContainerRequest = [ASIPithosContainerRequest listObjectsRequestWithContainerName:containerName 
+        ASIPithosContainerRequest *newContainerRequest = [ASIPithosContainerRequest listObjectsRequestWithContainerName:pithosContainer.name 
                                                                                                                   limit:0 
                                                                                                                  marker:[[someObjects lastObject] name] 
                                                                                                                  prefix:prefix 
@@ -151,7 +156,7 @@ static NSImage *icon = nil;
 
 - (NSString *)url {
     if (url == nil) 
-        url = [[NSString alloc] initWithFormat:@"%@/%@", [ASIPithosRequest storageURL], containerName];
+        url = [[NSString alloc] initWithFormat:@"%@/%@", [ASIPithosRequest storageURL], pithosContainer.name];
     return url;
 }
 
@@ -161,7 +166,7 @@ static NSImage *icon = nil;
             if (!refreshing) {
                 refreshing = YES;
                 childrenDirty = NO;
-                ASIPithosContainerRequest *containerRequest = [ASIPithosContainerRequest listObjectsRequestWithContainerName:containerName 
+                ASIPithosContainerRequest *containerRequest = [ASIPithosContainerRequest listObjectsRequestWithContainerName:pithosContainer.name 
                                                                                                                        limit:0 
                                                                                                                       marker:nil 
                                                                                                                       prefix:prefix 
@@ -180,7 +185,7 @@ static NSImage *icon = nil;
 }
 
 - (NSString *)displayName {
-    return [[containerName copy] autorelease];
+    return [[pithosContainer.name copy] autorelease];
 }
 
 - (NSImage *)icon {
similarity index 97%
rename from pithos-macos/PithosEmpty.h
rename to pithos-macos/PithosEmptyNode.h
index 87e8a31..6c5b489 100644 (file)
@@ -37,7 +37,7 @@
 
 #import "PithosNode.h"
 
-@interface PithosEmpty : PithosNode {
+@interface PithosEmptyNode : PithosNode {
     NSImage *icon;
 }
 
similarity index 89%
rename from pithos-macos/PithosEmpty.m
rename to pithos-macos/PithosEmptyNode.m
index 24e9546..aa537eb 100644 (file)
@@ -35,9 +35,9 @@
 // interpreted as representing official policies, either expressed
 // or implied, of GRNET S.A.
 
-#import "PithosEmpty.h"
+#import "PithosEmptyNode.h"
 
-@implementation PithosEmpty
+@implementation PithosEmptyNode
 
 #pragma mark -
 #pragma mark Object Lifecycle
     return icon;
 }
 
+- (NSString *)kind {
+    return nil;
+}
+
+- (NSString *)size {
+    return nil;
+}
+
+- (NSString *)modified {
+    return nil;
+}
+
+- (NSString *)modifiedBy {
+    return nil;
+}
+
+- (NSString *)version {
+    return nil;
+}
+
 @end
index d39fc5f..8440a3f 100644 (file)
 @property(readonly) NSString *displayName;
 @property(readonly) BOOL isLeafItem;
 @property(readonly) NSImage *icon;
+@property(readonly) NSString *kind;
+@property(readonly) NSString *size;
+@property(readonly) NSString *modified;
+@property(readonly) NSString *modifiedBy;
+@property(readonly) NSString *version;
 
 - (void)invalidateChildren;
 
index 875fbb8..344a5c3 100644 (file)
@@ -38,7 +38,7 @@
 #import "PithosNode.h"
 
 @implementation PithosNode
-@dynamic url, children, displayName, icon;
+@dynamic url, children, displayName, icon, kind, size, modified, modifiedBy, version;
 @synthesize isLeafItem;
 
 #pragma mark -
similarity index 83%
rename from pithos-macos/PithosObject.h
rename to pithos-macos/PithosObjectNode.h
index 68a4b87..6bdb3e7 100644 (file)
 // or implied, of GRNET S.A.
 
 #import "PithosNode.h"
+#import "ASIPithosContainer.h"
+#import "ASIPithosObject.h"
 
-@interface PithosObject : PithosNode {
-    NSString *containerName;
-    NSString *objectName;
+@interface PithosObjectNode : PithosNode {
+    ASIPithosContainer *pithosContainer;
+    ASIPithosObject *pithosObject;
+    
+    NSImage *icon;
 }
 
-@property(readonly) NSString *containerName;
-@property(readonly) NSString *objectName;
-
-- (id)initWithContainerName:(NSString *)aContainerName objectName:(NSString *)anObjectName;
+- (id)initWithPithosContainer:(ASIPithosContainer *)aPithosContainer pithosObject:(ASIPithosObject *)aPithosObject;
 
 @end
similarity index 65%
rename from pithos-macos/PithosObject.m
rename to pithos-macos/PithosObjectNode.m
index de2d874..490881e 100644 (file)
 // interpreted as representing official policies, either expressed
 // or implied, of GRNET S.A.
 
-#import "PithosObject.h"
+#import "PithosObjectNode.h"
 #import "ASIPithosRequest.h"
 
-static NSImage *icon = nil;
-
-@implementation PithosObject
-@synthesize containerName, objectName;
-
-+ (void)initialize {
-       if (self == [PithosObject class])
-        icon = [[NSImage imageNamed:@"object"] retain];
-}
+@implementation PithosObjectNode
 
 #pragma mark -
 #pragma mark Object Lifecycle
 
-- (id)initWithContainerName:(NSString *)aContainerName objectName:(NSString *)anObjectName {
+- (id)initWithPithosContainer:(ASIPithosContainer *)aPithosContainer pithosObject:(ASIPithosObject *)aPithosObject {
     if ((self = [super init])) {
-        containerName = [aContainerName copy];
-        objectName = [anObjectName copy];
+        pithosContainer = [aPithosContainer retain];
+        pithosObject = [aPithosObject retain];
         isLeafItem = YES;
     }
     return self;
 }
 
 - (void)dealloc {
-    [objectName release];
-    [containerName release];
+    [icon release];
+    [pithosObject release];
+    [pithosContainer release];
     [super dealloc];
 }
 
@@ -71,7 +64,7 @@ static NSImage *icon = nil;
 
 - (NSString *)url {
     if (url == nil) 
-        url = [[NSString alloc] initWithFormat:@"object %@/%@/%@", [ASIPithosRequest storageURL], containerName, objectName];
+        url = [[NSString alloc] initWithFormat:@"object %@/%@/%@", [ASIPithosRequest storageURL], pithosContainer.name, pithosObject.name];
     return url;
 }
 
@@ -81,8 +74,8 @@ static NSImage *icon = nil;
 
 - (NSString *)displayName {
     if (displayName == nil) {
-        displayName = [objectName lastPathComponent];
-        if ([[objectName substringFromIndex:([objectName length] - 1)] isEqualToString:@"/"])
+        displayName = [pithosObject.name lastPathComponent];
+        if([pithosObject.name hasSuffix:@"/"])
             displayName = [displayName stringByAppendingString:@"/"];
         [displayName retain];
     }
@@ -90,7 +83,32 @@ static NSImage *icon = nil;
 }
 
 - (NSImage *)icon {
+    if (icon == nil) {
+        icon = [[[NSWorkspace sharedWorkspace] iconForFileType:[pithosObject.name pathExtension]] retain];
+    }
     return icon;
 }
 
+- (NSString *)kind {
+    return pithosObject.contentType;
+}
+
+- (NSString *)size {
+    return [NSString stringWithFormat:@"%lu B", pithosObject.bytes];
+}
+
+- (NSString *)modified {
+    return [NSDateFormatter localizedStringFromDate:pithosObject.lastModified 
+                                          dateStyle:NSDateFormatterShortStyle 
+                                          timeStyle:NSDateFormatterShortStyle];
+}
+
+- (NSString *)modifiedBy {
+    return pithosObject.modifiedBy;
+}
+
+- (NSString *)version {
+    return pithosObject.version;
+}
+
 @end
similarity index 86%
rename from pithos-macos/PithosSubdir.h
rename to pithos-macos/PithosSubdirNode.h
index 226c9d1..89f7ef9 100644 (file)
 // interpreted as representing official policies, either expressed
 // or implied, of GRNET S.A.
 
-#import "PithosContainer.h"
+#import "PithosContainerNode.h"
+#import "ASIPithosObject.h"
 
-@interface PithosSubdir : PithosContainer {
-    NSString *subdirName;
+@interface PithosSubdirNode : PithosContainerNode {
+    ASIPithosObject *pithosObject;
 }
 
-@property(readonly) NSString *subdirName;
-
-- (id)initWithContainerName:(NSString *)aContainerName subdirName:(NSString *)aSubdirName;
+- (id)initWithPithosContainer:(ASIPithosContainer *)aPithosContainer pithosObject:(ASIPithosObject *)aPithosObject;
 
 @end
similarity index 72%
rename from pithos-macos/PithosSubdir.m
rename to pithos-macos/PithosSubdirNode.m
index 01c78d9..78be1f2 100644 (file)
 // interpreted as representing official policies, either expressed
 // or implied, of GRNET S.A.
 
-#import "PithosSubdir.h"
+#import "PithosSubdirNode.h"
 #import "ASIPithosRequest.h"
 
 static NSImage *icon = nil;
 
-@implementation PithosSubdir
-@synthesize subdirName;
+@implementation PithosSubdirNode
 
 + (void)initialize {
-       if (self == [PithosSubdir class])
-        icon = [[NSImage imageNamed:@"subdir"] retain];
+       if (self == [PithosSubdirNode class])
+        // XXX this should point to something we know has the proper icon, maybe something in then app bundle
+        icon = [[[NSWorkspace sharedWorkspace] iconForFile:@"/private/"] retain];
 }
 
 #pragma mark -
 #pragma mark Object Lifecycle
 
-- (id)initWithContainerName:(NSString *)aContainerName subdirName:(NSString *)aSubdirName {
+- (id)initWithPithosContainer:(ASIPithosContainer *)aPithosContainer pithosObject:(ASIPithosObject *)aPithosObject {
     if ((self = [super init])) {
-        containerName = [aContainerName copy];
-        subdirName = [aSubdirName copy];
+        pithosContainer = [aPithosContainer retain];
+        pithosObject = [aPithosObject retain];
         refreshing = NO;
-        prefix = [[subdirName substringToIndex:([subdirName length] - 1)] retain];
+        prefix = [[pithosObject.name substringToIndex:([pithosObject.name length] - 1)] retain];
     }
     return self;
 }
+
 - (void)dealloc {
-    [subdirName release];
+    [pithosObject release];
     [super dealloc];
 }
 
@@ -70,12 +71,16 @@ static NSImage *icon = nil;
 
 - (NSString *)url {
     if (url == nil) 
-        url = [[NSString alloc] initWithFormat:@"subdir %@/%@/%@", [ASIPithosRequest storageURL], containerName, subdirName];
+        url = [[NSString alloc] initWithFormat:@"subdir %@/%@/%@", [ASIPithosRequest storageURL], pithosContainer.name, pithosObject.name];
     return url;
 }
 
 - (NSString *)displayName {
-    return [subdirName lastPathComponent];
+    return [pithosObject.name lastPathComponent];
+}
+
+- (NSImage *)icon {
+    return icon;
 }
-    
+
 @end
index a4fb023..4752f1e 100644 (file)
        <string>MainMenu</string>
        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
+       <key>CFBundleURLTypes</key>
+       <array>
+               <dict>
+                       <key>CFBundleURLName</key>
+                       <string>Pithos&apos; URL</string>
+                       <key>CFBundleURLSchemes</key>
+                       <array>
+                               <string>pithos</string>
+                       </array>
+               </dict>
+       </array>
 </dict>
 </plist>
index 7687a8a..7c23c4a 100644 (file)
@@ -45,4 +45,6 @@
 
 @property (assign) IBOutlet PithosBrowserController *pithosBrowserController;
 
+- (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+
 @end
index e9282a1..e734bc4 100644 (file)
 @synthesize pithosBrowserController;
 
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
+    [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self 
+                                                       andSelector:@selector(handleAppleEvent:withReplyEvent:) 
+                                                     forEventClass:kInternetEventClass 
+                                                        andEventID:kAEGetURL];
     [pithosBrowserController showWindow:self];
 }
 
+- (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent {
+    NSURL *url = [NSURL URLWithString:[[event paramDescriptorForKeyword:keyDirectObject] stringValue]];
+    NSString *host = [url host];
+       NSString *query = [url query];
+    NSLog(@"host : '%@', query: '%@'", host, query);
+    NSProcessInfo *processInfo = [NSProcessInfo processInfo];
+    if ([host isEqualToString:[NSString stringWithFormat:@"%@_%d", [processInfo processName], [processInfo processIdentifier]]] && query) {
+        // user=
+        NSString *authUser;
+        NSRange userRange = [query rangeOfString:@"user=" options:NSCaseInsensitiveSearch];
+        if (userRange.length == 0)
+            // XXX maybe show an error message?
+            return;
+        NSUInteger authUserStartLocation = userRange.location + userRange.length;
+        NSRange userEndRange = [query rangeOfString:@"&" options:NSCaseInsensitiveSearch 
+                                              range:NSMakeRange(authUserStartLocation, [query length] - authUserStartLocation)];
+        if (userEndRange.length) {
+            authUser = [query substringWithRange:NSMakeRange(authUserStartLocation, userEndRange.location - authUserStartLocation)];
+        } else {
+            authUser = [query substringFromIndex:authUserStartLocation];
+        }
+        // token=
+        NSString *authToken;
+        NSRange tokenRange = [query rangeOfString:@"token=" options:NSCaseInsensitiveSearch];
+        if (tokenRange.length == 0)
+            // XXX maybe show an error message?
+            return;
+        NSUInteger authTokenStartLocation = tokenRange.location + tokenRange.length;
+        NSRange tokenEndRange = [query rangeOfString:@"&" options:NSCaseInsensitiveSearch 
+                                              range:NSMakeRange(authTokenStartLocation, [query length] - authTokenStartLocation)];
+        if (tokenEndRange.length) {
+            authToken = [query substringWithRange:NSMakeRange(authTokenStartLocation, tokenEndRange.location - authTokenStartLocation)];
+        } else {
+            authToken = [query substringFromIndex:authTokenStartLocation];
+        }
+        NSLog(@"query authUser: '%@', authToken: '%@'", authUser, authToken);
+        [pithosBrowserController authenticateFromURLWithAuthUser:authUser authToken:authToken];
+    }
+    // XXX else maybe show an error message?
+}
+
 @end