Skip to content

Conversation

@mtwebster
Copy link
Member

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

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

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.sources is initiated with = [] just above.

@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 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
@mtwebster mtwebster force-pushed the modernize-kb-layouts branch from fac2dff to f06e8ad Compare August 3, 2025 15:29
@clefebvre clefebvre merged commit be49027 into master Sep 23, 2025
2 checks passed
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.

3 participants