Commit e8d06573 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

sandbox: folder for exported account

This patch change default folder of exported account to download
directory instead of home directory that is application container for
sandboxed application.

Change-Id: I893f8d2557aba37e561b776b5524447202263731
parent 353ca3f0
......@@ -36,7 +36,6 @@
#import <interfaces/pixmapmanipulatori.h>
#import "RegisterNameWC.h"
#import "RestoreAccountWC.h"
#import "BackupAccountWC.h"
#import "views/NSColor+RingTheme.h"
#import "views/NSImage+Extensions.h"
......
......@@ -53,7 +53,12 @@
- (void)windowDidLoad
{
[super windowDidLoad];
[path setURL: [NSURL fileURLWithPath:NSHomeDirectory()]];
NSArray * paths = NSSearchPathForDirectoriesInDomains (NSDownloadsDirectory, NSUserDomainMask, YES);
if(paths.count <= 0) {
return;
}
NSString * downloadPath = [paths objectAtIndex:0];
[path setURL: [NSURL URLWithString: downloadPath]];
}
- (void)setDelegate:(id <BackupAccountDelegate>)aDelegate
......@@ -107,10 +112,14 @@
}
- (void)pathControl:(NSPathControl *)pathControl willDisplayOpenPanel:(NSOpenPanel *)openPanel
{
NSLog(@"willDisplayOpenPanel");
[openPanel setAllowsMultipleSelection:NO];
[openPanel setResolvesAliases:YES];
[openPanel setDirectory:NSHomeDirectory()];
NSArray * paths = NSSearchPathForDirectoriesInDomains (NSDownloadsDirectory, NSUserDomainMask, YES);
if(paths.count <= 0) {
return;
}
NSString * downloadPath = [paths objectAtIndex:0];
[openPanel setDirectoryURL:[NSURL URLWithString: downloadPath]];
[openPanel setDelegate:self];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment