-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set layout based on system's layout on first connection, fix #1197 #1245
base: master
Are you sure you want to change the base?
Conversation
|
||
void KeyboardLayoutDetectorMac::fillKeyboardLayoutMap() | ||
{ | ||
m_layoutMap = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that won't work, you need to pick the (MacOS) layouts
#include "DeviceConnectionChecker.h" | ||
#include "AppGui.h" | ||
|
||
const QString DeviceConnectionChecker::CONNECTED_DEVICES_GROUP = "ConnectedDevices/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, we didn't have a similar service before? for example, in our logic to check the change number for a given user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have DbExportsRegistry: https://github.com/mooltipass/moolticute/blob/master/src/DbExportsRegistry.cpp
It is embedded in DbBackup codes, so was not able to reuse it, it writes dbExportsRegistry.ini with the changeNumbers for given cardId.
I would be able to use that file, but I believe a new connectedDevices.ini much more clean.
@@ -261,6 +261,7 @@ void SettingsGuiHelper::updateParameters(const QJsonObject &data) | |||
val = data["value"].toBool(); | |||
} | |||
m_settings->updateParam(m_settings->getParamId(param), val); | |||
m_mw->checkSettingsChanged(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, what's that for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/utils/KeyboardLayoutDetector.cpp:23 I am sending parameters directly for layouts, it updates these parameters in daemon and send back param_changed message, which calls this function and setting UI element to correct value (in this case the layout). However settingsChanged is not checked and due to the new layout Save/Cancel buttons are displayed without this call.
Add tracking for first device connection. (based on serial number)
When device is connected first time to the given system, set layouts according to system's layout.