chore: fix typos in variable names and log messages
This commit is contained in:
committed by
Chris Rizzitello
parent
1157bff34b
commit
e7eb324f16
@ -106,7 +106,7 @@ std::string AppUtilUnix::getCurrentLanguageCode()
|
||||
|
||||
XkbStateRec state;
|
||||
XkbGetState(display, XkbUseCoreKbd, &state);
|
||||
auto nedeedGroupIndex = static_cast<int>(state.group);
|
||||
auto neededGroupIndex = static_cast<int>(state.group);
|
||||
|
||||
size_t groupIdx = 0;
|
||||
size_t groupStartI = 0;
|
||||
@ -118,7 +118,7 @@ std::string AppUtilUnix::getCurrentLanguageCode()
|
||||
if (auto group = rawLayouts.substr(groupStartI, strI - groupStartI);
|
||||
group.find("group", 0, 5) == std::string::npos && group.find("inet", 0, 4) == std::string::npos &&
|
||||
group.find("pc", 0, 2) == std::string::npos) {
|
||||
if (nedeedGroupIndex == groupIdx) {
|
||||
if (neededGroupIndex == groupIdx) {
|
||||
result = group.substr(0, std::min(group.find('(', 0), group.find(':', 0)));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -867,18 +867,18 @@ void OSXKeyState::setGroup(int32_t group)
|
||||
{
|
||||
TISInputSourceRef keyboardLayout = (TISInputSourceRef)CFArrayGetValueAtIndex(m_groups.get(), group);
|
||||
if (!keyboardLayout) {
|
||||
LOG_WARN("nedeed keyboard layout is null");
|
||||
LOG_WARN("needed keyboard layout is null");
|
||||
return;
|
||||
}
|
||||
auto canBeSetted = (CFBooleanRef
|
||||
)TISGetInputSourceProperty(TISCopyCurrentKeyboardInputSource(), kTISPropertyInputSourceIsEnableCapable);
|
||||
if (!canBeSetted) {
|
||||
LOG_WARN("nedeed keyboard layout is disabled for programmatically selection");
|
||||
LOG_WARN("needed keyboard layout is disabled for programmatically selection");
|
||||
return;
|
||||
}
|
||||
|
||||
if (TISSelectInputSource(keyboardLayout) != noErr) {
|
||||
LOG_WARN("failed to set nedeed keyboard layout");
|
||||
LOG_WARN("failed to set needed keyboard layout");
|
||||
}
|
||||
|
||||
LOG_DEBUG1("keyboard layout change to %d", group);
|
||||
|
||||
@ -108,7 +108,7 @@ private:
|
||||
|
||||
//! Create and send language change request to \p group by DBus interface
|
||||
/*!
|
||||
Returns the existance of nedeed DBus interface.
|
||||
Returns the existence of needed DBus interface.
|
||||
*/
|
||||
bool setCurrentLanguageWithDBus(int32_t group) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user