Ilya Moiseenko | 1dc76da | 2013-09-30 11:53:36 -0700 | [diff] [blame^] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * @copyright See LICENCE for copyright and license information. |
| 4 | * |
| 5 | * @author Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 6 | * @author Ilya Moiseenko <iliamo@ucla.edu> |
| 7 | */ |
| 8 | |
| 9 | #import "preference-delegate.h" |
| 10 | |
| 11 | @implementation PreferenceDelegate |
| 12 | |
| 13 | -(IBAction)showPreferencesPanel:(id)sender |
| 14 | { |
| 15 | [preferencesPanel setContentView:generalSettingsView]; |
| 16 | [preferencesPanel makeKeyAndOrderFront:sender]; |
| 17 | [preferencesPanel setLevel: NSStatusWindowLevel]; |
| 18 | } |
| 19 | |
| 20 | -(IBAction)openGeneralSettings:(id)sender |
| 21 | { |
| 22 | [preferencesPanel setContentView:generalSettingsView]; |
| 23 | } |
| 24 | |
| 25 | -(IBAction)openForwardingSettings:(id)sender |
| 26 | { |
| 27 | [preferencesPanel setContentView:forwardingSettingsView]; |
| 28 | } |
| 29 | |
| 30 | -(IBAction)openSecuritySettings:(id)sender |
| 31 | { |
| 32 | [preferencesPanel setContentView:securitySettingsView]; |
| 33 | } |
| 34 | |
| 35 | -(IBAction)switchSoftwareUpdates:(id)sender |
| 36 | { |
| 37 | if ([(NSButton*)sender state] == NSOnState) |
| 38 | { |
| 39 | _allowSoftwareUpdates = true; |
| 40 | } |
| 41 | else |
| 42 | { |
| 43 | _allowSoftwareUpdates = false; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | -(IBAction)switchHubDiscovery:(id)sender |
| 48 | { |
| 49 | if ([(NSButton*)sender state] == NSOnState) |
| 50 | { |
| 51 | _enableHubDiscovery = true; |
| 52 | } |
| 53 | else |
| 54 | { |
| 55 | _enableHubDiscovery = false; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | |
| 60 | @end |