BuddiesOfBudgie / budgie-desktop

Budgie Desktop is a familiar, modern desktop environment.
https://buddiesofbudgie.org
GNU General Public License v2.0
935 stars 48 forks source link

Simplify Raven notification group #452

Closed EbonJaeger closed 11 months ago

EbonJaeger commented 1 year ago

Description

This does a couple of things. First, when constructing a notification group, just get the image directly from our Notification object. We did all the work to get the correct image, let's actually use it.

Secondly, remove our HashTable mapping application name to notification group. We don't need it; anything it was used for we can get from the ListBox. This avoids having to keep track of groups in multiple data structures (the table and the list box). This makes the code easier to maintain, and slightly more memory efficient.

The NotificationGroup widget has been changed to a Gtk.ListBoxRow to make it easier to find and remove groups from the view.

Lastly, switch to ngettext to build the text for the notification view header instead of an if/elseif chain.

Fixes #450

Submitter Checklist

JoshStrobl commented 12 months ago

Testing with Discord and seems a bit busted. Incorrect title and notification group icons aren't that of the application, just of the first icon of the first notification you get. Provided details in Matrix.

image

JoshStrobl commented 11 months ago

@serebit Could you clarify what styling changes you are referring to?

It looks identical to me, but I do need to get my eyes checked sooooo.