Permalink
Browse files

Added "Show Deleted" checkbox

This requires support for ?include_deleted that I just added to CouchCocoa and TouchDB.
  • Loading branch information...
1 parent 8d79927 commit 8cac2dd58f83635fd6ba005b584116b474fe649b @snej snej committed Sep 4, 2012
View
@@ -3,6 +3,8 @@
*.perspectivev3
*.mode1v3
*.framework
+*.app
+*.zip
xcuserdata/
build/
DerivedData/
@@ -19,4 +19,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
//gRESTLogLevel = kRESTLogRequestHeaders;
}
+- (BOOL) applicationShouldOpenUntitledFile:(NSApplication *)sender {
+ return NO;
+}
+
@end
@@ -18,6 +18,9 @@
- (IBAction) newDocument: (id)sender;
- (IBAction) deleteDocument: (id)sender;
+/** Either the QueryResultController or the RevTreeController */
+@property (readonly) id outlineController;
+
- (BOOL) hasColumnForProperty: (NSString*)property;
- (void) addColumnForProperty: (NSString*)property;
- (void) removeColumnForProperty: (NSString*)property;
@@ -40,6 +40,7 @@ @implementation DBWindowController
- (id)initWithDatabase: (CouchDatabase*)db
{
+ NSParameterAssert(db != nil);
self = [super initWithWindowNibName: @"DBWindowController"];
if (self) {
_db = db;
@@ -179,6 +180,11 @@ - (void) showDocColumns {
#pragma mark - ACTIONS:
+- (id) outlineController {
+ return _docsOutline.dataSource;
+}
+
+
- (IBAction) showDocRevisionTree:(id)sender {
if (_revTreeController.outline)
return;
@@ -188,9 +194,11 @@ - (IBAction) showDocRevisionTree:(id)sender {
CouchDocument* doc = docs[0];
[self hideDocColumns];
+ [self willChangeValueForKey: @"outlineController"];
_revTreeController.document = doc;
_queryController.outline = nil;
_revTreeController.outline = _docsOutline;
+ [self didChangeValueForKey: @"outlineController"];
[self setPathURL: doc.URL];
}
@@ -200,10 +208,12 @@ - (IBAction) hideDocRevisionTree: (id)sender {
return;
[self showDocColumns];
CouchDocument* doc = _revTreeController.document;
+ [self willChangeValueForKey: @"outlineController"];
_revTreeController.document = nil;
_revTreeController.outline = nil;
_queryController.outline = _docsOutline;
[_queryController selectDocument: doc];
+ [self didChangeValueForKey: @"outlineController"];
[self setPathURL: _db.URL];
}
Oops, something went wrong.

0 comments on commit 8cac2dd

Please sign in to comment.