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

Simplify Raven notification group #452

Merged
merged 4 commits into from
Sep 30, 2023
Merged

Commits on Sep 30, 2023

  1. notification_view: Simplify handling of notification groups in Raven

    This does a couple 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 effecient.
    
    Lastly, switch to `ngettext` to build the text for the notification view header instead of an if/elseif chain.
    
    Fixes #450
    
    Signed-off-by: Evan Maddock <[email protected]>
    EbonJaeger authored and JoshStrobl committed Sep 30, 2023
    Configuration menu
    Copy the full SHA
    a6cefa8 View commit details
    Browse the repository at this point in the history
  2. notification_view: Make NotificationGroup derive from Gtk.ListBoxRow …

    …and fix notification counting
    
    Signed-off-by: Evan Maddock <[email protected]>
    EbonJaeger authored and JoshStrobl committed Sep 30, 2023
    Configuration menu
    Copy the full SHA
    2459090 View commit details
    Browse the repository at this point in the history
  3. fix various issues

    - rename app_icon to notification_icon since it is not necessarily the one for the app
    - implemented an app_image that will be prefered over image (from notification not app) for Raven. notification popups will use one or the other depending on what is provided.
    - broken notification grouping as it was assuming an app_name which can technically be empty when the application only supplies a desktop-entry for app info. use notification's app name otherwise try with the app id.
    - missing application name when application only supplies desktop-entry
    - incorrect image for some applications such as discord. it would use the Discord message sender's avatar rather than discord icon
    - spotify reports as com.spotify.Client and not Spotify nowadays, so added that to list of spam-apps to prevent Raven noise
    - missing printf on ngettext for header resulting in number not being added
    - missing use_markup on notification title resulting in ampersands not being parsed. noticable in song titles on spotify where many use & instead of "feat."
    JoshStrobl committed Sep 30, 2023
    Configuration menu
    Copy the full SHA
    6c0608b View commit details
    Browse the repository at this point in the history
  4. I swear this fixes something

    serebit authored and JoshStrobl committed Sep 30, 2023
    Configuration menu
    Copy the full SHA
    bad102c View commit details
    Browse the repository at this point in the history