aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-11-03 20:07:08 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-08 12:47:19 +0100
commit99e774d52a1095df0415b0906a9622f3ff9e9229 (patch)
tree6a7046b16f4902bd15f822480e6a71709415e052
parente99439d16902e186142a3a21286c38544d481344 (diff)
downloadayatana-indicator-sound-99e774d52a1095df0415b0906a9622f3ff9e9229.tar.gz
ayatana-indicator-sound-99e774d52a1095df0415b0906a9622f3ff9e9229.tar.bz2
ayatana-indicator-sound-99e774d52a1095df0415b0906a9622f3ff9e9229.zip
Rename x-canonical-value-bar-tint
-rw-r--r--src/info-notification.vala4
-rw-r--r--tests/integration/indicator-sound-test-base.cpp9
-rw-r--r--tests/notifications-test.cc8
3 files changed, 14 insertions, 7 deletions
diff --git a/src/info-notification.vala b/src/info-notification.vala
index 7e7e372..c5f8fd8 100644
--- a/src/info-notification.vala
+++ b/src/info-notification.vala
@@ -1,5 +1,6 @@
/*
* Copyright 2015 Canonical Ltd.
+ * Copyright 2021 Robert Tari
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,6 +16,7 @@
*
* Authors:
* Charles Kerr <charles.kerr@canonical.com>
+ * Robert Tari <robert@tari.in>
*/
using Notify;
@@ -43,7 +45,7 @@ public class IndicatorSound.InfoNotification: Notification
n.clear_hints();
n.set_hint ("x-ayatana-non-shaped-icon", "true");
n.set_hint ("x-canonical-private-synchronous", "true");
- n.set_hint ("x-canonical-value-bar-tint", is_high_volume ? "true" : "false");
+ n.set_hint ("x-ayatana-value-bar-tint", is_high_volume ? "true" : "false");
n.set_hint ("value", ((int32)((volume * 100.0) + 0.5)).clamp(0, 100));
show_notification ();
}
diff --git a/tests/integration/indicator-sound-test-base.cpp b/tests/integration/indicator-sound-test-base.cpp
index f1bc33a..b92cc9f 100644
--- a/tests/integration/indicator-sound-test-base.cpp
+++ b/tests/integration/indicator-sound-test-base.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 Canonical, Ltd.
+ * Copyright (C) 2021 Robert Tari
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
@@ -13,7 +14,9 @@
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*
- * Author: Xavi Garcia <xavi.garcia.mena@canonical.com>
+ * Authors:
+ * Xavi Garcia <xavi.garcia.mena@canonical.com>
+ * Robert Tari <robert@tari.in>
*/
#include "indicator-sound-test-base.h"
@@ -642,12 +645,12 @@ void IndicatorSoundTestBase::checkVolumeNotification(double volume, QString cons
ASSERT_TRUE(qDBusArgumentToMap(args.at(6), hints));
ASSERT_TRUE(hints.contains("value"));
ASSERT_TRUE(hints.contains("x-ayatana-non-shaped-icon"));
- ASSERT_TRUE(hints.contains("x-canonical-value-bar-tint"));
+ ASSERT_TRUE(hints.contains("x-ayatana-value-bar-tint"));
ASSERT_TRUE(hints.contains("x-canonical-private-synchronous"));
EXPECT_EQ(volume*100, hints["value"]);
EXPECT_EQ(true, hints["x-ayatana-non-shaped-icon"]);
- EXPECT_EQ(isLoud, hints["x-canonical-value-bar-tint"]);
+ EXPECT_EQ(isLoud, hints["x-ayatana-value-bar-tint"]);
EXPECT_EQ(true, hints["x-canonical-private-synchronous"]);
}
diff --git a/tests/notifications-test.cc b/tests/notifications-test.cc
index 1e48f52..47f4c47 100644
--- a/tests/notifications-test.cc
+++ b/tests/notifications-test.cc
@@ -1,5 +1,6 @@
/*
* Copyright © 2015-2016 Canonical Ltd.
+ * Copyright © 2021 Robert Tari
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,6 +17,7 @@
* Authors:
* Ted Gould <ted@canonical.com>
* Charles Kerr <charles.kerr@canonical.com>
+ * Robert Tari <robert@tari.in>
*/
#include <algorithm>
@@ -425,7 +427,7 @@ TEST_F(NotificationsTest, DISABLED_HighVolume) {
ASSERT_EQ(1, notev.size());
EXPECT_EQ("Volume", notev[0].summary);
EXPECT_EQ("Speakers", notev[0].body);
- EXPECT_GVARIANT_EQ("@s 'false'", notev[0].hints["x-canonical-value-bar-tint"]);
+ EXPECT_GVARIANT_EQ("@s 'false'", notev[0].hints["x-ayatana-value-bar-tint"]);
/* Set high volume with volume change */
notifications->clearNotifications();
@@ -436,7 +438,7 @@ TEST_F(NotificationsTest, DISABLED_HighVolume) {
ASSERT_LT(0, notev.size()); /* This passes with one or two since it would just be an update to the first if a second was sent */
EXPECT_EQ("Volume", notev[0].summary);
EXPECT_EQ("Speakers", notev[0].body);
- EXPECT_GVARIANT_EQ("@s 'true'", notev[0].hints["x-canonical-value-bar-tint"]);
+ EXPECT_GVARIANT_EQ("@s 'true'", notev[0].hints["x-ayatana-value-bar-tint"]);
/* Move it back */
volume_warning_mock_set_high_volume(VOLUME_WARNING_MOCK(volumeWarning.get()), false);
@@ -452,7 +454,7 @@ TEST_F(NotificationsTest, DISABLED_HighVolume) {
ASSERT_EQ(1, notev.size());
EXPECT_EQ("Volume", notev[0].summary);
EXPECT_EQ("Speakers", notev[0].body);
- EXPECT_GVARIANT_EQ("@s 'true'", notev[0].hints["x-canonical-value-bar-tint"]);
+ EXPECT_GVARIANT_EQ("@s 'true'", notev[0].hints["x-ayatana-value-bar-tint"]);
}
TEST_F(NotificationsTest, DISABLED_MenuHide) {