aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Conti <jason.conti@gmail.com>2020-08-20 09:38:41 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-08-20 14:38:04 +0200
commit8f195248f8b7ca0cc6c87c02188c4ed360964143 (patch)
treedfbf0b6ee958fd899e895f349dc587763f6d05ea
parent82ca9185e9894121cc1d13bb06e7dc0e09dfd01b (diff)
downloadayatana-indicator-notifications-8f195248f8b7ca0cc6c87c02188c4ed360964143.tar.gz
ayatana-indicator-notifications-8f195248f8b7ca0cc6c87c02188c4ed360964143.tar.bz2
ayatana-indicator-notifications-8f195248f8b7ca0cc6c87c02188c4ed360964143.zip
Add do-not-disturb mode read/unread icons.
-rw-r--r--data/icons/Makefile.am4
-rw-r--r--data/icons/ayatana-indicator-notification-read-dnd.svg155
-rw-r--r--data/icons/ayatana-indicator-notification-unread-dnd.svg218
-rw-r--r--src/indicator-notifications.c46
4 files changed, 412 insertions, 11 deletions
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index 13251ac..47d1ac1 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -4,6 +4,8 @@ icons_DATA = \
ayatana-indicator-notification-close-select.svg \
ayatana-indicator-notification-close-deselect.svg \
ayatana-indicator-notification-read.svg \
- ayatana-indicator-notification-unread.svg
+ ayatana-indicator-notification-read-dnd.svg \
+ ayatana-indicator-notification-unread.svg \
+ ayatana-indicator-notification-unread-dnd.svg
EXTRA_DIST = $(icons_DATA)
diff --git a/data/icons/ayatana-indicator-notification-read-dnd.svg b/data/icons/ayatana-indicator-notification-read-dnd.svg
new file mode 100644
index 0000000..d262e90
--- /dev/null
+++ b/data/icons/ayatana-indicator-notification-read-dnd.svg
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="24"
+ height="24"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.92.3 (2405546, 2018-03-11)"
+ sodipodi:docname="indicator-notification-read-dnd.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4299">
+ <stop
+ style="stop-color:#f4a41b;stop-opacity:1;"
+ offset="0"
+ id="stop4301" />
+ <stop
+ style="stop-color:#f4a41b;stop-opacity:0;"
+ offset="1"
+ id="stop4303" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3903">
+ <stop
+ style="stop-color:#93d4fd;stop-opacity:0.38793105;"
+ offset="0"
+ id="stop3905" />
+ <stop
+ style="stop-color:#93d4fd;stop-opacity:0;"
+ offset="1"
+ id="stop3907" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective10-0"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4299"
+ id="radialGradient4305"
+ cx="23.334524"
+ cy="50.32896"
+ fx="23.334524"
+ fy="50.32896"
+ r="22.375"
+ gradientTransform="matrix(0.55780357,-0.59636345,0.65404398,0.61175304,-22.59891,26.884319)"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="11.313709"
+ inkscape:cx="6.5016528"
+ inkscape:cy="16.607102"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="975"
+ inkscape:window-height="744"
+ inkscape:window-x="1409"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ inkscape:snap-global="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2837"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1028.3622)">
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path3608"
+ d="m 2.380545,1047.5939 9.201001,0.094 10.070171,-2.2285 c 0,0 0.560326,-12.1305 -4.581102,-12.4227 l -10.4828829,2.2699 c -4.3909986,1.0892 -4.371099,11.643 -4.2071871,12.2878 z"
+ style="fill:#e6ddd5;stroke:#e6ddd5;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1" />
+ <path
+ style="fill:none;stroke:#333333;stroke-width:1.32067811;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 2.380545,1047.5939 9.201001,0.094 10.070171,-2.2285 c 0,0 0.560326,-12.1305 -4.581102,-12.4227 l -10.4828829,2.2699 c -4.3909986,1.0892 -4.371099,11.643 -4.2071871,12.2878 z"
+ id="path4169-3"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ style="fill:#333333;fill-opacity:1;stroke:none"
+ d="m 6.9815782,1035.5579 c -5.3451258,0 -4.9584325,12.5337 -4.7874588,12.4226 h 9.5749166 c 0,0 0.557668,-12.4226 -4.7874578,-12.4226 z"
+ id="path4142"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="sccs" />
+ <path
+ style="opacity:1;fill:#333333;fill-opacity:1;stroke:none;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 13.630118,1040.198 5.39169,-1.3037 0.104962,0.088 0.245828,2.7124 -0.08563,0.072 -1.343935,0.4377 -0.114473,-0.018 -0.08839,-1.2817 -3.964172,0.9926 -0.162728,-0.042 -0.07826,-1.5317 z"
+ id="path843"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccccc" />
+ <path
+ style="opacity:1;fill:#e6ddd5;fill-opacity:1;stroke:none;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 2.674563,1047.3574 c 0,0 -0.46875,-11.1249 3.84375,-11.3124 4.3125,-0.1875 4.136643,11.3963 4.136643,11.3963 z"
+ id="path845"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cscc" />
+ <ellipse
+ style="opacity:1;fill:#333333;fill-opacity:1;stroke:none;stroke-width:5.3271842;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path847"
+ cx="6.5000072"
+ cy="1040.3783"
+ rx="2.09375"
+ ry="2.046875" />
+ <path
+ style="opacity:1;fill:#333333;fill-opacity:1;stroke:none;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 5.500007,1041.4253 -1.0625,4.375 3.875,-0.031 -1.0625,-4.4688 z"
+ id="path849"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/data/icons/ayatana-indicator-notification-unread-dnd.svg b/data/icons/ayatana-indicator-notification-unread-dnd.svg
new file mode 100644
index 0000000..23b859e
--- /dev/null
+++ b/data/icons/ayatana-indicator-notification-unread-dnd.svg
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="24"
+ height="24"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.92.3 (2405546, 2018-03-11)"
+ sodipodi:docname="indicator-notification-unread-dnd.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3731">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3733" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3735" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3715">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3717" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3719" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3705">
+ <stop
+ style="stop-color:#ddeb7b;stop-opacity:1;"
+ offset="0"
+ id="stop3707" />
+ <stop
+ id="stop3713"
+ offset="0.32225218"
+ style="stop-color:#b1c948;stop-opacity:1;" />
+ <stop
+ style="stop-color:#769123;stop-opacity:1;"
+ offset="1"
+ id="stop3709" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4299">
+ <stop
+ style="stop-color:#f4a41b;stop-opacity:1;"
+ offset="0"
+ id="stop4301" />
+ <stop
+ style="stop-color:#f4a41b;stop-opacity:0;"
+ offset="1"
+ id="stop4303" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3903">
+ <stop
+ style="stop-color:#93d4fd;stop-opacity:0.38793105;"
+ offset="0"
+ id="stop3905" />
+ <stop
+ style="stop-color:#93d4fd;stop-opacity:0;"
+ offset="1"
+ id="stop3907" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective10-0"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4299"
+ id="radialGradient4305"
+ cx="23.334524"
+ cy="50.32896"
+ fx="23.334524"
+ fy="50.32896"
+ r="22.375"
+ gradientTransform="matrix(0.55780357,-0.59636345,0.65404398,0.61175304,-22.59891,26.884319)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3705"
+ id="radialGradient3711"
+ cx="10.492408"
+ cy="1036.2013"
+ fx="10.492408"
+ fy="1036.2013"
+ r="9.2527103"
+ gradientTransform="matrix(1.1630415,-0.02510768,0.02514309,1.1646812,-27.763993,-169.37081)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3731"
+ id="linearGradient3765"
+ x1="7.7901888"
+ y1="2.3797531"
+ x2="17.786634"
+ y2="18.880793"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="8"
+ inkscape:cx="5.5156841"
+ inkscape:cy="4.9533255"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="975"
+ inkscape:window-height="744"
+ inkscape:window-x="1409"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ inkscape:snap-global="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2837"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1028.3622)">
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path3703"
+ d="m 2.7953316,1047.282 8.8042584,0.09 9.635949,-2.1324 c 0,0 0.536165,-11.6075 -4.383567,-11.8871 l -10.0308654,2.172 c -4.2016607,1.0423 -4.1826191,11.141 -4.025775,11.758 z"
+ style="fill:url(#radialGradient3711);stroke:none;stroke-width:1.26373099999999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1" />
+ <path
+ style="fill:none;stroke:#699536;stroke-width:1.32067811000000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 2.380545,1047.5939 9.201001,0.094 10.070171,-2.2285 c 0,0 0.560326,-12.1305 -4.581102,-12.4227 l -10.4828829,2.2699 c -4.3909986,1.0892 -4.371099,11.643 -4.2071871,12.2878 z"
+ id="path4169-3"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ style="fill:#699536;fill-opacity:1;stroke:none"
+ d="m 6.9815782,1035.5579 c -5.3451258,0 -4.9584325,12.5337 -4.7874588,12.4226 h 9.5749166 c 0,0 0.557668,-12.4226 -4.7874578,-12.4226 z"
+ id="path4142"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="sccs" />
+ <path
+ style="fill:none;stroke:url(#linearGradient3765);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="m 8.2917587,7.3479557 8.7029203,-2.055808 c 0,0 1.774725,0.4583809 3.083712,4.111616 1.420216,3.9636653 1.164958,6.8526933 1.164958,6.8526933 l -9.182609,2.124335 c 0,0 0.137054,-2.329916 -0.753796,-6.578586 C 10.416094,7.5535365 8.2232318,7.2794287 8.2917587,7.3479557 z"
+ id="path3757"
+ transform="translate(0,1028.3622)"
+ sodipodi:nodetypes="ccsccsc" />
+ <path
+ style="opacity:1;fill:#699536;fill-opacity:1;stroke:none;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 13.567611,1040.0099 5.39169,-1.3037 0.104962,0.088 0.245828,2.7124 -0.08563,0.072 -1.343935,0.4377 -0.114473,-0.018 -0.08839,-1.2817 -3.964172,0.9926 -0.162728,-0.042 -0.07826,-1.5317 z"
+ id="path843"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccccccccccc" />
+ <path
+ style="opacity:1;fill:#b5cc4c;fill-opacity:1;stroke:none;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 2.6120559,1047.1693 c 0,0 -0.46875,-11.1249 3.84375,-11.3124 4.3125001,-0.1875 4.1366431,11.3963 4.1366431,11.3963 z"
+ id="path845"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cscc" />
+ <ellipse
+ style="opacity:1;fill:#699536;fill-opacity:1;stroke:none;stroke-width:5.3271842;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path847"
+ cx="6.4375"
+ cy="1040.1903"
+ rx="2.09375"
+ ry="2.046875" />
+ <path
+ style="opacity:1;fill:#699536;fill-opacity:1;stroke:none;stroke-width:3.77952766;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 5.4375,1041.2372 -1.0625,4.375 3.875,-0.031 -1.0625,-4.4688 z"
+ id="path849"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/src/indicator-notifications.c b/src/indicator-notifications.c
index ef8aff4..db53df7 100644
--- a/src/indicator-notifications.c
+++ b/src/indicator-notifications.c
@@ -86,8 +86,10 @@ struct _IndicatorNotificationsPrivate {
#include "settings.h"
#define INDICATOR_ICON_SIZE 22
-#define INDICATOR_ICON_READ "ayatana-indicator-notification-read"
-#define INDICATOR_ICON_UNREAD "ayatana-indicator-notification-unread"
+#define INDICATOR_ICON_READ "ayatana-indicator-notification-read"
+#define INDICATOR_ICON_UNREAD "ayatana-indicator-notification-unread"
+#define INDICATOR_ICON_READ_DND "ayatana-indicator-notification-read-dnd"
+#define INDICATOR_ICON_UNREAD_DND "ayatana-indicator-notification-unread-dnd"
#define HINT_MAX 10
@@ -113,6 +115,7 @@ static void clear_menuitems(IndicatorNotifications *self);
static void insert_menuitem(IndicatorNotifications *self, GtkWidget *item);
static void remove_menuitem(IndicatorNotifications *self, GtkWidget *item);
static void set_unread(IndicatorNotifications *self, gboolean unread);
+static void update_unread(IndicatorNotifications *self);
static void update_blacklist(IndicatorNotifications *self);
static void update_clear_item_markup(IndicatorNotifications *self);
static void update_indicator_visibility(IndicatorNotifications *self);
@@ -213,7 +216,6 @@ indicator_notifications_init(IndicatorNotifications *self)
self->priv->hide_indicator = g_settings_get_boolean(self->priv->settings, NOTIFICATIONS_KEY_HIDE_INDICATOR);
self->priv->max_items = g_settings_get_int(self->priv->settings, NOTIFICATIONS_KEY_MAX_ITEMS);
update_blacklist(self);
- update_do_not_disturb(self);
g_signal_connect(self->priv->settings, "changed", G_CALLBACK(setting_changed_cb), self);
/* Set up blacklist hints */
@@ -284,7 +286,8 @@ get_image(IndicatorObject *io)
if(self->priv->image == NULL) {
self->priv->image = GTK_IMAGE(gtk_image_new());
- set_unread(self, FALSE);
+ /* We have to wait until the image is created to update do-not-disturb the first time */
+ update_do_not_disturb(self);
update_indicator_visibility(self);
}
@@ -438,14 +441,37 @@ set_unread(IndicatorNotifications *self, gboolean unread)
{
g_return_if_fail(IS_INDICATOR_NOTIFICATIONS(self));
- if(unread) {
- gtk_image_set_from_icon_name(self->priv->image, INDICATOR_ICON_UNREAD, GTK_ICON_SIZE_MENU);
+ self->priv->have_unread = unread;
+ update_unread(self);
+}
+
+/**
+ * update_unread:
+ * @self: the indicator object
+ *
+ * Updates the indicator icons.
+ **/
+static void
+update_unread(IndicatorNotifications *self)
+{
+ g_return_if_fail(IS_INDICATOR_NOTIFICATIONS(self));
+
+ if(self->priv->have_unread) {
+ if (self->priv->do_not_disturb) {
+ gtk_image_set_from_icon_name(self->priv->image, INDICATOR_ICON_UNREAD_DND, GTK_ICON_SIZE_MENU);
+ }
+ else {
+ gtk_image_set_from_icon_name(self->priv->image, INDICATOR_ICON_UNREAD, GTK_ICON_SIZE_MENU);
+ }
}
else {
- gtk_image_set_from_icon_name(self->priv->image, INDICATOR_ICON_READ, GTK_ICON_SIZE_MENU);
+ if (self->priv->do_not_disturb) {
+ gtk_image_set_from_icon_name(self->priv->image, INDICATOR_ICON_READ_DND, GTK_ICON_SIZE_MENU);
+ }
+ else {
+ gtk_image_set_from_icon_name(self->priv->image, INDICATOR_ICON_READ, GTK_ICON_SIZE_MENU);
+ }
}
-
- self->priv->have_unread = unread;
}
/**
@@ -615,7 +641,7 @@ update_do_not_disturb(IndicatorNotifications *self)
{
g_return_if_fail(IS_INDICATOR_NOTIFICATIONS(self));
- /* TODO: update icons here */
+ update_unread(self);
/* Mate do-not-disturb support */
settings_try_set_boolean(MATE_SCHEMA, MATE_KEY_DND, self->priv->do_not_disturb);