Keymap: Hide/show warning/stop icon views
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2011-2013 Haiku Inc. All rights reserved.
|
* Copyright 2011-2014 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -341,6 +341,8 @@ ModifierKeysWindow::ModifierKeysWindow()
|
|||||||
|
|
||||||
_MarkMenuItems();
|
_MarkMenuItems();
|
||||||
_ValidateDuplicateKeys();
|
_ValidateDuplicateKeys();
|
||||||
|
|
||||||
|
PostMessage(kMsgHideShowIcons);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -398,6 +400,7 @@ ModifierKeysWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
_MarkMenuItems();
|
_MarkMenuItems();
|
||||||
_ValidateDuplicateKeys();
|
_ValidateDuplicateKeys();
|
||||||
|
_HideShowIcons();
|
||||||
|
|
||||||
// enable/disable revert button
|
// enable/disable revert button
|
||||||
fRevertButton->SetEnabled(
|
fRevertButton->SetEnabled(
|
||||||
@@ -470,6 +473,7 @@ ModifierKeysWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
_MarkMenuItems();
|
_MarkMenuItems();
|
||||||
_ValidateDuplicateKeys();
|
_ValidateDuplicateKeys();
|
||||||
|
_HideShowIcons();
|
||||||
|
|
||||||
fRevertButton->SetEnabled(false);
|
fRevertButton->SetEnabled(false);
|
||||||
break;
|
break;
|
||||||
@@ -839,3 +843,40 @@ ModifierKeysWindow::_DuplicateKeys()
|
|||||||
|
|
||||||
return duplicateMask;
|
return duplicateMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ModifierKeysWindow::_HideShowIcons()
|
||||||
|
{
|
||||||
|
if (fShiftConflictView->Icon() == NULL) {
|
||||||
|
while (!fShiftConflictView->IsHidden())
|
||||||
|
fShiftConflictView->Hide();
|
||||||
|
} else {
|
||||||
|
while (fShiftConflictView->IsHidden())
|
||||||
|
fShiftConflictView->Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fControlConflictView->Icon() == NULL) {
|
||||||
|
while (!fControlConflictView->IsHidden())
|
||||||
|
fControlConflictView->Hide();
|
||||||
|
} else {
|
||||||
|
while (fControlConflictView->IsHidden())
|
||||||
|
fControlConflictView->Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fOptionConflictView->Icon() == NULL) {
|
||||||
|
while (!fOptionConflictView->IsHidden())
|
||||||
|
fOptionConflictView->Hide();
|
||||||
|
} else {
|
||||||
|
while (fOptionConflictView->IsHidden())
|
||||||
|
fOptionConflictView->Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fCommandConflictView->Icon() == NULL) {
|
||||||
|
while (!fCommandConflictView->IsHidden())
|
||||||
|
fCommandConflictView->Hide();
|
||||||
|
} else {
|
||||||
|
while (fCommandConflictView->IsHidden())
|
||||||
|
fCommandConflictView->Show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2011-2013 Haiku Inc. All rights reserved.
|
* Copyright 2011-2014 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -57,6 +57,7 @@ private:
|
|||||||
int32 _LastKey();
|
int32 _LastKey();
|
||||||
void _ValidateDuplicateKeys();
|
void _ValidateDuplicateKeys();
|
||||||
uint32 _DuplicateKeys();
|
uint32 _DuplicateKeys();
|
||||||
|
void _HideShowIcons();
|
||||||
|
|
||||||
BPopUpMenu* fShiftMenu;
|
BPopUpMenu* fShiftMenu;
|
||||||
BPopUpMenu* fControlMenu;
|
BPopUpMenu* fControlMenu;
|
||||||
|
|||||||
Reference in New Issue
Block a user