mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 12:52:21 +00:00
Test run to allow any files in openPanel
This commit is contained in:
@@ -22,20 +22,20 @@
|
|||||||
|
|
||||||
#import "MPAppDelegate.h"
|
#import "MPAppDelegate.h"
|
||||||
|
|
||||||
#import "MPSettingsWindowController.h"
|
|
||||||
#import "MPPasswordCreatorViewController.h"
|
|
||||||
#import "MPSettingsHelper.h"
|
|
||||||
#import "MPStringLengthValueTransformer.h"
|
|
||||||
#import "MPValueTransformerHelper.h"
|
|
||||||
#import "MPServerDaemon.h"
|
|
||||||
#import "MPLockDaemon.h"
|
|
||||||
#import "MPAutotypeDaemon.h"
|
#import "MPAutotypeDaemon.h"
|
||||||
#import "MPDocumentWindowController.h"
|
|
||||||
#import "MPDockTileHelper.h"
|
#import "MPDockTileHelper.h"
|
||||||
|
|
||||||
#import "MPTemporaryFileStorageCenter.h"
|
|
||||||
|
|
||||||
#import "MPDocument.h"
|
#import "MPDocument.h"
|
||||||
|
#import "MPDocumentController.h"
|
||||||
|
#import "MPDocumentWindowController.h"
|
||||||
|
#import "MPLockDaemon.h"
|
||||||
|
#import "MPPasswordCreatorViewController.h"
|
||||||
|
#import "MPServerDaemon.h"
|
||||||
|
#import "MPSettingsHelper.h"
|
||||||
|
#import "MPSettingsWindowController.h"
|
||||||
|
#import "MPStringLengthValueTransformer.h"
|
||||||
|
#import "MPTemporaryFileStorageCenter.h"
|
||||||
|
#import "MPValueTransformerHelper.h"
|
||||||
|
|
||||||
#import "KPKCompositeKey.h"
|
#import "KPKCompositeKey.h"
|
||||||
|
|
||||||
NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDidChangeStoredKeyFilesSettings";
|
NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDidChangeStoredKeyFilesSettings";
|
||||||
@@ -63,6 +63,18 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
|
|||||||
[MPValueTransformerHelper registerValueTransformer];
|
[MPValueTransformerHelper registerValueTransformer];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (instancetype)init {
|
||||||
|
self = [super init];
|
||||||
|
if(self) {
|
||||||
|
/* We know that we do not use the varibale after instancation */
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-variable"
|
||||||
|
MPDocumentController *documentController = [[MPDocumentController alloc] init];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
[self unbind:NSStringFromSelector(@selector(isAllowedToStoreKeyFile))];
|
[self unbind:NSStringFromSelector(@selector(isAllowedToStoreKeyFile))];
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
|
|||||||
@@ -42,8 +42,9 @@
|
|||||||
|
|
||||||
- (IBAction)toggleAllowAllFilesButton:(id)sender {
|
- (IBAction)toggleAllowAllFilesButton:(id)sender {
|
||||||
NSButton *button = (NSButton *)sender;
|
NSButton *button = (NSButton *)sender;
|
||||||
self.openPanel.allowsOtherFileTypes = HNHBoolForState(button.state);
|
|
||||||
self.allowAllFiles = HNHBoolForState(button.state);
|
self.allowAllFiles = HNHBoolForState(button.state);
|
||||||
|
self.openPanel.allowedFileTypes = self.allowAllFiles ? nil : @[@".kdb", @".kdbx"];
|
||||||
|
//self.openPanel.directoryURL = self.openPanel.directoryURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark NSOpenSavePanelDelegate
|
#pragma mark NSOpenSavePanelDelegate
|
||||||
|
|||||||
Reference in New Issue
Block a user