diff --git a/Classes/PutIOFolderPicker.h b/Classes/PutIOFolderPicker.h index 0ad81f0..2145fb5 100644 --- a/Classes/PutIOFolderPicker.h +++ b/Classes/PutIOFolderPicker.h @@ -5,6 +5,7 @@ @class PutIOFolderPicker; @protocol PutIOFolderPickerDelegate -(void)folderPicker:(PutIOFolderPicker*)picker didPickFolder:(PutIOAPIFile*)folder; +-(void)folderPicker:(PutIOFolderPicker *)picker didPickFolderID:(int)folderID; -(void)folderPickerDidCancel:(PutIOFolderPicker*)picker; @end diff --git a/Classes/PutIOFolderPicker.m b/Classes/PutIOFolderPicker.m index 398414c..438977d 100644 --- a/Classes/PutIOFolderPicker.m +++ b/Classes/PutIOFolderPicker.m @@ -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]; diff --git a/Classes/SyncInstructionEditor.m b/Classes/SyncInstructionEditor.m index 9809815..4cb2eba 100644 --- a/Classes/SyncInstructionEditor.m +++ b/Classes/SyncInstructionEditor.m @@ -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]; diff --git a/Classes/en.lproj/PutIOFolderPicker.xib b/Classes/en.lproj/PutIOFolderPicker.xib index 08cd2e9..42c23aa 100644 --- a/Classes/en.lproj/PutIOFolderPicker.xib +++ b/Classes/en.lproj/PutIOFolderPicker.xib @@ -1,7 +1,9 @@ - - + + - + + + @@ -14,12 +16,12 @@ - + - + @@ -31,9 +33,10 @@ + - + @@ -94,7 +97,6 @@ - diff --git a/PutIOSync-Info.plist b/PutIOSync-Info.plist index 2d279f3..1667337 100644 --- a/PutIOSync-Info.plist +++ b/PutIOSync-Info.plist @@ -30,7 +30,7 @@ CFBundleVersion - 383 + 384 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/PutIOSync.xcodeproj/xcuserdata/server.xcuserdatad/xcschemes/xcschememanagement.plist b/PutIOSync.xcodeproj/xcuserdata/server.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..afcfbae --- /dev/null +++ b/PutIOSync.xcodeproj/xcuserdata/server.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,19 @@ + + + + + SchemeUserState + + PutIOSync.xcscheme + + orderHint + 0 + + Release.xcscheme + + orderHint + 1 + + + +