Skip to content
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

Fix duplicate Ctrl+N shortcut on main window #1221

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

Conversation

user202729
Copy link
Member

Summary of changes

Initially, there are two buttons with shortcut control+N on the main window -- the add translation button on the toolbar, and the one in the dictionary editor (which adds the translation on the selected dictionary; if there's no selected dictionary it has the same behavior as the other button.

I think that's more useful, so I remove the shortcut for the button; otherwise to remove the other shortcut do this

--- a/plover/gui_qt/dictionaries_widget.ui
+++ b/plover/gui_qt/dictionaries_widget.ui
@@ -143,9 +143,6 @@
    <property name="toolTip">
     <string>Add a new translation</string>
    </property>
-   <property name="shortcut">
-    <string>Ctrl+N</string>
-   </property>
   </action>
   <action name="action_MoveDictionariesUp">
    <property name="icon">

Closes #1215 .

Pull Request Checklist

  • Changes have tests
  • News fragment added in news.d. See documentation for details

@user202729
Copy link
Member Author

user202729 commented Apr 4, 2021

There are some related issues...

  • end-to-end test?

  • If spectra lexer is installed, control+L is still broken.

    Plover should check if there's any shortcut duplicate programmatically? (which might not be that easy, because not all shortcuts are set programmatically, and there are internationalization)

  • Now the ctrl+N shortcut text on the tools window disappeared.

    An alternative is to make both buttons add a translation to the currently selected dictionary.

  • The Ctrl+O shortcut (corresponding to the (+) button on the dictionary widget) cannot be seen anywhere.

    Should the shortcut be added to the tooltip (programmatically or manually)?

@benoit-pierre
Copy link
Member

Initially, there are two buttons with shortcut control+N on the main window -- the add translation button on the toolbar, and the one in the dictionary editor...

You mean the dictionaries widget, as opposed to the real editor. And which toolbars? This is confusing... The dictionaries widget toolbar has an "add translation" button (for the selected dictionary, otherwise the favorite), the application has another "add translation" button (selecting the favorite dictionary). Since the translation dialog allows selecting the target dictionary anyway, maybe we should just drop the dictionaries widget button.

Plover should check if there's any shortcut duplicate programmatically? (which might not be that easy, because not all shortcuts are set programmatically, and there are internationalization)

Yeah... Or maybe we just drop those shortcuts? When I created the new interface, I added shortcuts, because that's what regular applications do, but Plover is not a standard application: most of the time when you're using it, you not interacting with the interface. And when you do need to interact with it, commands like {PLOVER:LOOKUP} are a better alternative.

@user202729
Copy link
Member Author

You see, there's no user guide for Plover documentation, so I just guess what the name is -- but yes it's these two buttons.

I think that the in the dictionary widget is a little more convenient because it adds to the currently selected dictionary, but it's up to you.

Also what about the shortcut to open other tools? (like the spectra lexer) is there a dictionary entry to open it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tool keyboard shortcuts not working on Windows
2 participants