Skip to content

Commit

Permalink
Fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
deivuh committed May 2, 2014
2 parents 0cf2d4b + cbb0ff3 commit f963c1c
Show file tree
Hide file tree
Showing 9 changed files with 471 additions and 3 deletions.
16 changes: 16 additions & 0 deletions DODropletManager.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
4DC5DB3D190D03C30080C9CD /* PreferencesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DC5DB3C190D03C30080C9CD /* PreferencesWindowController.m */; };
65E32DB0190F7A4900476F2B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65E32DAF190F7A4900476F2B /* Security.framework */; };
65E32DB3190F7B2E00476F2B /* KeychainAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 65E32DB2190F7B2E00476F2B /* KeychainAccess.m */; };
DB835654190EE99900B62EA0 /* DropletFormWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = DB835653190EE99900B62EA0 /* DropletFormWindowController.m */; };
DB835656190EE9C400B62EA0 /* DropletFormWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = DB835655190EE9C400B62EA0 /* DropletFormWindow.xib */; };
DB835659190F4B9E00B62EA0 /* NSString+URLEncode.m in Sources */ = {isa = PBXBuildFile; fileRef = DB835658190F4B9E00B62EA0 /* NSString+URLEncode.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -84,6 +87,11 @@
65E32DAF190F7A4900476F2B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
65E32DB1190F7B2E00476F2B /* KeychainAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeychainAccess.h; sourceTree = "<group>"; };
65E32DB2190F7B2E00476F2B /* KeychainAccess.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeychainAccess.m; sourceTree = "<group>"; };
DB835652190EE99900B62EA0 /* DropletFormWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DropletFormWindowController.h; sourceTree = "<group>"; };
DB835653190EE99900B62EA0 /* DropletFormWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DropletFormWindowController.m; sourceTree = "<group>"; };
DB835655190EE9C400B62EA0 /* DropletFormWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DropletFormWindow.xib; sourceTree = "<group>"; };
DB835657190F4B9E00B62EA0 /* NSString+URLEncode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+URLEncode.h"; sourceTree = "<group>"; };
DB835658190F4B9E00B62EA0 /* NSString+URLEncode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+URLEncode.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -177,6 +185,11 @@
4DC5DB14190CEA0A0080C9CD /* MainMenu.xib */,
4DC5DB17190CEA0A0080C9CD /* Images.xcassets */,
4DC5DB06190CEA0A0080C9CD /* Supporting Files */,
DB835652190EE99900B62EA0 /* DropletFormWindowController.h */,
DB835653190EE99900B62EA0 /* DropletFormWindowController.m */,
DB835655190EE9C400B62EA0 /* DropletFormWindow.xib */,
DB835657190F4B9E00B62EA0 /* NSString+URLEncode.h */,
DB835658190F4B9E00B62EA0 /* NSString+URLEncode.m */,
);
path = DODropletManager;
sourceTree = "<group>";
Expand Down Expand Up @@ -291,6 +304,7 @@
4D13EE2C1911CCC400DCAED1 /* README.md in Resources */,
4DC5DB0A190CEA0A0080C9CD /* InfoPlist.strings in Resources */,
4DC5DB18190CEA0A0080C9CD /* Images.xcassets in Resources */,
DB835656190EE9C400B62EA0 /* DropletFormWindow.xib in Resources */,
4DC5DB3A190D030C0080C9CD /* PreferencesWindow.xib in Resources */,
4DC5DB10190CEA0A0080C9CD /* Credits.rtf in Resources */,
4DC5DB16190CEA0A0080C9CD /* MainMenu.xib in Resources */,
Expand All @@ -313,7 +327,9 @@
buildActionMask = 2147483647;
files = (
4DC5DB13190CEA0A0080C9CD /* AppDelegate.m in Sources */,
DB835659190F4B9E00B62EA0 /* NSString+URLEncode.m in Sources */,
4DC5DB0C190CEA0A0080C9CD /* main.m in Sources */,
DB835654190EE99900B62EA0 /* DropletFormWindowController.m in Sources */,
4DC5DB3D190D03C30080C9CD /* PreferencesWindowController.m in Sources */,
4D13EE2B1911CCC400DCAED1 /* LaunchAtLoginController.m in Sources */,
65E32DB3190F7B2E00476F2B /* KeychainAccess.m in Sources */,
Expand Down
3 changes: 3 additions & 0 deletions DODropletManager/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
#import "PreferencesWindowController.h"
#import <Cocoa/Cocoa.h>

@class DropletFormWindowController;

@interface AppDelegate : NSObject <NSApplicationDelegate, NSURLConnectionDataDelegate, NSURLConnectionDelegate> {
}

@property (assign) IBOutlet NSWindow *window;
@property (strong, nonatomic) NSStatusItem *statusItem;
@property (strong) PreferencesWindowController *preferencesWC;
@property (strong, nonatomic) DropletFormWindowController *dropletFormWindowController;

@end
12 changes: 11 additions & 1 deletion DODropletManager/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#import "AppDelegate.h"
#import "Droplet.h"
#import "KeychainAccess.h"
#import "DropletFormWindowController.h"


@implementation AppDelegate {
NSMutableData *responseData;
Expand Down Expand Up @@ -335,6 +337,8 @@ - (void) createMenuItems {

}

[menu insertItemWithTitle:@"Create New Droplet" action:@selector(showDropletFormUI) keyEquivalent:@"" atIndex:dropletMIIndex];

if(addItems) {
[menu addItem:[NSMenuItem separatorItem]];

Expand All @@ -344,7 +348,6 @@ - (void) createMenuItems {
[menu addItemWithTitle: NSLocalizedString(@"Preferences", @"Preferences") action:@selector(showPreferencesWindow:) keyEquivalent:@""];

[menu addItem:[NSMenuItem separatorItem]];


[menu addItemWithTitle: NSLocalizedString(@"Quit Droplets Manager", @"Quit Droplets Manager") action:@selector(terminate:) keyEquivalent:@""];
_statusItem.menu = menu;
Expand All @@ -361,6 +364,13 @@ - (void)copyIPAddress:(id)sender {
[[NSPasteboard generalPasteboard] setString:ipAddress forType:NSStringPboardType];
}

- (void)showDropletFormUI
{
_dropletFormWindowController = [[DropletFormWindowController alloc] initWithWindowNibName:@"DropletFormWindow"];
[_dropletFormWindowController showWindow:self];

[NSApp activateIgnoringOtherApps:YES];
}

- (void)showPreferencesWindow:(id)sender {

Expand Down
132 changes: 132 additions & 0 deletions DODropletManager/DropletFormWindow.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13C1021" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment defaultVersion="1070" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="DropletFormWindowController">
<connections>
<outlet property="availableImagesPopup" destination="HOD-3f-UnV" id="3eM-Uc-OaK"/>
<outlet property="availableRegionsPopup" destination="hRU-K1-H45" id="YMr-bi-6eR"/>
<outlet property="availableSizePopup" destination="JW5-1S-KNR" id="fJQ-iv-LbD"/>
<outlet property="dropletNameField" destination="uQP-4q-iYW" id="Ul6-Jl-cRL"/>
<outlet property="window" destination="QvC-M9-y7g" id="aZo-QT-QuT"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<window title="Create New Droplet" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="481" height="254"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
<view key="contentView" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="481" height="254"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uQP-4q-iYW">
<rect key="frame" x="158" y="203" width="294" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="Evf-Nj-han">
<font key="font" metaFont="system" size="16"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="s84-ND-Tfd">
<rect key="frame" x="20" y="206" width="112" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Droplet Name" id="3aX-AL-bLZ">
<font key="font" metaFont="system" size="16"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HOD-3f-UnV">
<rect key="frame" x="156" y="160" width="299" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="Rd3-qR-dss">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" title="OtherViews" id="3Ia-dG-sDc"/>
</popUpButtonCell>
<connections>
<action selector="didSelectImage:" target="-2" id="xzf-em-bxh"/>
</connections>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0I8-GF-FcC">
<rect key="frame" x="20" y="164" width="52" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Image" id="I0q-0V-87u">
<font key="font" metaFont="system" size="16"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rJn-La-dEC">
<rect key="frame" x="358" y="21" width="100" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="b4Y-zh-Md5">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
</buttonCell>
<connections>
<action selector="cancelDroplet:" target="-2" id="uFm-ly-MX0"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Qvi-LW-wpR">
<rect key="frame" x="18" y="122" width="58" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Region" id="rdC-xT-eyz">
<font key="font" metaFont="system" size="16"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hRU-K1-H45">
<rect key="frame" x="156" y="119" width="299" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="hA7-bR-sXv">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" title="OtherViews" id="qk1-GQ-h0A"/>
</popUpButtonCell>
</popUpButton>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="h3U-ux-qE8">
<rect key="frame" x="256" y="21" width="100" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Create" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="VRe-9s-MJH">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="createDroplet:" target="-2" id="9jC-9g-pyO"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5Et-pb-ROF">
<rect key="frame" x="18" y="81" width="58" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Size" id="bxy-zx-caH">
<font key="font" metaFont="system" size="16"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JW5-1S-KNR">
<rect key="frame" x="156" y="78" width="299" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="fcK-Sm-kjC">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" title="OtherViews" id="3jW-FP-ORy"/>
</popUpButtonCell>
</popUpButton>
</subviews>
</view>
</window>
</objects>
</document>
22 changes: 22 additions & 0 deletions DODropletManager/DropletFormWindowController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// DropletFormWindowController.h
// DODropletManager
//
// Created by Adam Tootle on 4/28/14.
// Copyright (c) 2014 David Hsieh. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface DropletFormWindowController : NSWindowController <NSURLConnectionDataDelegate, NSURLConnectionDelegate>

@property(nonatomic, strong) IBOutlet NSTextField *dropletNameField;
@property(nonatomic, strong) IBOutlet NSPopUpButton *availableImagesPopup;
@property(nonatomic, strong) IBOutlet NSPopUpButton *availableRegionsPopup;
@property(nonatomic, strong) IBOutlet NSPopUpButton *availableSizePopup;

- (IBAction)didSelectImage:(id)sender;
- (IBAction)createDroplet:(id)sender;
- (IBAction)cancelDroplet:(id)sender;

@end
Loading

0 comments on commit f963c1c

Please sign in to comment.