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

Support more Unity features (quicklist, urgent properties) #1245

Merged
merged 4 commits into from
Sep 10, 2020

Conversation

rhendric
Copy link
Contributor

This adds support for the two properties of a libunity LauncherEntry object not yet supported: "quicklist" and "urgent". Quicklist entries are added to the right-click menu of the launcher as dynamic menu items. The urgent flag, if set, gives the icon a short dancing animation to call attention to it. These features don't seem to be widely used by applications, but there's a bit of a chicken-and-egg problem here; why would application authors spend time writing code to use them if they aren't supported by the desktop?

I encountered some trouble with the libunity communication, and I also had some trouble understanding the intent of the original libunity integrating code, so I took the liberty of refactoring it into a pattern that, among other advantages, is more robust to multiple DBus applications contending for the same LauncherEntry. Hopefully you see it as an improvement too; I can try to back it out if not, but it did make adding these two features much easier.

I've been using this branch for the better part of a year now, and tested the new features with my own custom applications; it all has been working quite well for me. I hope it does some good for someone else.

rhendric added 3 commits May 27, 2020 20:46
This fixes some bad behavior I've observed with Unity badges getting
stuck in an invalid state. The new code is much more graceful about
event ordering and handing off control between multiple processes
contending for a single launcher icon.
This adds support for the 'urgent' property from the Unity launcher API.
Launcher icons marked as urgent get a short "dance" animation while the
dock is visible.
@3v1n0
Copy link
Collaborator

3v1n0 commented Jul 22, 2020

Oh, nice work... I will review this a bit later in the cycle.

But looks like a good thing to do and in my list as well.

Copy link
Collaborator

@3v1n0 3v1n0 left a comment

Choose a reason for hiding this comment

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

Overall this looks great, I've been through the code and this seems to do things as they were expected to be.

So approving.

I've some ideal changes to do though:

  • Make importing DBusmenu dynamic (may not be available in other distros than ubuntu)
  • Change the animation mechanism (doesn't work in 3.38, but mostly could be simplified).

However, I've implemented both as ideally I was thinking about in https://github.com/3v1n0/dash-to-dock/commits/unity-features-improvements

Feel free to propose another MR if you have better ideas about.
Merging this for now :)

appIcons.js Show resolved Hide resolved
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