[Differential] [Request, 57 lines] D4142: Support "default actions", as specified in [1].

Albert Vaca Cintora noreply at phabricator.kde.org
Sun Jan 15 15:40:58 UTC 2017


albertvaka created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  Default actions are the actions triggered when the notification is simply
  clicked, without adding any "action buttons". Until now, with
  KNotifications we could only make notifications that go away when clicked,
  which might not be what the user expects (see notifications on smartphones
  or other desktop environments).
  
  Since KNotifications uses an int->name mapping (instead of string->name),
  we need to manually convert between "default" and "0". Interestingly
  enough, there was already code to handle the action "0" and emit
  activated(), which is documented as "Emitted only when the default
  activation has occurred" but in practice was never actually used.
  
  [1] https://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html

TEST PLAN
  Tests pass.

REPOSITORY
  R289 KNotifications

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D4142

AFFECTED FILES
  src/knotification.cpp
  src/knotification.h
  src/knotificationmanager.cpp
  src/notifybypopup.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: albertvaka
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170115/c1e17467/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list