Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Classes/PutIOFolderPicker.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@class PutIOFolderPicker;
@protocol PutIOFolderPickerDelegate <NSObject>
-(void)folderPicker:(PutIOFolderPicker*)picker didPickFolder:(PutIOAPIFile*)folder;
-(void)folderPicker:(PutIOFolderPicker *)picker didPickFolderID:(int)folderID;
-(void)folderPickerDidCancel:(PutIOFolderPicker*)picker;
@end

Expand Down
7 changes: 7 additions & 0 deletions Classes/PutIOFolderPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ -(void)chooseSelectedFolder:(id)sender
}
}

- (IBAction)useRootFolder:(id)sender {
if ([_delegate respondsToSelector:@selector(folderPicker:didPickFolderID:)]) {
[_delegate folderPicker:self didPickFolderID:0];
}
[self.window close];
}

-(void)cancel:(id)sender
{
[self.window close];
Expand Down
9 changes: 9 additions & 0 deletions Classes/SyncInstructionEditor.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ -(void)folderPicker:(PutIOFolderPicker *)picker didPickFolder:(PutIOAPIFile *)fo
[self updateLabels];
}

-(void)folderPicker:(PutIOFolderPicker *)picker didPickFolderID:(int)folderID
{
[NSApp endSheet:folderPicker.window];
_editedSyncInstruction.originFolderID = @(folderID);
_editedSyncInstruction.originFolderName = @"Root";

[self updateLabels];
}

-(void)folderPickerDidCancel:(PutIOFolderPicker *)picker
{
[NSApp endSheet:folderPicker.window];
Expand Down
34 changes: 25 additions & 9 deletions Classes/en.lproj/PutIOFolderPicker.xib
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6154.17" systemVersion="14A238x" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13189.4" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6154.17"/>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13189.4"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="PutIOFolderPicker">
Expand All @@ -14,12 +16,12 @@
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Choose PutIO Folder" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" visibleAtLaunch="NO" animationBehavior="default" id="1">
<windowStyleMask key="styleMask" titled="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="436" height="325"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/>
<view key="contentView" id="2">
<rect key="frame" x="0.0" y="0.0" width="436" height="325"/>
<autoresizingMask key="autoresizingMask"/>
Expand All @@ -31,9 +33,10 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" columnReordering="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="32" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="16" outlineTableColumn="10" id="6">
<rect key="frame" x="0.0" y="0.0" width="436" height="271"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn width="433" minWidth="16" maxWidth="1000" id="10">
Expand Down Expand Up @@ -94,7 +97,6 @@
</connections>
</outlineView>
</subviews>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="7">
<rect key="frame" x="1" y="278" width="483" height="16"/>
Expand All @@ -106,7 +108,7 @@
</scroller>
</scrollView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="25">
<rect key="frame" x="339" y="9" width="83" height="32"/>
<rect key="frame" x="340" y="9" width="82" height="32"/>
<buttonCell key="cell" type="push" title="Open" bezelStyle="rounded" alignment="center" enabled="NO" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="26">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
Expand All @@ -119,7 +121,7 @@ DQ
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="30">
<rect key="frame" x="256" y="9" width="83" height="32"/>
<rect key="frame" x="258" y="9" width="82" height="32"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="31">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
Expand All @@ -134,6 +136,20 @@ Gw
<progressIndicator horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="74">
<rect key="frame" x="20" y="20" width="16" height="16"/>
</progressIndicator>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="j9N-VY-69K">
<rect key="frame" x="120" y="9" width="138" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Use Root Folder" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="dtL-gn-jvC">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
<string key="keyEquivalent" base64-UTF8="YES">
Gw
</string>
<connections>
<action selector="useRootFolder:" target="-2" id="mPi-AZ-xOS"/>
</connections>
</buttonCell>
</button>
</subviews>
<constraints>
<constraint firstItem="5" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="-1" id="20"/>
Expand Down
2 changes: 1 addition & 1 deletion PutIOSync-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>383</string>
<string>384</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>PutIOSync.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>Release.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
</dict>
</plist>