Add resident notifications support
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Nuvola Apps Runtime (Nuvola Player) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
In GNOME Shell, the music player integration in the message tray is through libnotify resident notifications (I know about the mediaplayer extensions, but I think this is neater). This is a screenshot of how rhythmbox does it:
http://
(For reference, the C code for this is at http://
Essentially, the notification acts as both notification and supplants the TrayIcon (giving integrated buttons and it can be used in shell overview)
The code change to do this is quite simple as nuvola uses libnotify and has sane actions anyway:
In player.vala, after this.notification is created (may want to do an if "persistence" and "action-icons" in Notify.
this.notificati
this.notificati
(set_hint_byte is deprecated in place of set_hint, but the second arg of set_hint has to be a gvariant boolean and I don't know how to create that in vala)
Then somewhere add a function to update notification actions
this.notificati
foreach(var action in PlayerActions.
if(
this.
}
Not quite sure where this wants to hook in in order to update the buttons at the right time, I just briefly looked through the source and don't really know vala. Obviously this can all be wrapped in conditional blocks. Also, seeing as PlayerActions has Play/Pause before Prev & Next it looks a bit strange, and you may want to make it ignore the QUIT action
Overall, simple to add, looks good where supported (e.g. shell), falls back gracefully if not supported.
Changed in nuvola-player: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
milestone: | none → 1.1 |
Changed in nuvola-player: | |
status: | Confirmed → Triaged |
Changed in nuvola-player: | |
status: | Triaged → In Progress |
assignee: | nobody → Jiří Janoušek (fenryxo) |
Changed in nuvola-player: | |
milestone: | 1.1.0 → patches-welcome |
Partial fix committed to lp:nuvola-player r356.