napari / napari-plugin-manager

The napari plugin installation dialog and associated machinery
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Add shortcut to close plugin manager dialog and quit application #64

Open goanpeca opened 1 week ago

goanpeca commented 1 week ago

Fixes #38 Fixes #4

Add shortcut to close plugin manager dialog on mac systems (Cmd+W) and quit application on all other systems (Ctrl+Q)

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.05%. Comparing base (d8d7f5d) to head (864176a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #64 +/- ## ========================================== + Coverage 86.80% 87.05% +0.25% ========================================== Files 9 9 Lines 1334 1360 +26 ========================================== + Hits 1158 1184 +26 Misses 176 176 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Czaki commented 1 week ago

Why only on macos system?

goanpeca commented 1 week ago

Why only on macos system?

Hi @Czaki, the Cmd+W is a mac only thing as far as I know.

The quit application one, does work for all systems

Czaki commented 1 week ago

it is for all system

obraz

There was a bug in the past that removed shortcut, but on main it is for all os.

psobolewskiPhD commented 1 week ago

Command-W works nice! Huge improvement! And yea, I think Control-W is also used on Windows to close stuff like tabs, so I'd make that one work on all systems to close the dialog. I used Command-Q, which worked, but I was somewhat surprised it just straight quit, without the usual warning/confirmation.

I think it would be best to have that confirmation/dialog for consistency, so users arn't shocked like I was and lose data. But frankly, we could drop that -- it's not odd to have to close the dialog before quitting application, I don't think.

Czaki commented 1 week ago

I used Command-Q, which worked, but I was somewhat surprised it just straight quit, without the usual warning/confirmation.

Command+W/Q do not ask for confirmation if there is no layer.

psobolewskiPhD commented 1 week ago

running napari from terminal and then Command-Q I get asked to confirm.

Czaki commented 1 week ago

running napari from terminal and then Command-Q I get asked to confirm.

You are right, for command+Q should always be a confirmation if not disabled in settings...

jaimergp commented 1 week ago

Isn't the usual Quit shortcut Alt+F4 in Windows? Or is that no longer recommended?

Czaki commented 1 week ago

Isn't the usual Quit shortcut Alt+F4 in Windows? Or is that no longer recommended?

Alt + F4 is system shoutcut, not application one.

goanpeca commented 1 week ago

Hello team, thanks for testing and comments, will leave then the shortcut for all systems, and check about the confirmation dialog :)

Cheers!