Chameleon Applications

Chameleon Applications Svn Source Tree

Root/branches/diebuche/ChameleonPrefPane/Sources/ChameleonPrefPane.h

1//
2// ChameleonPrefPane.h
3// ChameleonPrefPane
4//
5// Created by Rekursor on 1/16/10.
6//
7
8#import <PreferencePanes/PreferencePanes.h>
9#import <SecurityFoundation/SFAuthorization.h>
10#import <SecurityInterface/SFAuthorizationView.h>
11#import "CustomTableView.h"
12#import "RoundedBox.h"
13
14
15// Constants definition
16static const NSString* const keyForceBootConfigPath = @"forceBootConfigPath";
17static const NSString* const keySwapHD01 = @"swapHD01";
18static const NSString* const keySwapHD02 = @"swapHD02";
19static const NSString* const keyUseFrozenParts = @"useFrozenParts";
20static const NSString* const keyPartitionsList = @"partitionsList";
21static const NSString* const kPreferencesFilePath = @"/Library/Preferences/com.chameleon.prefPane.plist";
22static const NSString* const keyPreferencesFileVersion = @"version"; // for future back compatibility
23
24// Interface
25
26@interface ChameleonPrefPane : NSPreferencePane
27{
28@public
29 IBOutlet SFAuthorizationView *authView;
30IBOutlet RoundedBox * box;
31IBOutlet RoundedBox * footer;
32 IBOutlet NSColorWell *gradientStartColorWell;
33 IBOutlet NSColorWell *gradientEndColorWell;
34 IBOutlet NSColorWell *backgroundColorWell;
35 IBOutlet NSColorWell *borderColorWell;
36
37@private
38// Objects corresponding to the interface mapping:
39IBOutlet CustomTableView *mPartitionsTable;
40IBOutlet NSTableColumn *mPartitionImgColumn;
41IBOutlet NSTableColumn *mFileSystemColumn;
42IBOutlet NSTableColumn *mPartitionNameColumn;
43IBOutlet NSTableColumn *mPartitionIDColumn;
44IBOutlet NSButton *mSleepButton;
45IBOutlet NSButton *mShutDownButton;
46IBOutlet NSButton *mRestartButton;
47IBOutlet NSTextField*mStatusText;
48IBOutlet NSBox*mOptions;
49
50
51
52NSMutableDictionary*mOptionsDict;
53NSMutableDictionary*mPartitionsDict;
54
55NSImage*mMacOSXImage;
56NSImage*mWindowsImage;
57NSImage*mLinuxImage;
58NSImage*mUnknownImage;
59NSImage*mCDROMImage;
60NSString*mOptionsPlistPath;
61intmPreferenceFileVersion;
62}
63
64+ (ChameleonPrefPane*) instance; // return the current instance
65- (void) loadPreferences;
66- (bool) savePreferences: (NSDictionary*) dict;
67- (NSMutableDictionary*) preferencesFile;
68- (NSMutableDictionary*) preferencesParts;
69
70- (NSTableView*) partitionsTable;
71
72- (IBAction)onRestart: (id)sender;
73- (IBAction)onShutdown: (id)sender;
74- (IBAction)onSleep: (id)sender;
75
76- (void)awakeFromNib;
77- (void)initBootConfig;
78- (id) getImageResource: (NSString *) str ofType: (NSString*) sType;
79
80- (void)tableViewSelectionDidChange:(NSNotification *)notification;
81- (void) selectDefaultPartition;
82
83- (bool)isUnlocked;
84- (void) refreshLockStates;
85- (void)tableViewSelectionDidChange:(NSNotification *)notification;
86- (AuthorizationRef) auth;
87
88
89@end
90

Archive Download this file

Revision: 81