more cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17740 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2006-06-06 16:21:02 +00:00
parent 2da44dc7b5
commit a216b33aed
2 changed files with 9 additions and 15 deletions

View File

@ -19,8 +19,8 @@
CalcOptions::CalcOptions()
: mAutoNumLock(true),
mAudioFeedback(false)
: auto_num_lock(true),
audio_feedback(false)
{
}
@ -42,7 +42,7 @@ CalcOptionsWindow::CalcOptionsWindow(BRect frame, CalcOptions *options)
BRect viewframe(4.0f, y, frame.right, y + 16.0f);
fAutoNumLockCheckBox = new BCheckBox(viewframe,
"autoNumLockCheckBox", "Auto Num Lock", NULL);
if (fOptions->mAutoNumLock) {
if (fOptions->auto_num_lock) {
fAutoNumLockCheckBox->SetValue(B_CONTROL_ON);
}
bg->AddChild(fAutoNumLockCheckBox);
@ -52,7 +52,7 @@ CalcOptionsWindow::CalcOptionsWindow(BRect frame, CalcOptions *options)
viewframe.Set(4.0f, y, frame.right, y + 16.0f);
fAudioFeedbackCheckBox = new BCheckBox(viewframe,
"audioFeedbackCheckBox", "Audio Feedback", NULL);
if (fOptions->mAudioFeedback) {
if (fOptions->audio_feedback) {
fAudioFeedbackCheckBox->SetValue(B_CONTROL_ON);
}
bg->AddChild(fAudioFeedbackCheckBox);
@ -84,16 +84,10 @@ CalcOptionsWindow::CalcOptionsWindow(BRect frame, CalcOptions *options)
CalcOptionsWindow::~CalcOptionsWindow()
{
// auto num-lock
if (fAutoNumLockCheckBox->Value() == B_CONTROL_ON)
fOptions->mAutoNumLock = true;
else
fOptions->mAutoNumLock = false;
fOptions->auto_num_lock = fAutoNumLockCheckBox->Value() == B_CONTROL_ON;
// audio feedback
if (fAudioFeedbackCheckBox->Value() == B_CONTROL_ON)
fOptions->mAudioFeedback = true;
else
fOptions->mAudioFeedback = false;
fOptions->audio_feedback = fAudioFeedbackCheckBox->Value() == B_CONTROL_ON;
}

View File

@ -426,7 +426,7 @@ CalcView::MakeFocus(bool focused)
{
if (focused) {
// set num lock
if (fOptions->mAutoNumLock) {
if (fOptions->auto_num_lock) {
set_keyboard_locks(B_NUM_LOCK |
(modifiers() & (B_CAPS_LOCK | B_SCROLL_LOCK)));
}
@ -732,7 +732,7 @@ CalcView::_PressKey(int key)
_Evaluate();
} else {
// audio feedback
if (fOptions->mAudioFeedback) {
if (fOptions->audio_feedback) {
BEntry zimp("key.AIFF");
entry_ref zimp_ref;
zimp.GetRef(&zimp_ref);
@ -787,7 +787,7 @@ CalcView::_Evaluate()
}
// audio feedback
if (fOptions->mAudioFeedback) {
if (fOptions->audio_feedback) {
BEntry zimp("zimp.AIFF");
entry_ref zimp_ref;
zimp.GetRef(&zimp_ref);