conditional os in UI xml, add system dialog file open on osx, check api format or error message when opening a document, per-char text wrap on NodeText, additional info on create doc dialog like working path
This commit is contained in:
@@ -38,15 +38,15 @@ std::mutex task_mutex;
|
||||
{
|
||||
[[NSApplication sharedApplication] terminate:nil];
|
||||
}
|
||||
- (std::string)pick_file
|
||||
- (std::string)pick_file:(NSArray<NSString*>*)types
|
||||
{
|
||||
NSOpenPanel *panel = [NSOpenPanel openPanel];
|
||||
[panel setCanChooseFiles:YES];
|
||||
[panel setCanChooseDirectories:NO];
|
||||
[panel setAllowsMultipleSelection:NO]; // yes if more than one dir is allowed
|
||||
|
||||
NSArray* fileTypes = [NSArray arrayWithObjects:@"png", @"PNG", @"jpg", @"JPG", @"jpeg", nil];
|
||||
[panel setAllowedFileTypes:fileTypes];
|
||||
//NSArray* fileTypes = [NSArray arrayWithObjects:@"png", @"PNG", @"jpg", @"JPG", @"jpeg", nil];
|
||||
[panel setAllowedFileTypes:types];
|
||||
|
||||
NSInteger clicked = [panel runModal];
|
||||
|
||||
|
||||
@@ -22,5 +22,5 @@
|
||||
- (void)async_lock;
|
||||
- (void)async_unlock;
|
||||
- (void)async_swap;
|
||||
- (std::string)pick_file;
|
||||
- (std::string)pick_file:(NSArray<NSString*>*)types;
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user