-
Notifications
You must be signed in to change notification settings - Fork 163
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
Mapping filter control with dedicated Gtk.ListBox filter manager #628
base: beta
Are you sure you want to change the base?
Conversation
c878327
to
d06dd8d
Compare
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.
Thanks a lot for your contributions! :)
A few points/thoughts from my side:
- I would change the gui like this:
See https://github.com/sezanzeb/input-remapper/tree/628-gui-suggestion for the glade file that produces this
-
I would like the search to also search through the selected target, the programmed key/macro and searching for ABS_X should find analog output that is set to ABS_X. I would be totally fine with having this in a separate future PR.
-
Is the case sensitive search toggle really necessary? I'm not so sure that I would ever need a case-sensitive search here.
4.I think the toggle did not switch to the active state when clicking it, or is that just happening on my end due to the theme or something? EDIT: It was the theme
Co-authored-by: Tobi <[email protected]>
Co-authored-by: Tobi <[email protected]>
…input-remapper into feature/mapping-filter-generic
|
allright I found the "linked" class when I used the gtk inspector on quod libet, it has a small dropdown button to the right of its search. |
I also added support for an explicit GTK_PATH in this PR now. This allows me to start the local development app with:
so that it will load the latest local files from I test my changes this way. First I start the app. Then I press ESC on the pkexec dialog. And then I try my changes in the GUI. |
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.
Thanks. -R sounds handy for development.
Lets just move those two comments into docstrings.
Is this ready to merge then?
Co-authored-by: Tobi <[email protected]>
Ready to be merged from my side. P.S. @sezanzeb I have sent you an email ;) |
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 want to make the 2.0 release soon.
Do you have any plans regarding the search looking through the outputs as well already? If not, I'd probably merge this after 2.0.
inputremapper/gui/reader_service.py
Outdated
raise Exception(f"Failed to pkexec the reader-service, code {exit_code}") | ||
ex = Exception(f"Failed to pkexec the reader-service, code {exit_code}") | ||
if ingore_errors: | ||
logger.warn(ex) |
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.
Some people might have very permissive setups by being member of the "device" user group or something. In that case, it might make sense to at least try to run input-remapper-control --command start-reader-service{debug}
without pkexec as a regular 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.
Actually, I would like to move better pkexec handling to another PR and actually avoid having a need for a -R
flag (or similar).
Here is what I would be looking for in a later change. But this fails many tests, so I guess the story is bigger than I thought.
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.
the "device" user group or something
I think it's called "input"
If the -R flag might be deprecated soon already, I wouldn't add it now
I think users being in the input group is the exception. I don't know right now how evdev behaves when an unprivileged user tries to use InputDevice objects and such. I guess you'd have to look out for any permission error and then exit. I would also use a special exit code for this >= 3 and then check for that one specifically before deciding to use pkexec.
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.
OK, I will remove the -R
now but will leave an undocumented env var for development. As said, let's discuss better privilege handling separately.
Not sure this a good idea without more entry controls. The names in the list are defined by the input only; unless renamed manually. We would need more buttons, I guess: But then the UI seems to get more complicated. The user would need to know that he is searching through text that is not visible in the list; only the first output will be shown on the right. Let's have a discussion about better filters later. If you want this in a 2.0, I would say we stay minimal with the change:
I can do these changes tomorrow, after that I am off for the weekend and will also have less time next week. |
13919a5
to
1f9cf3f
Compare
I think for now this makes the most sense. Searching through the whole mapping would require us to do the filtering in the data manager. I think that can be done by filtering inside the |
1f9cf3f
to
fe9dd37
Compare
agreed. I think I am done with this PR. If there are smaller issues, I can address them next week. But I will not have time for major changes in the next days. |
Finding something I'm looking for is easy when I can see it. The output is not visible unless I click on a mapping. Finding something that maps to a specific key is impossible unless I click on every mapping to look through every one of them. I think a search only makes sense when it also filters through the output. And I wouldn't make an extra window for it. |
If you want to make an advanced search, then the advanced search would be tweakable to only look for specific things, while the regular search searches everything. |
This is a followup on #621. It adds
See the screens in #621