summaryrefslogtreecommitdiff
path: root/indra/newview/llkeyconflict.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-12-15 18:28:43 +0800
committerErik Kundiman <erik@megapahit.org>2023-12-15 18:28:43 +0800
commit91b49c8bfa061f3d3b8601d5398b1889a9e31850 (patch)
tree98adc151491a2bee51a70cf7dd37de21d4f32bb3 /indra/newview/llkeyconflict.cpp
parent0cce0b8149e049161ab17f1c608ded2d6cc12b0e (diff)
parenta80e3fe4191aee87c566937953d52fa6498b7f32 (diff)
Merge tag '7.1.1-release'
source for viewer 7.1.1.7039128750
Diffstat (limited to 'indra/newview/llkeyconflict.cpp')
-rw-r--r--indra/newview/llkeyconflict.cpp38
1 files changed, 2 insertions, 36 deletions
diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp
index 60f8aca94c..4a0ee8fd0c 100644
--- a/indra/newview/llkeyconflict.cpp
+++ b/indra/newview/llkeyconflict.cpp
@@ -74,40 +74,6 @@ std::string string_from_mask(MASK mask)
return res;
}
-std::string string_from_mouse(EMouseClickType click, bool translate)
-{
- std::string res;
- switch (click)
- {
- case CLICK_LEFT:
- res = "LMB";
- break;
- case CLICK_MIDDLE:
- res = "MMB";
- break;
- case CLICK_RIGHT:
- res = "RMB";
- break;
- case CLICK_BUTTON4:
- res = "MB4";
- break;
- case CLICK_BUTTON5:
- res = "MB5";
- break;
- case CLICK_DOUBLELEFT:
- res = "Double LMB";
- break;
- default:
- break;
- }
-
- if (translate && !res.empty())
- {
- res = LLTrans::getString(res);
- }
- return res;
-}
-
// LLKeyConflictHandler
S32 LLKeyConflictHandler::sTemporaryFileUseCount = 0;
@@ -270,7 +236,7 @@ std::string LLKeyConflictHandler::getStringFromKeyData(const LLKeyData& keydata)
result = LLKeyboard::stringFromAccelerator(keydata.mMask);
}
- result += string_from_mouse(keydata.mMouse, true);
+ result += LLKeyboard::stringFromMouse(keydata.mMouse);
return result;
}
@@ -545,7 +511,7 @@ void LLKeyConflictHandler::saveToSettings(bool temporary)
{
// set() because 'optional', for compatibility purposes
// just copy old keys.xml and rename to key_bindings.xml, it should work
- binding.mouse.set(string_from_mouse(data.mMouse, false), true);
+ binding.mouse.set(LLKeyboard::stringFromMouse(data.mMouse, false), true);
}
binding.command = iter->first;
mode.bindings.add(binding);