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

Launcher: new context option to close all windows #344

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

moises2657
Copy link

New context option to close all windows of an app on the dock:

elementary/gala#2196

Copy link
Member

@leolost2605 leolost2605 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

src/Launcher.vala Outdated Show resolved Hide resolved
src/Launcher.vala Outdated Show resolved Hide resolved
src/Launcher.vala Outdated Show resolved Hide resolved
src/Launcher.vala Outdated Show resolved Hide resolved
src/Launcher.vala Outdated Show resolved Hide resolved
@leolost2605 leolost2605 requested a review from a team January 2, 2025 12:55
@moises2657 moises2657 requested a review from leolost2605 January 2, 2025 17:27
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