Launcher: new context option to close all windows#344
Launcher: new context option to close all windows#344moises2657 wants to merge 13 commits intoelementary:mainfrom
Conversation
leolost2605
left a comment
There was a problem hiding this comment.
Hey, once again thank you!
I've added some comments how things could be made a bit cleaner.
In general I would move everything to the app class instead of having it in the launcher. Also instead of adding and removing the action and menuitem you can keep both around and set the action enabled depending on whether the app is running. Then you can add the attribute hidden-when with value action-disabled to your menuitem so that it will automatically be hidden when the action is disabled (see https://valadoc.org/gtk4/Gtk.PopoverMenu.html there's a list of supported attributes).
Co-authored-by: Leonhard <leo.kargl@proton.me>
Co-authored-by: Leonhard <leo.kargl@proton.me>
| LauncherManager.get_default ().sync_pinned (); | ||
| }); | ||
|
|
||
| var close_item = new GLib.MenuItem (_(CLOSE_WINDOWS_LABEL), ACTION_PREFIX + CLOSE_WINDOWS_ACTION); |
There was a problem hiding this comment.
You shouldn't add Close All Windows as a constant, it's untranslatable
There was a problem hiding this comment.
Well, one can if it is marked as N_,
So it has to be:
private const string CLOSE_WINDOWS_LABEL = N_("Close All Windows");There was a problem hiding this comment.
but I don't see the benefit of a constant here
New context option to close all windows of an app on the dock:
elementary/gala#2196