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
[python] masking support for numeric input #17661
Conversation
Thanks @ronie - we'll give it a test! |
/// | xbmcgui.INPUT_TYPE_PASSWORD | (input is masked) | ||
/// | xbmcgui.INPUT_TYPE_PASSWORD_MD5 | (input is masked, return md5 hash of input) | ||
/// | xbmcgui.INPUT_TYPE_SECONDS | (format: SS or MM:SS or HH:MM:SS or MM min) | ||
/// | xbmcgui.INPUT_TYPE_PASSWORD_NUMBER_VERIFY_NEW | (numeric input is masked) |
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.
Can you explain why the "verify new" in the constant name? Why not simply INPUT_TYPE_NUMBER_MASKED?
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.
these are 1:1 mappings to:
xbmc/xbmc/guilib/GUIEditControl.h
Lines 26 to 42 in d3a641f
class CGUIEditControl : public CGUIButtonControl | |
{ | |
public: | |
enum INPUT_TYPE { | |
INPUT_TYPE_READONLY = -1, | |
INPUT_TYPE_TEXT = 0, | |
INPUT_TYPE_NUMBER, | |
INPUT_TYPE_SECONDS, | |
INPUT_TYPE_TIME, | |
INPUT_TYPE_DATE, | |
INPUT_TYPE_IPADDRESS, | |
INPUT_TYPE_PASSWORD, | |
INPUT_TYPE_PASSWORD_MD5, | |
INPUT_TYPE_SEARCH, | |
INPUT_TYPE_FILTER, | |
INPUT_TYPE_PASSWORD_NUMBER_VERIFY_NEW | |
}; |
guess the 'verify' bit relates to the fact you need to enter a password twice when setting it, the second time is done to verify you didn't make a typo.
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.
I guess what I really need, which I suspect is going to be more work, is a new INPUT_TYPE_PASSWORD_NUMBER
that would accept only masked digits and that would return the entered digits. Ideally with a configurable heading. 😄
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.
Maybe remove then direct on description text the (...)
, think is from time where it was not included inside a table, the old:
xbmcgui.INPUT_TYPE_TEXT (standard keyboard)
Many thanks for this, @ronie, however this PR isn't quite what I had in mind. The It's entirely possible Maybe a |
i agree with MilhouseVH, so a masked numeric input (without verify) is required, would be the most useful method |
thanx @MilhouseVH / @CastagnaIT i now get what you were looking for. i've added another option to mask regular numeric input: please test and let me know if i got it right this time ;-) |
Thanks @ronie - this PR is working perfectly now for my use-case! |
I'll include this for testing in my LibreELEC nightly builds, assuming it doesn't merge beforehand. Thanks again! |
Tested is working good thanks! |
jenkins build this please |
Thanks @ronie! |
[python] masking support for numeric input
[python] masking support for numeric input
[python] masking support for numeric input
[python] masking support for numeric input
[python] masking support for numeric input
[python] masking support for numeric input
[python] masking support for numeric input
[python] masking support for numeric input
[python] masking support for numeric input
[python] masking support for numeric input
[python] masking support for numeric input
while the option to mask text input is available in python (ie. when entering a password), it was lacking support for numeric input.
this PR adds numeric masking support to:
@MilhouseVH