[notifications] Read appname from desktop file if no appname set
ClosedPublic

Authored by nicolasfella on Mar 2 2020, 3:59 PM.

Details

Summary

Some applications, e.g. pamac, don't send an app_name, which is legal according to the fd.o spec. In this case try to read it from the desktop file before falling back to the process name.

Test Plan

I get a better appname for pamac notifications now

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Mar 2 2020, 3:59 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 2 2020, 3:59 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
nicolasfella requested review of this revision.Mar 2 2020, 3:59 PM
broulik added inline comments.Mar 2 2020, 4:03 PM
libnotificationmanager/notification.cpp
330–331

How about adjusting this condition instead?

nicolasfella added inline comments.Mar 2 2020, 4:05 PM
libnotificationmanager/notification.cpp
330–331

That codepath assumes we have a notifyrc

  • Combine codepaths
nicolasfella marked 2 inline comments as done.Mar 2 2020, 4:10 PM
nicolasfella added inline comments.
libnotificationmanager/notification.cpp
330–331

nvm

crossi added a subscriber: crossi.Mar 2 2020, 4:11 PM
nicolasfella marked an inline comment as done.Apr 14 2020, 3:19 PM

ping?

mart accepted this revision.Apr 20 2020, 11:17 AM
This revision is now accepted and ready to land.Apr 20 2020, 11:17 AM
This revision was automatically updated to reflect the committed changes.