Skip to content

Commit

Permalink
about code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stevedekorte committed Jul 30, 2014
1 parent 76e9da1 commit fc9d4b1
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 95 deletions.
6 changes: 6 additions & 0 deletions Bitmessage.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
AA9413C518C952F80092FEF4 /* BMMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = AA9413C018C952F80092FEF4 /* BMMessageView.m */; };
AA9413C618C952F80092FEF4 /* BMNewUserView.m in Sources */ = {isa = PBXBuildFile; fileRef = AA9413C318C952F80092FEF4 /* BMNewUserView.m */; };
AA94775B18E268D3004EFC7A /* forward_active.png in Resources */ = {isa = PBXBuildFile; fileRef = AA94775A18E268D3004EFC7A /* forward_active.png */; };
AA9C72DA198877240036E3FF /* BMAboutNode.m in Sources */ = {isa = PBXBuildFile; fileRef = AA9C72D9198877240036E3FF /* BMAboutNode.m */; };
AA9EFBFE18F4960000DC32F4 /* BMAddressed+NodeView.m in Sources */ = {isa = PBXBuildFile; fileRef = AA9EFBFD18F4960000DC32F4 /* BMAddressed+NodeView.m */; };
AA9EFC5418F4A56F00DC32F4 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AA9EFC5318F4A56F00DC32F4 /* libz.dylib */; };
AA9F2B5C190DFF92008444F6 /* NavNodeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA5DFDF6190DEFF600383283 /* NavNodeKit.framework */; };
Expand Down Expand Up @@ -236,6 +237,8 @@
AA9413C218C952F80092FEF4 /* BMNewUserView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BMNewUserView.h; sourceTree = "<group>"; };
AA9413C318C952F80092FEF4 /* BMNewUserView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BMNewUserView.m; sourceTree = "<group>"; };
AA94775A18E268D3004EFC7A /* forward_active.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = forward_active.png; sourceTree = "<group>"; };
AA9C72D8198877240036E3FF /* BMAboutNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BMAboutNode.h; sourceTree = "<group>"; };
AA9C72D9198877240036E3FF /* BMAboutNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BMAboutNode.m; sourceTree = "<group>"; };
AA9EFBFC18F4960000DC32F4 /* BMAddressed+NodeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "BMAddressed+NodeView.h"; sourceTree = "<group>"; };
AA9EFBFD18F4960000DC32F4 /* BMAddressed+NodeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "BMAddressed+NodeView.m"; sourceTree = "<group>"; };
AA9EFC5318F4A56F00DC32F4 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -583,6 +586,8 @@
AAD2849118C01EE500FC0C6F /* BMAppController.h */,
AAD2849218C01EE500FC0C6F /* BMAppController.m */,
AAD2849318C01EE500FC0C6F /* Draft */,
AA9C72D8198877240036E3FF /* BMAboutNode.h */,
AA9C72D9198877240036E3FF /* BMAboutNode.m */,
);
path = Controllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -845,6 +850,7 @@
AA9413C418C952F80092FEF4 /* BMMessage+NodeView.m in Sources */,
AAD284A818C01EE500FC0C6F /* BMDraftController.m in Sources */,
AAD284A718C01EE500FC0C6F /* BMAddressTextField.m in Sources */,
AA9C72DA198877240036E3FF /* BMAboutNode.m in Sources */,
AA2AC86818B8175A008CEEB4 /* BMChannelView.m in Sources */,
AAA2E6D319009CDC0098C357 /* BMClient+NodeView.m in Sources */,
);
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,21 @@
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../NavKit/NavKit/Classes/Nav/Browser/NavColumn.m"
timestampString = "428369986.403993"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "345"
endingLineNumber = "345"
landmarkName = "-fitWidthToRemainingSpace"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
13 changes: 13 additions & 0 deletions Bitmessage/Classes/Browser/Controllers/BMAboutNode.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// BMAboutNode.h
// Bitmessage
//
// Created by Steve Dekorte on 7/29/14.
// Copyright (c) 2014 voluntary.net. All rights reserved.
//

#import <NavNodeKit/NavNodeKit.h>

@interface BMAboutNode : NavInfoNode

@end
124 changes: 124 additions & 0 deletions Bitmessage/Classes/Browser/Controllers/BMAboutNode.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
//
// BMAboutNode.m
// Bitmessage
//
// Created by Steve Dekorte on 7/29/14.
// Copyright (c) 2014 voluntary.net. All rights reserved.
//

#import "BMAboutNode.h"

@implementation BMAboutNode

- (id)init
{
self = [super init];

if (self)
{
[self setup];
}

return self;
}

- (void)setup
{
NavInfoNode *about = self;
about.shouldSortChildren = NO;
about.nodeTitle = @"About";
about.nodeSuggestedWidth = 150;


NavInfoNode *version = [[NavInfoNode alloc] init];
[about addChild:version];
version.nodeTitle = @"Version";
version.nodeSubtitle = @"0.8.1 beta";
version.nodeSuggestedWidth = 200;

NavInfoNode *contributors = [[NavInfoNode alloc] init];
[about addChild:contributors];
contributors.nodeTitle = @"Credits";
contributors.nodeSuggestedWidth = 200;


{
NavInfoNode *contributor = [[NavInfoNode alloc] init];
contributor.nodeTitle = @"Chris Robinson";
contributor.nodeSubtitle = @"Designer";
[contributors addChild:contributor];
}

{
NavInfoNode *contributor = [[NavInfoNode alloc] init];
contributor.nodeTitle = @"Steve Dekorte";
contributor.nodeSubtitle = @"Lead / UI Dev";
[contributors addChild:contributor];
}

{
NavInfoNode *contributor = [[NavInfoNode alloc] init];
contributor.nodeTitle = @"Adam Thorsen";
contributor.nodeSubtitle = @"Generalist";
[contributors addChild:contributor];
}

{
NavInfoNode *contributor = [[NavInfoNode alloc] init];
contributor.nodeTitle = @"Dru Nelson";
contributor.nodeSubtitle = @"Unix Guru";
[contributors addChild:contributor];
}


NavInfoNode *others = [[NavInfoNode alloc] init];
[contributors addChild:others];
others.nodeTitle = @"3rd Party";
others.nodeSuggestedWidth = 200;
others.shouldSortChildren = NO;


{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"Bitmessage";
package.nodeSubtitle = @"bitmessage.org";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"Open Sans";
package.nodeSubtitle = @"Steve Matteson, Google fonts";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"Python";
package.nodeSubtitle = @"python.org";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"Tor";
package.nodeSubtitle = @"torproject.org";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"XmlPRC";
package.nodeSubtitle = @"Eric Czarny";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"ZipKit";
package.nodeSubtitle = @"Karl Moskowski";
[others addChild:package];
}
}

@end
100 changes: 5 additions & 95 deletions Bitmessage/Classes/Browser/Controllers/BMAppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#import "BMDraftController.h"
#import "BMNewUserView.h"
#import "BMClient+NodeView.h"
#import "BMAboutNode.h"

@implementation BMAppController

Expand All @@ -24,102 +25,8 @@ - (void)applicationDidFinishLaunching: (NSNotification *)aNote

- (void)addAbout
{
NavInfoNode *about = [[NavInfoNode alloc] init];
about.shouldSortChildren = NO;
BMAboutNode *about = [[BMAboutNode alloc] init];
[(BMNode *)self.rootNode addChild:about];
about.nodeTitle = @"About";
about.nodeSuggestedWidth = 150;


NavInfoNode *version = [[NavInfoNode alloc] init];
[about addChild:version];
version.nodeTitle = @"Version";
version.nodeSubtitle = @"0.8.1 beta";
version.nodeSuggestedWidth = 200;

NavInfoNode *contributors = [[NavInfoNode alloc] init];
[about addChild:contributors];
contributors.nodeTitle = @"Credits";
contributors.nodeSuggestedWidth = 200;


{
NavInfoNode *contributor = [[NavInfoNode alloc] init];
contributor.nodeTitle = @"Chris Robinson";
contributor.nodeSubtitle = @"Designer";
[contributors addChild:contributor];
}

{
NavInfoNode *contributor = [[NavInfoNode alloc] init];
contributor.nodeTitle = @"Steve Dekorte";
contributor.nodeSubtitle = @"Lead / UI Dev";
[contributors addChild:contributor];
}

{
NavInfoNode *contributor = [[NavInfoNode alloc] init];
contributor.nodeTitle = @"Adam Thorsen";
contributor.nodeSubtitle = @"Generalist";
[contributors addChild:contributor];
}

{
NavInfoNode *contributor = [[NavInfoNode alloc] init];
contributor.nodeTitle = @"Dru Nelson";
contributor.nodeSubtitle = @"Unix Guru";
[contributors addChild:contributor];
}


NavInfoNode *others = [[NavInfoNode alloc] init];
[contributors addChild:others];
others.nodeTitle = @"3rd Party";
others.nodeSuggestedWidth = 200;
others.shouldSortChildren = NO;


{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"Bitmessage";
package.nodeSubtitle = @"bitmessage.org";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"Open Sans";
package.nodeSubtitle = @"Steve Matteson, Google fonts";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"Python";
package.nodeSubtitle = @"python.org";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"Tor";
package.nodeSubtitle = @"torproject.org";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"XmlPRC";
package.nodeSubtitle = @"Eric Czarny";
[others addChild:package];
}

{
NavInfoNode *package = [[NavInfoNode alloc] init];
package.nodeTitle = @"ZipKit";
package.nodeSubtitle = @"Karl Moskowski";
[others addChild:package];
}
}

- (void)checkForNewUser
Expand All @@ -129,6 +36,9 @@ - (void)checkForNewUser
{
[self openNewUserView];
}

[BMClient.sharedBMClient.channels channelWithPassphraseJoinIfNeeded:@"Bitpost"];

}

- (void)openNewUserView
Expand Down

0 comments on commit fc9d4b1

Please sign in to comment.