[Scummvm-cvs-logs] scummvm master -> 82e0900678ab755256e141e15dd58a99090388f1

tsoliman tarek at bashasoliman.com
Sun Jan 8 04:13:10 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
82e0900678 KEYMAPPER: Rename inherit flag to transparent


Commit: 82e0900678ab755256e141e15dd58a99090388f1
    https://github.com/scummvm/scummvm/commit/82e0900678ab755256e141e15dd58a99090388f1
Author: Tarek Soliman (tsoliman at scummvm.org)
Date: 2012-01-07T19:10:05-08:00

Commit Message:
KEYMAPPER: Rename inherit flag to transparent

Less confusing

Changed paths:
    backends/keymapper/keymapper.cpp
    backends/keymapper/keymapper.h
    backends/keymapper/remap-dialog.cpp



diff --git a/backends/keymapper/keymapper.cpp b/backends/keymapper/keymapper.cpp
index 025e917..f950b1f 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 d38109f..90d9581 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 c0654fc..5c339f8 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;
 			}
 		}






More information about the Scummvm-git-logs mailing list