Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mtwebster
Copy link
Member

@mtwebster mtwebster requested a review from Copilot April 15, 2025 19:11
Copy link

@Copilot Copilot AI left a 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)
Copy link
Preview

Copilot AI Apr 15, 2025

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.

@mtwebster mtwebster force-pushed the modernize-kb-layouts branch from 49467fa to 93b7b95 Compare April 15, 2025 19:14
@mtwebster mtwebster requested a review from Copilot April 15, 2025 19:14
Copy link

@Copilot Copilot AI left a 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):

@mtwebster mtwebster force-pushed the modernize-kb-layouts branch from 93b7b95 to adb4a1e Compare May 21, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant