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

Udeng 2282 refresh awareness implement new scheme #76

Conversation

sergio-costas
Copy link
Contributor

@sergio-costas sergio-costas commented Apr 22, 2024

Implements the new Refresh Awareness protocol.

DONE:

TO DO:

  • add an icon for upper-left notifications corner (it shows a generic icon)
  • add progress bar in the icon on the dock

@sergio-costas sergio-costas force-pushed the UDENG-2282-refresh-awareness-implement-new-scheme branch 3 times, most recently from 2a2dd65 to 8fa4edd Compare April 23, 2024 09:04
@sergio-costas sergio-costas force-pushed the UDENG-2282-refresh-awareness-implement-new-scheme branch from 5c5c3fa to 0e68cbd Compare April 29, 2024 17:43
@sergio-costas sergio-costas marked this pull request as ready for review May 2, 2024 10:11
@sergio-costas
Copy link
Contributor Author

@robert-ancell Should I add support for FreeDesktop.org notifications, or it should be enough with the gnome ones?

@sergio-costas sergio-costas marked this pull request as draft May 2, 2024 13:33
@robert-ancell
Copy link
Collaborator

@robert-ancell Should I add support for FreeDesktop.org notifications, or it should be enough with the gnome ones?

Isn't Gio.Notification doing this for you? You don't seem to be making any explicit fdo/gnome notification calls that I can see.

@sergio-costas
Copy link
Contributor Author

I don't know if Gio.Notification does abstract up to that point... I'll try to do some tests.

@sergio-costas
Copy link
Contributor Author

You are right: it is supported. So nothing to do there, then. Thanks!

This patch implements the new Refresh Awareness system. It
requires several patches to snapd which, at the moment of
sending this, are still awaiting for being merged; but this
code has several failsafes to ensure that it does work with
the current snapd, although without some bells nor whisels
(specifically, neither application icon nor application
"cute" name).
@sergio-costas sergio-costas force-pushed the UDENG-2282-refresh-awareness-implement-new-scheme branch from ca2c692 to a986672 Compare May 9, 2024 13:23
@sergio-costas
Copy link
Contributor Author

sergio-costas commented May 9, 2024

@robert-ancell This is ready, with the exception of an icon for the application itself (because the notifications show the application icon too, in the top-left corner).

@sergio-costas sergio-costas marked this pull request as ready for review May 9, 2024 13:31
This patch ensures that the correct icon is shown in the dock.
@sergio-costas
Copy link
Contributor Author

Also, it is "compatible" with the current snapd version. This is: it won't be as "cute" as it will be when all the patches have landed in snapd, but it works. It doesn't show the application icon or the "visible name", and the "application is ready" notification is shown twice, but it works.

@sergio-costas
Copy link
Contributor Author

Also, the desktop-launch interface is there just for when those patches land, but... I still don't know if that will be the definitive interface for reading the .desktop files, or will have to use a different one. If you want to launch this "as-is", maybe it would be a good idea to remove it until that patch lands... What do you think?

@robert-ancell
Copy link
Collaborator

Also, the desktop-launch interface is there just for when those patches land, but... I still don't know if that will be the definitive interface for reading the .desktop files, or will have to use a different one. If you want to launch this "as-is", maybe it would be a good idea to remove it until that patch lands... What do you think?

Yes, if it can be removed now do it an make a second PR to add it.

src/sdi-snap.c Outdated Show resolved Hide resolved
src/sdi-snap.c Outdated Show resolved Hide resolved
src/sdi-snap.c Outdated Show resolved Hide resolved
src/sdi-snap.c Outdated Show resolved Hide resolved
src/sdi-snap.c Outdated Show resolved Hide resolved
@robert-ancell
Copy link
Collaborator

Not a full review, we can go over again next week.

src/main.c Outdated Show resolved Hide resolved
src/sdi-helpers.c Outdated Show resolved Hide resolved
src/sdi-notify.c Outdated Show resolved Hide resolved
src/sdi-notify.c Outdated Show resolved Hide resolved
src/sdi-notify.c Outdated Show resolved Hide resolved
src/sdi-notify.c Outdated Show resolved Hide resolved
src/sdi-notify.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@robert-ancell robert-ancell left a comment

Choose a reason for hiding this comment

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

Some minor notes, I'll leave it to you to decide if they're worth changing. (feel free to merge when you're ready).

The change is large, so I'm not 100% confident my review is exhaustive - hopefully no major issues in here!

@sergio-costas
Copy link
Contributor Author

Done the changes. But I can't merge it, I don't have permissions.

@sergio-costas
Copy link
Contributor Author

Anyway, there are two things remaining.

@robert-ancell
Copy link
Collaborator

Ok, ping me when you're ready to merge.

During startup, the daemon receives all the old events, so
spurious dialogs can appear. To avoid this, those old events
are ignored.
@sergio-costas
Copy link
Contributor Author

@robert-ancell I think that it's better to merge this one, and do those other changes in different PRs, so please, merge this one when you have some spare time.

@robert-ancell robert-ancell merged commit 19bded4 into snapcore:main Jun 5, 2024
2 checks passed
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.

None yet

2 participants