-
Notifications
You must be signed in to change notification settings - Fork 88
Handle layout switching thru cinnamon, remove use of XApp. #477
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
base: master
Are you sure you want to change the base?
Conversation
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.
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- debian/control: Language not supported
for source in sources: | ||
input_source = CurrentInputSource(source) | ||
if input_source.type == "xkb": | ||
self.sources.append(input_source) |
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 get_input_sources_callback method appends new input sources without clearing the existing list, which may cause duplicate entries on subsequent updates. Consider clearing self.sources (e.g., self.sources.clear()) before appending new entries.
Copilot uses AI. Check for mistakes.
49467fa
to
93b7b95
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.
Pull Request Overview
This PR aims to update the layout switching mechanism by removing dependency on XApp and instead using Cinnamon’s dbus interface for managing keyboard layouts. Key changes include removing XAppKbdLayoutController usage, refactoring layout switching logic in the screensaver password entry, and implementing a new CinnamonClient to interact with Cinnamon’s input sources.
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/singletons.py | Removed XAppKbdLayoutController and updated layout source usage; refactored event handlers. |
src/passwordEntry.py | Updated layout icon rendering and input source change logic using CinnamonClient. |
src/dbusdepot/cinnamonClient.py | Added signals for input source changes and implemented input source management. |
Files not reviewed (1)
- debian/control: Language not supported
Comments suppressed due to low confidence (2)
src/singletons.py:167
- [nitpick] The parameter name 'cinnamon' shadows the instance attribute 'self.cinnamon', which could lead to confusion. Consider renaming the parameter to avoid ambiguity.
def on_current_layout_changed(self, cinnamon):
src/singletons.py:176
- [nitpick] Similarly, the parameter 'cinnamon' shadows 'self.cinnamon'. Renaming the parameter (or not using it if unnecessary) would improve clarity.
def on_layout_sources_changed(self, cinnamon):
93b7b95
to
adb4a1e
Compare
ref: linuxmint/cinnamon#12758