From 82e0900678ab755256e141e15dd58a99090388f1 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Sat, 7 Jan 2012 21:10:05 -0600 Subject: KEYMAPPER: Rename inherit flag to transparent Less confusing --- backends/keymapper/keymapper.cpp | 10 +++++----- backends/keymapper/keymapper.h | 14 +++++++------- backends/keymapper/remap-dialog.cpp | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/backends/keymapper/keymapper.cpp b/backends/keymapper/keymapper.cpp index 025e917273..f950b1f4a2 100644 --- a/backends/keymapper/keymapper.cpp +++ b/backends/keymapper/keymapper.cpp @@ -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; } diff --git a/backends/keymapper/keymapper.h b/backends/keymapper/keymapper.h index d38109f210..90d9581d91 100644 --- a/backends/keymapper/keymapper.h +++ b/backends/keymapper/keymapper.h @@ -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); diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp index c0654fc0ea..5c339f8c27 100644 --- a/backends/keymapper/remap-dialog.cpp +++ b/backends/keymapper/remap-dialog.cpp @@ -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; } } -- cgit v1.2.3