Skip to content

Commit

Permalink
Now sets the correct initial values
Browse files Browse the repository at this point in the history
original bzr status:
revno: 66
committer: Archimedes Trajano <developer@trajano.net>
branch nick: InsomniaT
timestamp: Wed 2010-06-09 16:02:06 -0400
  • Loading branch information
trajano committed Jun 9, 2010
1 parent 4b87efa commit 9d0c994
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/prefpane/InsomniaT/InsomniaTPref.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -29,12 +29,21 @@ - (void) mainViewDidLoad
IOConnectCallScalarMethod(connect, 3, NULL, 0, output, &count); IOConnectCallScalarMethod(connect, 3, NULL, 0, output, &count);
IOServiceClose(connect); IOServiceClose(connect);


[statusLevel setIntValue: 1]; if (output[0] != 1) {
[statusLevelText setStringValue: @"InsomniaT: OnAAAA"]; [statusLevel setIntValue: 1];
[statusLevelBlurb setTitleWithMnemonic: @"The MacBook willAAA not suspend when the lid closed."]; [statusLevelText setTitleWithMnemonic: @"InsomniaT: On"];
[startStopButton setTitle: @"StopAAAA"]; [statusLevelBlurb setTitleWithMnemonic: @"The MacBook will not suspend when the lid closed."];
[startStopButtonBlurb setTitleWithMnemonic: @"Click StAAAAop to turn InsominaT off"]; [startStopButton setTitle: @"Stop"];
[startStopButton setEnabled: true]; [startStopButtonBlurb setTitleWithMnemonic: @"Click Stop to turn InsominaT off"];
[startStopButton setEnabled: true];
} else {
[statusLevel setIntValue: 0];
[statusLevelText setTitleWithMnemonic: @"InsomniaT: Off"];
[statusLevelBlurb setTitleWithMnemonic: @"The MacBook will suspend when the lid closed."];
[startStopButton setTitle: @"Start"];
[startStopButtonBlurb setTitleWithMnemonic: @"Click Start to turn InsominaT on"];
[startStopButton setEnabled: true];
}


} else { } else {
return; return;
Expand Down

0 comments on commit 9d0c994

Please sign in to comment.