Alexandre Lision | f5fc479 | 2015-03-17 09:15:43 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2004-2015 Savoir-Faire Linux Inc. |
| 3 | * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
| 19 | * Additional permission under GNU GPL version 3 section 7: |
| 20 | * |
| 21 | * If you modify this program, or any covered work, by linking or |
| 22 | * combining it with the OpenSSL project's OpenSSL library (or a |
| 23 | * modified version of that library), containing parts covered by the |
| 24 | * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. |
| 25 | * grants you additional permission to convey the resulting work. |
| 26 | * Corresponding Source for a non-source form of such a combination |
| 27 | * shall include the source code for the parts of OpenSSL used as well |
| 28 | * as that of the covered work. |
| 29 | */ |
| 30 | #import "AccSecurityVC.h" |
| 31 | |
| 32 | @interface AccSecurityVC () |
| 33 | |
| 34 | @property Account* privateAccount; |
| 35 | |
| 36 | @end |
| 37 | |
| 38 | @implementation AccSecurityVC |
| 39 | @synthesize privateAccount; |
| 40 | |
| 41 | - (void)awakeFromNib |
| 42 | { |
| 43 | NSLog(@"INIT Security VC"); |
| 44 | } |
| 45 | |
| 46 | - (void)loadAccount:(Account *)account |
| 47 | { |
| 48 | privateAccount = account; |
| 49 | } |
| 50 | |
| 51 | #pragma mark - NSPathControl delegate methods |
| 52 | |
| 53 | /* |
| 54 | Delegate method of NSPathControl to determine how the NSOpenPanel will look/behave. |
| 55 | */ |
| 56 | - (void)pathControl:(NSPathControl *)pathControl willDisplayOpenPanel:(NSOpenPanel *)openPanel |
| 57 | { |
| 58 | NSLog(@"willDisplayOpenPanel"); |
| 59 | [openPanel setAllowsMultipleSelection:NO]; |
| 60 | [openPanel setCanChooseDirectories:NO]; |
| 61 | [openPanel setCanChooseFiles:YES]; |
| 62 | [openPanel setResolvesAliases:YES]; |
| 63 | [openPanel setTitle:NSLocalizedString(@"Choose a file", @"Open panel title")]; |
| 64 | [openPanel setPrompt:NSLocalizedString(@"Choose", @"Open panel prompt for 'Choose a file'")]; |
| 65 | [openPanel setDelegate:self]; |
| 66 | } |
| 67 | |
| 68 | - (void)pathControl:(NSPathControl *)pathControl willPopUpMenu:(NSMenu *)menu |
| 69 | { |
| 70 | |
| 71 | } |
| 72 | |
| 73 | #pragma mark - NSOpenSavePanelDelegate delegate methods |
| 74 | |
| 75 | - (void)panel:(id)sender willExpand:(BOOL)expanding |
| 76 | { |
| 77 | //NSLog(@"willExpand"); |
| 78 | } |
| 79 | |
| 80 | - (NSString *)panel:(id)sender userEnteredFilename:(NSString *)filename confirmed:(BOOL)okFlag |
| 81 | { |
| 82 | //NSLog(@"userEnteredFilename"); |
| 83 | } |
| 84 | |
| 85 | - (void)panelSelectionDidChange:(id)sender |
| 86 | { |
| 87 | //NSLog(@"panelSelectionDidChange"); |
| 88 | } |
| 89 | |
| 90 | - (BOOL)panel:(id)sender validateURL:(NSURL *)url error:(NSError **)outError |
| 91 | { |
| 92 | NSLog(@"validateURL"); |
| 93 | return YES; |
| 94 | |
| 95 | } |
| 96 | |
| 97 | - (void)panel:(id)sender didChangeToDirectoryURL:(NSURL *)url |
| 98 | { |
| 99 | //NSLog(@"didChangeToDirectoryURL"); |
| 100 | } |
| 101 | |
| 102 | @end |