-
Notifications
You must be signed in to change notification settings - Fork 462
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
Allow to disable an icon in the dock during updates #2240
Conversation
For the new RAA we need to be able to mark an icon as "disabled" while it is being updated. The current Unity LauncherAPI (https://wiki.ubuntu.com/Unity/LauncherAPI) doesn't support this, so this patch adds an extra option for this. https://docs.google.com/document/d/1--DgBRl6AqNiyjW_luOjl1dDzsIZPlF0Ukc7INW9_XQ
d95a064
to
fe37790
Compare
if (this.updating) | ||
icon.set_opacity(128); | ||
else | ||
icon.set_opacity(255); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if these would be better as set_opacity_override
, so as to prevent losing any previous custom opacity value. But I won't block on that -- it would only hurt the dock itself if such a loss ever happens so we'll deal with that later.
this.connect('notify::updating', () => { | ||
const icon = this.icon._iconBin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For next time, I think it would have been nicer to use this.bind_property_full
.
However, I feel this code should be better to be as part of AppIconIndicators.IndicatorBase
, no?
Since the appIcon
is only the logical representation of an icon, shouldn't touch its look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I see the code with more detail, I don't think so: this code is in DockAbstractAppIcon, from which DockAppIcon and DockLocationAppIcon. Maybe it can be moved to DockAppIcon, but surely it has to be there, because it is what manages the appearance of the icon itself. IndicatorBase only manages the things that are over the icon. In fact, IndicatorBase manages the "updating" notification, and relays it to the corresponding DockAbstractAppIcon, which, I think, is the right way.
For the new RAA we need to be able to mark an icon as "disabled" while it is being updated. The current Unity LauncherAPI (https://wiki.ubuntu.com/Unity/LauncherAPI) doesn't support this, so this patch adds an extra option for this.