You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A more readable representation of the keyboard shortcuts would require a more refined approach.
For a future pull request, I propose creating a KeyCombination struct that contains the key and the modifiers only, and is easy to create and convert to the strings that Gtk needs and to human-readable strings, and have Command store that instead of what it is storing now.
Thanks, the changes here look good.
I'm not sure if the KeyCombination suggestion is going to make things simpler? I think all we need is just a variant of CtrlLabel () to produce the label for a shortcut, which seems pretty straightforward
You are right @cameronwhite . I am not that acquainted with Gtk, so I was not aware of what Gtk.Functions.AcceleratorGetLabel did until I looked at CtrlLabel.
I could do what you suggest. The main issue is getting hold of a SystemManager (for deciding if we want <Meta> or <Control>), which unfortunately requires changes in many files to do properly, but I could introduce a PintaCore reference and get rid of it in a future pull request. Or I could leave it as <Primary> for now. Update: see below.
I just did what you suggested @cameronwhite. The function Gtk.Functions.AcceleratorGetLabel shows the key combinations in a readable way, and it converts the <Primary> key to the right one for the OS in question (at least from what I could see by testing my changes on Ubuntu, namely, showing the primary key as 'Ctrl').
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A further step towards realizing #1408
A more readable representation of the keyboard shortcuts would require a more refined approach.
For a future pull request, I propose creating a
KeyCombinationstruct that contains the key and the modifiers only, and is easy to create and convert to the strings that Gtk needs and to human-readable strings, and haveCommandstore that instead of what it is storing now.