Permalink
Browse files

initial commit

  • Loading branch information...
1 parent 2a97836 commit b1864ada7e433e94f063eb7572afbf7cfa8c33d8 @rudism committed Apr 4, 2014
Showing 374 changed files with 96,738 additions and 0 deletions.
View
@@ -0,0 +1,17 @@
+.DS_Store
+.Trashes
+*.swp
+*.lock
+*.~nib
+DerivedData/
+build/
+*.pbxuser
+*.mode1v3
+*.mode2v3
+*.perspectivev3
+!default.pbxuser
+!default.mode1v3
+!default.mode2v3
+!default.prespectivev3
+xcuserdata
+*.moved-aside
@@ -0,0 +1,22 @@
+//
+// AboutViewController.h
+// PassDrop
+//
+// Created by Rudis Muiznieks on 2/4/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface AboutViewController : UIViewController {
+ IBOutlet UIButton *twitter;
+ IBOutlet UIButton *homepage;
+}
+
+@property (nonatomic, retain) UIButton *twitter;
+@property (nonatomic, retain) UIButton *homepage;
+
+-(IBAction)handleEvent:(id)sender;
+
+@end
@@ -0,0 +1,74 @@
+//
+// AboutViewController.m
+// PassDrop
+//
+// Created by Rudis Muiznieks on 2/4/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "AboutViewController.h"
+
+
+@implementation AboutViewController
+
+@synthesize twitter;
+@synthesize homepage;
+
+// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
+/*
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ // Custom initialization.
+ }
+ return self;
+}
+*/
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+ if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
+ self.edgesForExtendedLayout = UIRectEdgeNone;
+}
+
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return YES;
+}
+
+-(NSUInteger)supportedInterfaceOrientations{
+ return UIInterfaceOrientationMaskAll;
+}
+
+-(BOOL)shouldAutorotate{
+ return YES;
+}
+
+- (IBAction)handleEvent:(id)sender {
+ if(sender == twitter){
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://mobile.twitter.com/Rudism"]];
+ } else if(sender == homepage){
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://passdrop.rudism.com/"]];
+ }
+}
+
+- (void)didReceiveMemoryWarning {
+ // Releases the view if it doesn't have a superview.
+ [super didReceiveMemoryWarning];
+
+ // Release any cached data, images, etc. that aren't in use.
+}
+
+- (void)viewDidUnload {
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+ // e.g. self.myOutlet = nil;
+}
+
+
+- (void)dealloc {
+ [super dealloc];
+}
+
+
+@end
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5053" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
+ <dependencies>
+ <deployment defaultVersion="1280" identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
+ </dependencies>
+ <objects>
+ <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AboutViewController">
+ <connections>
+ <outlet property="homepage" destination="10" id="12"/>
+ <outlet property="view" destination="1" id="3"/>
+ </connections>
+ </placeholder>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+ <view contentMode="scaleToFill" id="1">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="About PassDrop" lineBreakMode="tailTruncation" minimumFontSize="10" adjustsFontSizeToFit="NO" id="4">
+ <rect key="frame" x="20" y="20" width="162" height="23"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" lineBreakMode="tailTruncation" numberOfLines="0" minimumFontSize="10" id="5">
+ <rect key="frame" x="20" y="51" width="280" height="147"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <string key="text">Version 1.23
+
+PassDrop allows you to access KeePass 1.x databases stored on your DropBox account.
+
+For news and updates:</string>
+ <fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="10">
+ <rect key="frame" x="20" y="214" width="203" height="37"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" name="Helvetica-Bold" family="Helvetica" pointSize="15"/>
+ <state key="normal" title="http://passdrop.rudism.com/">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="handleEvent:" destination="-1" eventType="touchUpInside" id="15"/>
+ </connections>
+ </button>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
+ <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
+ </view>
+ </objects>
+</document>
View
@@ -0,0 +1,82 @@
+//
+// AppPrefs.h
+// PassDrop
+//
+// Created by Rudis Muiznieks on 2/4/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#define kOpenLastDatabase @"openLastDatabase"
+#define kFirstLoad @"firstLoad"
+#define kLockInBackgroundSeconds @"lockInBackgroundSeconds"
+#define kDatabaseOpenMode @"openDatabaseMode"
+#define kLastVersion @"lastVersion"
+#define kIgnoreBackup @"ignoreBackup"
+
+#define kOpenModeWritable 0
+#define kOpenModeReadOnly 1
+#define kOpenModeAlwaysAsk 2
+
+#define kPwUpper @"pwUpper"
+#define kPwLower @"pwLower"
+#define kPwNumbers @"pwNumbers"
+#define kPwSpaces @"pwSpaces"
+#define kPwMinus @"pwMinus"
+#define kPwUnderline @"pwUnderscore"
+#define kPwSpecials @"pwSpecials"
+#define kPwExcludes @"pwExcludes"
+#define kPwDiversity @"pwDiversity"
+#define kPwReveal @"pwReveal"
+#define kPwLength @"pwLength"
+#define kPwBrackets @"pwBrackets"
+#define kPwPunctuation @"pwPunctuation"
+
+@interface AppPrefs : NSObject {
+ BOOL firstLoad;
+ BOOL autoClearClipboard;
+ int lockInBackgroundSeconds;
+ int databaseOpenMode;
+ double lastVersion;
+
+ BOOL pwUpper;
+ BOOL pwLower;
+ BOOL pwNumbers;
+ BOOL pwSpaces;
+ BOOL pwMinus;
+ BOOL pwUnderline;
+ BOOL pwSpecials;
+ BOOL pwExcludes;
+ BOOL pwDiversity;
+ BOOL pwReveal;
+ int pwLength;
+ BOOL pwBrackets;
+ BOOL pwPunctuation;
+ BOOL ignoreBackup;
+}
+
+@property (nonatomic) BOOL firstLoad;
+@property (nonatomic) BOOL autoClearClipboard;
+@property (nonatomic) int lockInBackgroundSeconds;
+@property (nonatomic) int databaseOpenMode;
+@property (nonatomic) BOOL pwUpper;
+@property (nonatomic) BOOL pwLower;
+@property (nonatomic) BOOL pwNumbers;
+@property (nonatomic) BOOL pwSpaces;
+@property (nonatomic) BOOL pwMinus;
+@property (nonatomic) BOOL pwUnderline;
+@property (nonatomic) BOOL pwSpecials;
+@property (nonatomic) BOOL pwExcludes;
+@property (nonatomic) BOOL pwDiversity;
+@property (nonatomic) BOOL pwReveal;
+@property (nonatomic) BOOL ignoreBackup;
+@property (nonatomic) int pwLength;
+@property (nonatomic) BOOL pwBrackets;
+@property (nonatomic) BOOL pwPunctuation;
+@property (nonatomic) double lastVersion;
+
+- (void) loadPrefs;
+- (void) savePrefs;
+
+@end
View
@@ -0,0 +1,104 @@
+//
+// AppPrefs.m
+// PassDrop
+//
+// Created by Rudis Muiznieks on 2/4/11.
+// Copyright 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "AppPrefs.h"
+
+
+@implementation AppPrefs
+
+@synthesize autoClearClipboard;
+@synthesize lockInBackgroundSeconds;
+@synthesize firstLoad;
+@synthesize databaseOpenMode;
+@synthesize pwUpper;
+@synthesize pwLower;
+@synthesize pwNumbers;
+@synthesize pwSpaces;
+@synthesize pwMinus;
+@synthesize pwUnderline;
+@synthesize pwSpecials;
+@synthesize pwExcludes;
+@synthesize pwDiversity;
+@synthesize pwReveal;
+@synthesize pwLength;
+@synthesize pwBrackets;
+@synthesize pwPunctuation;
+@synthesize lastVersion;
+@synthesize ignoreBackup;
+
+- (void) loadPrefs {
+ NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
+
+ // set up defaults
+ NSNumber *defLockSeconds = [NSNumber numberWithInt:30];
+ NSNumber *defDatabaseOpenMode = [NSNumber numberWithInt:kOpenModeReadOnly];
+ NSNumber *defOpenLast = [NSNumber numberWithBool:YES];
+ NSNumber *defFirstLoad = [NSNumber numberWithBool:YES];
+ NSNumber *defIgnoreBackup = [NSNumber numberWithBool:YES];
+
+ NSNumber *defSwitchOn = [NSNumber numberWithBool:YES];
+ NSNumber *defSwitchOff = [NSNumber numberWithBool:NO];
+ NSNumber *defPwLength = [NSNumber numberWithInt:12];
+
+ NSNumber *defVersion = [NSNumber numberWithDouble:1.01];
+
+ NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:defOpenLast, kOpenLastDatabase, defLockSeconds, kLockInBackgroundSeconds, defFirstLoad, kFirstLoad, defDatabaseOpenMode, kDatabaseOpenMode, defSwitchOn, kPwUpper, defSwitchOn, kPwLower, defSwitchOn, kPwNumbers, defSwitchOff, kPwSpaces, defSwitchOn, kPwMinus, defSwitchOn, kPwUnderline, defSwitchOn, kPwSpecials, defSwitchOff, kPwExcludes, defSwitchOff, kPwDiversity, defSwitchOff, kPwReveal, defPwLength, kPwLength, defSwitchOff, kPwBrackets, defSwitchOff, kPwPunctuation, defVersion, kLastVersion, defIgnoreBackup, kIgnoreBackup, nil];
+ [prefs registerDefaults:defaults];
+
+ firstLoad = [prefs boolForKey:kFirstLoad];
+ autoClearClipboard = [prefs boolForKey:kOpenLastDatabase];
+ lockInBackgroundSeconds = [prefs integerForKey:kLockInBackgroundSeconds];
+ databaseOpenMode = [prefs integerForKey:kDatabaseOpenMode];
+ lastVersion = [prefs doubleForKey:kLastVersion];
+ ignoreBackup = [prefs boolForKey:kIgnoreBackup];
+
+ pwUpper = [prefs boolForKey:kPwUpper];
+ pwLower = [prefs boolForKey:kPwLower];
+ pwNumbers = [prefs boolForKey:kPwNumbers];
+ pwSpaces = [prefs boolForKey:kPwSpaces];
+ pwMinus = [prefs boolForKey:kPwMinus];
+ pwUnderline = [prefs boolForKey:kPwUnderline];
+ pwSpecials = [prefs boolForKey:kPwSpecials];
+ pwExcludes = [prefs boolForKey:kPwExcludes];
+ pwDiversity = [prefs boolForKey:kPwDiversity];
+ pwReveal = [prefs boolForKey:kPwReveal];
+ pwLength = [prefs integerForKey:kPwLength];
+ pwBrackets = [prefs boolForKey:kPwBrackets];
+ pwPunctuation = [prefs boolForKey:kPwPunctuation];
+
+ [defaults release];
+}
+
+- (void) savePrefs {
+ NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
+ [prefs setBool:firstLoad forKey:kFirstLoad];
+ [prefs setBool:autoClearClipboard forKey:kOpenLastDatabase];
+ [prefs setInteger:lockInBackgroundSeconds forKey:kLockInBackgroundSeconds];
+ [prefs setInteger:databaseOpenMode forKey:kDatabaseOpenMode];
+ [prefs setBool:ignoreBackup forKey:kIgnoreBackup];
+ [prefs setDouble:1.2 forKey:kLastVersion];
+ self.lastVersion = 1.2;
+
+ [prefs setBool:pwUpper forKey:kPwUpper];
+ [prefs setBool:pwLower forKey:kPwLower];
+ [prefs setBool:pwNumbers forKey:kPwNumbers];
+ [prefs setBool:pwSpaces forKey:kPwSpaces];
+ [prefs setBool:pwMinus forKey:kPwMinus];
+ [prefs setBool:pwUnderline forKey:kPwUnderline];
+ [prefs setBool:pwSpecials forKey:kPwSpecials];
+ [prefs setBool:pwExcludes forKey:kPwExcludes];
+ [prefs setBool:pwDiversity forKey:kPwDiversity];
+ [prefs setBool:pwReveal forKey:kPwReveal];
+ [prefs setInteger:pwLength forKey:kPwLength];
+ [prefs setBool:pwBrackets forKey:kPwBrackets];
+ [prefs setBool:pwPunctuation forKey:kPwPunctuation];
+
+ [prefs synchronize];
+}
+
+@end
Oops, something went wrong.

0 comments on commit b1864ad

Please sign in to comment.