projects
/
enjoyable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweak invalid filename handling. Use it for manual exports also. Allow drag exports...
[enjoyable.git]
/
NJMappingsController.m
diff --git
a/NJMappingsController.m
b/NJMappingsController.m
index
45085b5
..
ea8137f
100644
(file)
--- a/
NJMappingsController.m
+++ b/
NJMappingsController.m
@@
-299,7
+299,7
@@
NSSavePanel *panel = [NSSavePanel savePanel];
panel.allowedFileTypes = @[ @"enjoyable" ];
NJMapping *mapping = _currentMapping;
NSSavePanel *panel = [NSSavePanel savePanel];
panel.allowedFileTypes = @[ @"enjoyable" ];
NJMapping *mapping = _currentMapping;
- panel.nameFieldStringValue =
mapping.name
;
+ panel.nameFieldStringValue =
[mapping.name stringByFixingPathComponent]
;
NSWindow *window = NSApplication.sharedApplication.keyWindow;
[panel beginSheetModalForWindow:window
completionHandler:^(NSInteger result) {
NSWindow *window = NSApplication.sharedApplication.keyWindow;
[panel beginSheetModalForWindow:window
completionHandler:^(NSInteger result) {
@@
-424,6
+424,10
@@
writeRowsWithIndexes:(NSIndexSet *)rowIndexes
[pboard setString:@(rowIndexes.firstIndex).stringValue forType:PB_ROW];
[pboard setPropertyList:@[@"enjoyable"] forType:NSFilesPromisePboardType];
return YES;
[pboard setString:@(rowIndexes.firstIndex).stringValue forType:PB_ROW];
[pboard setPropertyList:@[@"enjoyable"] forType:NSFilesPromisePboardType];
return YES;
+ } else if (rowIndexes.count == 1 && rowIndexes.firstIndex == 0) {
+ [pboard declareTypes:@[NSFilesPromisePboardType] owner:nil];
+ [pboard setPropertyList:@[@"enjoyable"] forType:NSFilesPromisePboardType];
+ return YES;
} else {
return NO;
}
} else {
return NO;
}