Skip to content
Snippets Groups Projects
Commit e8d06573 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

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
Branches
Tags
No related merge requests found
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#import <interfaces/pixmapmanipulatori.h> #import <interfaces/pixmapmanipulatori.h>
#import "RegisterNameWC.h" #import "RegisterNameWC.h"
#import "RestoreAccountWC.h"
#import "BackupAccountWC.h" #import "BackupAccountWC.h"
#import "views/NSColor+RingTheme.h" #import "views/NSColor+RingTheme.h"
#import "views/NSImage+Extensions.h" #import "views/NSImage+Extensions.h"
......
...@@ -53,7 +53,12 @@ ...@@ -53,7 +53,12 @@
- (void)windowDidLoad - (void)windowDidLoad
{ {
[super 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 - (void)setDelegate:(id <BackupAccountDelegate>)aDelegate
...@@ -107,10 +112,14 @@ ...@@ -107,10 +112,14 @@
} }
- (void)pathControl:(NSPathControl *)pathControl willDisplayOpenPanel:(NSOpenPanel *)openPanel - (void)pathControl:(NSPathControl *)pathControl willDisplayOpenPanel:(NSOpenPanel *)openPanel
{ {
NSLog(@"willDisplayOpenPanel");
[openPanel setAllowsMultipleSelection:NO]; [openPanel setAllowsMultipleSelection:NO];
[openPanel setResolvesAliases:YES]; [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]; [openPanel setDelegate:self];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment