Skip to content
  • David Faure's avatar
    korgac: honour notification inhibition by delaying reminders · 60b10dc8
    David Faure authored
    Summary:
    Or in layman terms, don't pop up reminders during a presentation.
    
    Plasma has a "do not disturb" setting (which is even automatically
    enabled when mirroring the screen onto a projector), and that setting is
    available via a property in a freedesktop notifications interface.
    
    The code is in alarmdialog rather than alarmclient because the "suspend"
    code is in alarmdialog and calls wakeUp() directly.
    
    Test Plan:
    - Create event in korganizer with reminder in 2 minutes
    - Enable "do not disturb" mode in Plasma (Notifications systray icon)
    - Wait for > 2 minutes, no reminder
    - Disable "do not disturb" mode
    - The reminder shows immediately
    
    - Click Suspend for 1 minute
    - Enable "do not disturb" again
    - Wait for > 1 minute, no reminder
    - Disable "do not disturb" mode
    - The reminder shows immediately
    
    Reviewers: djarvie, broulik, davidedmundson
    
    Reviewed By: broulik
    
    Subscribers: winterz, kde-pim
    
    Tags: #kde_pim
    
    Differential Revision: https://phabricator.kde.org/D25399
    60b10dc8