Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
187f082d
Commit
187f082d
authored
Apr 14, 2021
by
Kai Uwe Broulik
🍇
Browse files
[Notifications] Add setting for do not disturb while screen sharing
parent
99983ec1
Changes
3
Hide whitespace changes
Inline
Side-by-side
libnotificationmanager/kcfg/donotdisturbsettings.kcfg
View file @
187f082d
...
...
@@ -14,6 +14,10 @@
<default>
true
</default>
</entry>
<entry
name=
"WhenScreenSharing"
type=
"Bool"
>
<default>
true
</default>
</entry>
<entry
name=
"NotificationSoundsMuted"
type=
"Bool"
>
<default>
false
</default>
</entry>
...
...
libnotificationmanager/settings.cpp
View file @
187f082d
...
...
@@ -594,6 +594,21 @@ void Settings::setScreensMirrored(bool mirrored)
}
}
bool
Settings
::
inhibitNotificationsWhenScreenSharing
()
const
{
return
d
->
dndSettings
.
whenScreenSharing
();
}
void
Settings
::
setInhibitNotificationsWhenScreenSharing
(
bool
inhibit
)
{
if
(
inhibit
==
inhibitNotificationsWhenScreenSharing
())
{
return
;
}
d
->
dndSettings
.
setWhenScreenSharing
(
inhibit
);
d
->
setDirty
(
true
);
}
void
Settings
::
revokeApplicationInhibitions
()
{
Server
::
self
().
clearInhibitions
();
...
...
libnotificationmanager/settings.h
View file @
187f082d
...
...
@@ -175,6 +175,13 @@ class NOTIFICATIONMANAGER_EXPORT Settings : public QObject
*/
Q_PROPERTY
(
bool
screensMirrored
READ
screensMirrored
WRITE
setScreensMirrored
NOTIFY
screensMirroredChanged
)
/**
* Whether to enable do not disturb mode while screen sharing
*
* @since 5.22
*/
Q_PROPERTY
(
bool
inhibitNotificationsWhenScreenSharing
READ
inhibitNotificationsWhenScreenSharing
WRITE
setInhibitNotificationsWhenScreenSharing
NOTIFY
settingsChanged
)
/**
* Whether notification sounds should be disabled
*
...
...
@@ -311,6 +318,9 @@ public:
bool
screensMirrored
()
const
;
void
setScreensMirrored
(
bool
enable
);
bool
inhibitNotificationsWhenScreenSharing
()
const
;
void
setInhibitNotificationsWhenScreenSharing
(
bool
inhibit
);
bool
notificationSoundsInhibited
()
const
;
void
setNotificationSoundsInhibited
(
bool
inhibited
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment