Chameleon Applications

Chameleon Applications Commit Details

Date:2010-01-27 22:17:58 (14 years 2 months ago)
Author:Rekursor
Commit:69
Parents: 68
Message: mane state/refresh incoherencies fixed. About dialog implemented but needs more polish, preparing for a RC1...
Changes:
M/trunk/ChameleonPrefPane/Resources/getDevProp.sh
M/trunk/ChameleonPrefPane/Sources/BootSetupController.mm
M/trunk/ChameleonPrefPane/Info.plist
M/trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h
M/trunk/ChameleonPrefPane/TODO
M/trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
M/trunk/ChameleonPrefPane/CHANGES
M/trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h
M/trunk/ChameleonPrefPane/English.lproj/Chameleon.xib
M/trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm
M/trunk/ChameleonPrefPane/bin/version

File differences

trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
171171
172172
173173
174
175
176
177
174178
175179
176180
}
}
- (IBAction)onAbout: (id)sender
{
[mAboutDlg makeKeyAndOrderFront: sender];
}
//--------------------------------------------------------------------------
- (void) loadPreferences
{
trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h
4545
4646
4747
48
4849
4950
5051
+ (void) doForEachGroup: (GroupAction) action withOption:(id) option;
// Set refresh state {enabled | disabled} depending on the authorizations state
+ (void) refreshBodLockState: (const BootOptionDesc*) bod;
+ (void) refreshLockState: (id) item;
// Unitary Method for Load One option of any type
trunk/ChameleonPrefPane/Sources/BootSetupController.mm
3939
4040
4141
42
4243
4344
4445
......
5758
5859
5960
60
61
62
61
62
6363
64
65
66
67
6468
6569
6670
......
241245
242246
243247
244
248
245249
246250
247251
[PreferencesControllerBase refreshLockState: mFreezeParts ];
[PreferencesControllerBase refreshLockState: mInjectFrozenParts ];
[PreferencesControllerBase refreshLockState: mBootConfigPath ];
[PreferencesControllerBase refreshLockState: mBootConfigPathText ];
}
//--------------------------------------------------------------------------
[mSwapHD02 setIntValue: [[dict objectForKey:keySwapHD02] intValue]];
[mFreezeParts setIntValue: [[dict objectForKey: keyUseFrozenParts] intValue] ];
id obj = [dict objectForKey: keyForceBootConfigPath];
if(obj)[mBootConfigPathText setStringValue: obj ];
else[dict setObject:[[NSString alloc] initWithString: @""] forKey: keyForceBootConfigPath];
int val = ([[mBootConfigPathText stringValue] length] >0 ? 1 : 0);
[mBootConfigPathText setStringValue: obj ? obj : @"" ];
int val = (obj && [[mBootConfigPathText stringValue] length] >0 ? 1 : 0);
[mBootConfigPath setIntValue: val];
[dict setObject:[[NSString alloc] initWithString: [mBootConfigPathText stringValue]]
forKey: keyForceBootConfigPath];
[mBootConfigPathText setEnabled: val ? true : false];
[mBootConfigPathText setEditable: val ? true : false];
}
{
// IMPROVE ME: Should automatize the callback/load/save mechanism
// for the preferences file like the bootConfig file
if (sender == mSwapHD01 || sender == mSwapHD01)
if (sender == mSwapHD01 || sender == mSwapHD02)
{
partExtractor->resetSwapping();
[self doSwapHD: [mSwapHD01 intValue] save:true src:0 dst:1];
trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h
2929
3030
3131
32
32
33
3334
3435
3536
......
6465
6566
6667
68
6769
6870
6971
@private
// Objects corresponding to the interface mapping:
IBOutlet CustomTableView *mPartitionsTable;
IBOutlet NSPanel*mAboutDlg;
IBOutlet CustomTableView *mPartitionsTable;
IBOutlet NSTableColumn *mPartitionImgColumn;
IBOutlet NSTableColumn *mFileSystemColumn;
IBOutlet NSTableColumn *mPartitionNameColumn;
- (IBAction)onRestart: (id)sender;
- (IBAction)onShutdown: (id)sender;
- (IBAction)onSleep: (id)sender;
- (IBAction)onAbout: (id)sender;
- (void)awakeFromNib;
- (void)initBootConfig;
trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm
6161
6262
6363
64
65
66
67
68
69
70
71
72
73
74
75
6476
6577
6678
67
68
79
80
81
82
6983
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
70100
71101
72102
......
338368
339369
340370
371
341372
342373
343374
groupList.push_back(myGroup);
}
- (void) synchronizeTextContent:(const BootOptionDesc*) bod withValue:(int) val
{
if(!bod || !bod->contentID) return;
id item = (id) bod->contentID;
if ( [item isKindOfClass: [NSTextField class]] ||
[item isKindOfClass: [NSComboBox class]])
{
[item setEnabled: val];
[item setEditable: val];
}
}
//--------------------------------------------------------------------------
+ (void) refreshLockState: (id) item
{
[item setEnabled:[[ChameleonPrefPane instance] isUnlocked]];
const BootOptionDesc * bod = BootProp::instance().findOption(item);
if(!bod) bod=BootProp::instance().findOptionContent(item);
if(bod) [PreferencesControllerBaserefreshBodLockState: bod];
else[item setEnabled: [[ChameleonPrefPane instance] isUnlocked]];
}
//--------------------------------------------------------------------------
+ (void) refreshBodLockState: (const BootOptionDesc*) bod
{
if (!bod) return;
bool isUnlocked = [[ChameleonPrefPane instance] isUnlocked];
if (bod->ID) [(id) bod->ID setEnabled: isUnlocked];
int val = bod->ID ? [(id) bod->ID intValue] : 0;
if ( [(id) bod->contentID isKindOfClass: [NSTextField class]] ||
[(id) bod->contentID isKindOfClass: [NSComboBox class]])
{
[(id) bod->contentID setEnabled: (isUnlocked && val) ];
[(id) bod->contentID setEditable: (isUnlocked && val) ];
}
else
[(id) bod->contentID setEnabled: isUnlocked];
}
//--------------------------------------------------------------------------
+ (void) refreshLockStates
NSString* f = [self selectAnyFile ];
if (f) [(NSTextField*) bod->contentID setStringValue: f];
}
[self synchronizeTextContent: bod withValue: state];
break;
default:
break;
trunk/ChameleonPrefPane/Info.plist
1717
1818
1919
20
20
2121
2222
2323
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.0 b8</string>
<string>2.0 RC1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
trunk/ChameleonPrefPane/TODO
44
55
66
7
8
9
710
8
11
912
10
11
13
Current versions todo list
--------------------------
- Graphical deign (icons and otehr graphical matter..) management -> DieBuche
- Localization -> DieBuche, have a look to scrax translation file in German, Italian, portuguese
in the issue pane of the repository (thiagomorales propsed portuguese maybe spanish would be better first ?)
- Enhance the partition filtering by checking really bootable partitions
(by contrast of the partion of a particular format)
(by contrast of the partition of a particular format) *OK* but can be improved
- Try to investigate if there is a better way to get the partition list
(currently done with diskutil list)
- Localization, have a look to scrax translation file in italian in the issue pane of the repository
(currently done with diskutil list) probably with Chameleon booter RC6.
trunk/ChameleonPrefPane/CHANGES
1
2
3
14
25
36
-
- Fixed refresh and on checked associated button state, made sure the string is disabled if value is 0
- Fixed crash when using swap hd 0<->2
- Added a new option type (OptionFileString) that features an open dialog box to open files
- Added few Combo boxes to simplify text inputs
- Added Missing ForceHPET option and Theme options
trunk/ChameleonPrefPane/bin/version
1
1
2.0.b8
2.0.RC1
trunk/ChameleonPrefPane/Resources/getDevProp.sh
1414
1515
1616
17
17
1818
1919
20
20
2121
2222
2323
......
2727
2828
2929
30
30
31
32
33
34
35
3136
3237
3338
# Create a dump directory
if [[ ! -d $dmpdir ]];then
mkdir $dmpdir
mkdir -p $dmpdir
fi
if [[ ! -d $tmpDir ]];then
mkdir $tmpDir
mkdir -p $tmpDir
fi
# Dump Device properties
ioreg -lw0 -p IODeviceTree -n efi -r -x |grep device-properties | sed 's/.*<//;s/>.*//;' | cat > $dmpdir/chameleon-devprop.hex
# Splash the result up !!
open $dmpdir/chameleon-devprop.plist
rm -r $tmpdir
if [[ ! -d $dmpdir ]];then
rm -r $dmpdir
fi
if [[ ! -d $tmpDir ]];then
rm -r $tmpDir
fi
#end
#echo $?
trunk/ChameleonPrefPane/English.lproj/Chameleon.xib
1212
1313
1414
15
15
16
1617
1718
1819
......
14551456
14561457
14571458
1458
1459
14591460
14601461
14611462
......
34483449
34493450
34503451
3451
3452
34523453
34533454
34543455
34553456
34563457
3457
3458
34583459
34593460
34603461
......
34713472
34723473
34733474
3474
3475
34753476
3476
3477
34773478
34783479
34793480
......
34903491
34913492
34923493
3493
3494
34943495
34953496
34963497
34973498
34983499
3499
3500
35003501
35013502
35023503
3503
3504
35043505
35053506
35063507
......
35123513
35133514
35143515
3515
3516
3517
3518
3519
35163520
35173521
35183522
35193523
3524
35203525
35213526
35223527
......
48584863
48594864
48604865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
48614882
48624883
48634884
......
69066927
69076928
69086929
6909
6930
69106931
6911
6932
69126933
69136934
69146935
......
74047425
74057426
74067427
7407
7428
74087429
7409
7430
74107431
74117432
74127433
......
76657686
76667687
76677688
7668
7689
76697690
76707691
76717692
......
78797900
78807901
78817902
7903
78827904
78837905
78847906
......
78887910
78897911
78907912
7913
78917914
78927915
78937916
......
78957918
78967919
78977920
7921
78987922
78997923
79007924
......
79097933
79107934
79117935
7936
79127937
79137938
79147939
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="174"/>
<integer value="577"/>
<integer value="432"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSComboTableView" key="NSTableView" id="580522527">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{13, 210}</string>
<string key="NSFrameSize">{13, 105}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<int key="NSWindowStyleMask">8223</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{235, 265}, {464, 255}}</string>
<int key="NSWTFlags">611844096</int>
<int key="NSWTFlags">1685585920</int>
<string key="NSWindowTitle">About the Chameleon Preferences Pane</string>
<string key="NSWindowClass">NSPanel</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<object class="NSView" key="NSWindowView" id="908319067">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="807647820"/>
<reference key="NSBackgroundColor" ref="1061310622"/>
<object class="NSColor" key="NSTextColor" id="781028059">
<object class="NSColor" key="NSTextColor" id="11795065">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
<bytes key="NSRGB">MC4xNjEyMjAzNTggMC4zMzc1NjA1ODA1IDEAA</bytes>
</object>
</object>
</object>
<reference key="NSSupport" ref="930899267"/>
<reference key="NSControlView" ref="329015339"/>
<reference key="NSBackgroundColor" ref="1061310622"/>
<reference key="NSTextColor" ref="781028059"/>
<reference key="NSTextColor" ref="11795065"/>
</object>
</object>
<object class="NSTextField" id="417745275">
<reference key="NSNextResponder" ref="908319067"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{46, 20}, {373, 183}}</string>
<string key="NSFrame">{{20, 20}, {424, 190}}</string>
<reference key="NSSuperview" ref="908319067"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="294587452">
<int key="NSCellFlags">-1805517311</int>
<int key="NSCellFlags">-2076049920</int>
<int key="NSCellFlags2">272629760</int>
<string type="base64-UTF8" key="NSContents">ICBJbml0aWFsIENvbmNlcHRpb24gJiBEZXNpZ246ICAKCVJla3Vyc29yCiAgCiAgQ3JldyBNZW1iZXJz
OiAgCglSZWt1cnNvciwgICBEaWVCdWNoZQogIAogIENvbnRyaWJ1dG9ycyAmIFRlc3RlcnM6ICAKCUJs
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MCAwIDAAA</bytes>
</object>
<reference key="NSTextColor" ref="781028059"/>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4yMjkzMDkxODM1IDAuMjk2MzI4MzY2NSAxAA</bytes>
</object>
</object>
</object>
</object>
<string key="NSFrameSize">{464, 255}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1058}}</string>
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
</object>
<int key="connectionID">878</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">makeKeyAndOrderFront:</string>
<reference key="source" ref="8349391"/>
<reference key="destination" ref="474865121"/>
</object>
<int key="connectionID">880</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">mAboutDlg</string>
<reference key="source" ref="513945847"/>
<reference key="destination" ref="8349391"/>
</object>
<int key="connectionID">881</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{141, 79}, {668, 368}}</string>
<string>{{142, 79}, {668, 368}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{141, 79}, {668, 368}}</string>
<string>{{142, 79}, {668, 368}}</string>
<integer value="1"/>
<integer value="1"/>
<string>{224.664, 10}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{724, 590}, {464, 255}}</string>
<string>{{524, 438}, {464, 255}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{724, 590}, {464, 255}}</string>
<string>{{524, 438}, {464, 255}}</string>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">878</int>
<int key="maxID">881</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>onAbout:</string>
<string>onRestart:</string>
<string>onShutdown:</string>
<string>onSleep:</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>authView</string>
<string>mAboutDlg</string>
<string>mFileSystemColumn</string>
<string>mOptions</string>
<string>mPartitionIDColumn</string>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>SFAuthorizationView</string>
<string>NSPanel</string>
<string>NSTableColumn</string>
<string>NSBox</string>
<string>NSTableColumn</string>

Archive Download the corresponding diff file

Revision: 69