mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 08:12:28 +00:00
using MacPass code style. Removed auto-open of path control as this annoys if MacPass gets focus
This commit is contained in:
@@ -21,26 +21,25 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "MPKeyfilePathControlDelegate.h"
|
#import "MPKeyfilePathControlDelegate.h"
|
||||||
|
|
||||||
@implementation MPKeyfilePathControlDelegate
|
@implementation MPKeyfilePathControlDelegate
|
||||||
|
|
||||||
- (NSDragOperation)pathControl:(NSPathControl *)pathControl validateDrop:(id<NSDraggingInfo>)info {
|
- (NSDragOperation)pathControl:(NSPathControl *)pathControl validateDrop:(id<NSDraggingInfo>)info {
|
||||||
return NSDragOperationNone;
|
return NSDragOperationNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)pathControl:(NSPathControl *)pathControl willDisplayOpenPanel:(NSOpenPanel *)openPanel {
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)pathControlDidBecomeKey:(NSPathControl *)control {
|
- (void)pathControlDidBecomeKey:(NSPathControl *)control {
|
||||||
if(control.URL) return;
|
// if(control.URL) {
|
||||||
|
// return;
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
// }
|
||||||
NSOpenPanel *panel = [NSOpenPanel openPanel];
|
//
|
||||||
panel.allowedFileTypes = control.allowedTypes;
|
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
if([panel runModal] != NSModalResponseOK) return;
|
// NSOpenPanel *panel = [NSOpenPanel openPanel];
|
||||||
|
// panel.allowedFileTypes = control.allowedTypes;
|
||||||
control.URL = panel.URL;
|
// if([panel runModal] != NSModalResponseOK) {
|
||||||
});
|
// return;
|
||||||
|
// }
|
||||||
|
// control.URL = panel.URL;
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user