KEYMAPPER: Rename inherit flag to transparent
Less confusing
This commit is contained in:
parent
73160e54b4
commit
82e0900678
3 changed files with 14 additions and 14 deletions
|
@ -143,7 +143,7 @@ Keymap *Keymapper::getKeymap(const String& name, bool *globalReturn) {
|
|||
return keymap;
|
||||
}
|
||||
|
||||
bool Keymapper::pushKeymap(const String& name, bool inherit) {
|
||||
bool Keymapper::pushKeymap(const String& name, bool transparent) {
|
||||
bool global;
|
||||
Keymap *newMap = getKeymap(name, &global);
|
||||
|
||||
|
@ -152,13 +152,13 @@ bool Keymapper::pushKeymap(const String& name, bool inherit) {
|
|||
return false;
|
||||
}
|
||||
|
||||
pushKeymap(newMap, inherit, global);
|
||||
pushKeymap(newMap, transparent, global);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Keymapper::pushKeymap(Keymap *newMap, bool inherit, bool global) {
|
||||
MapRecord mr = {newMap, inherit, global};
|
||||
void Keymapper::pushKeymap(Keymap *newMap, bool transparent, bool global) {
|
||||
MapRecord mr = {newMap, transparent, global};
|
||||
|
||||
_activeMaps.push(mr);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ bool Keymapper::mapKey(const KeyState& key, bool keyDown) {
|
|||
debug(5, "Keymapper::mapKey keymap: %s", mr.keymap->getName().c_str());
|
||||
action = mr.keymap->getMappedAction(key);
|
||||
|
||||
if (action || !mr.inherit)
|
||||
if (action || !mr.transparent)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
|
||||
struct MapRecord {
|
||||
Keymap* keymap;
|
||||
bool inherit;
|
||||
bool transparent;
|
||||
bool global;
|
||||
};
|
||||
|
||||
|
@ -121,12 +121,12 @@ public:
|
|||
/**
|
||||
* Push a new keymap to the top of the active stack, activating
|
||||
* it for use.
|
||||
* @param name name of the keymap to push
|
||||
* @param inherit if true keymapper will iterate down the
|
||||
* stack if it cannot find a key in the new map
|
||||
* @return true if succesful
|
||||
* @param name name of the keymap to push
|
||||
* @param transparent if true keymapper will iterate down the
|
||||
* stack if it cannot find a key in the new map
|
||||
* @return true if succesful
|
||||
*/
|
||||
bool pushKeymap(const String& name, bool inherit = false);
|
||||
bool pushKeymap(const String& name, bool transparent = false);
|
||||
|
||||
/**
|
||||
* Pop the top keymap off the active stack.
|
||||
|
@ -182,7 +182,7 @@ private:
|
|||
|
||||
HardwareKeySet *_hardwareKeys;
|
||||
|
||||
void pushKeymap(Keymap *newMap, bool inherit, bool global);
|
||||
void pushKeymap(Keymap *newMap, bool transparent, bool global);
|
||||
|
||||
Action *getAction(const KeyState& key);
|
||||
void executeAction(const Action *act, bool keyDown);
|
||||
|
|
|
@ -327,7 +327,7 @@ void RemapDialog::loadKeymap() {
|
|||
}
|
||||
|
||||
// loop through remaining finding mappings for unmapped keys
|
||||
if (top.inherit && topIndex >= 0) {
|
||||
if (top.transparent && topIndex >= 0) {
|
||||
for (int i = topIndex - 1; i >= 0; --i) {
|
||||
Keymapper::MapRecord mr = activeKeymaps[i];
|
||||
debug(3, "RemapDialog::loadKeymap keymap: %s", mr.keymap->getName().c_str());
|
||||
|
@ -345,7 +345,7 @@ void RemapDialog::loadKeymap() {
|
|||
}
|
||||
}
|
||||
|
||||
if (mr.inherit == false || freeKeys.empty())
|
||||
if (mr.transparent == false || freeKeys.empty())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue