Skip to content

Conversation

@mufeedali
Copy link
Member

If I'm being honest, I don't quite like that Adw.ShortcutsDialog and related classes are so inflexible... I could only "add" the Translate shortcut item. But that means it's always at the end of the list.

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 migrates the keyboard shortcuts dialog from a custom Gtk.ShortcutsWindow implementation to libadwaita 1.8's Adw.ShortcutsDialog. The migration involves removing the custom Python class and UI blueprint files, and replacing them with a simpler blueprint definition that is loaded dynamically when needed.

Changes:

  • Replaced custom DialectShortcutsWindow with Adw.ShortcutsDialog loaded from resources
  • Moved shortcuts action from window-level to application-level (win.show-help-overlayapp.shortcuts)
  • Added dynamic insertion of the "Translate" shortcut when live translation is disabled

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
dialect/window.py Removed import and initialization of custom shortcuts window
dialect/window.blp Changed menu action from win.show-help-overlay to app.shortcuts; added formatting improvements
dialect/shortcuts.py Deleted custom shortcuts window implementation
dialect/shortcuts.blp Deleted old blueprint definition for custom shortcuts window
dialect/shortcuts-dialog.blp Added new blueprint definition using Adw.ShortcutsDialog and Adw.ShortcutsItem
dialect/main.py Added shortcuts action handler that loads dialog from resources and dynamically adds translate shortcut
dialect/meson.build Updated blueprint file reference from shortcuts.blp to shortcuts-dialog.blp
dialect/dialect.gresource.xml Updated resource reference and applied consistent formatting to file entries

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants