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

Archive Download this file

Revision: 79