From ff120fbc11b920ee59298c0f0b92e0f546270ec7 Mon Sep 17 00:00:00 2001 From: Mr Liau Date: Fri, 29 Dec 2017 09:27:20 -0800 Subject: Make volume warning more clear. --- src/warn-notification.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/warn-notification.vala b/src/warn-notification.vala index f5c8b0b..c873ede 100644 --- a/src/warn-notification.vala +++ b/src/warn-notification.vala @@ -29,7 +29,7 @@ public class IndicatorSound.WarnNotification: Notification protected override Notify.Notification create_notification () { var n = new Notify.Notification ( _("Volume"), - _("High volume can damage your hearing."), + _("Allow volume above safe level? High volume can damage your hearing."), "audio-volume-high"); n.set_hint ("x-canonical-non-shaped-icon", "true"); n.set_hint ("x-canonical-snap-decisions", "true"); -- cgit v1.2.3 From 72ee222523a1a2fcc14a2c4a15e74b4b849e4882 Mon Sep 17 00:00:00 2001 From: Dan Chapman Date: Fri, 12 Jan 2018 09:34:37 +0000 Subject: Import latest from launchpad --- src/warn-notification.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/warn-notification.vala b/src/warn-notification.vala index c873ede..f5c8b0b 100644 --- a/src/warn-notification.vala +++ b/src/warn-notification.vala @@ -29,7 +29,7 @@ public class IndicatorSound.WarnNotification: Notification protected override Notify.Notification create_notification () { var n = new Notify.Notification ( _("Volume"), - _("Allow volume above safe level? High volume can damage your hearing."), + _("High volume can damage your hearing."), "audio-volume-high"); n.set_hint ("x-canonical-non-shaped-icon", "true"); n.set_hint ("x-canonical-snap-decisions", "true"); -- cgit v1.2.3 From 0cb52451f652d3909c839062aa56e27700fd3034 Mon Sep 17 00:00:00 2001 From: userj Date: Thu, 16 Aug 2018 13:33:10 -0700 Subject: Update warn-notification.vala --- src/warn-notification.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/warn-notification.vala b/src/warn-notification.vala index f5c8b0b..c873ede 100644 --- a/src/warn-notification.vala +++ b/src/warn-notification.vala @@ -29,7 +29,7 @@ public class IndicatorSound.WarnNotification: Notification protected override Notify.Notification create_notification () { var n = new Notify.Notification ( _("Volume"), - _("High volume can damage your hearing."), + _("Allow volume above safe level? High volume can damage your hearing."), "audio-volume-high"); n.set_hint ("x-canonical-non-shaped-icon", "true"); n.set_hint ("x-canonical-snap-decisions", "true"); -- cgit v1.2.3 From c36481db52bbc4e1c5a62a4e9e59fabed7d1e61d Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 12 Oct 2018 20:49:44 +0200 Subject: bluetooth dedicated icons in notifications the icon in notifications is now a bluetooth specific one if audio is over a bt device --- src/info-notification.vala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/info-notification.vala b/src/info-notification.vala index e093aae..4ddd814 100644 --- a/src/info-notification.vala +++ b/src/info-notification.vala @@ -82,13 +82,14 @@ public class IndicatorSound.InfoNotification: Notification switch (active_output) { case VolumeControl.ActiveOutput.SPEAKERS: case VolumeControl.ActiveOutput.HEADPHONES: - case VolumeControl.ActiveOutput.BLUETOOTH_HEADPHONES: - case VolumeControl.ActiveOutput.BLUETOOTH_SPEAKER: case VolumeControl.ActiveOutput.USB_SPEAKER: case VolumeControl.ActiveOutput.USB_HEADPHONES: case VolumeControl.ActiveOutput.HDMI_SPEAKER: case VolumeControl.ActiveOutput.HDMI_HEADPHONES: return "audio-volume-high"; + case VolumeControl.ActiveOutput.BLUETOOTH_HEADPHONES: + case VolumeControl.ActiveOutput.BLUETOOTH_SPEAKER: + return "audio-speakers-bluetooth-symbolic"; default: return ""; -- cgit v1.2.3 From 04cdcbea30e0d9b3c010c3e94a5dd0536d2734c7 Mon Sep 17 00:00:00 2001 From: Michele Date: Mon, 15 Oct 2018 15:33:06 +0200 Subject: Revert "bluetooth dedicated icons in notifications" --- src/info-notification.vala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/info-notification.vala b/src/info-notification.vala index 4ddd814..e093aae 100644 --- a/src/info-notification.vala +++ b/src/info-notification.vala @@ -82,14 +82,13 @@ public class IndicatorSound.InfoNotification: Notification switch (active_output) { case VolumeControl.ActiveOutput.SPEAKERS: case VolumeControl.ActiveOutput.HEADPHONES: + case VolumeControl.ActiveOutput.BLUETOOTH_HEADPHONES: + case VolumeControl.ActiveOutput.BLUETOOTH_SPEAKER: case VolumeControl.ActiveOutput.USB_SPEAKER: case VolumeControl.ActiveOutput.USB_HEADPHONES: case VolumeControl.ActiveOutput.HDMI_SPEAKER: case VolumeControl.ActiveOutput.HDMI_HEADPHONES: return "audio-volume-high"; - case VolumeControl.ActiveOutput.BLUETOOTH_HEADPHONES: - case VolumeControl.ActiveOutput.BLUETOOTH_SPEAKER: - return "audio-speakers-bluetooth-symbolic"; default: return ""; -- cgit v1.2.3 From 7fcb516bd48c2be80e2d2e31d089fe01ae42203d Mon Sep 17 00:00:00 2001 From: mateosalta Date: Mon, 3 Feb 2020 05:51:54 -0600 Subject: use avaible suru icons icons used were from another theme, this switches out to available suru icons --- src/sound-menu.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound-menu.vala b/src/sound-menu.vala index bcf2042..c0779e1 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -123,8 +123,8 @@ public class SoundMenu: Object set { if (value && !this.mic_volume_shown) { var slider = this.create_slider_menu_item (_("Microphone Volume"), "indicator.mic-volume", 0.0, 1.0, 0.01, - "audio-input-microphone-low-zero-panel", - "audio-input-microphone-high-panel", false); + "audio-input-microphone-symbolic", + "audio-input-microphone-muted-symbolic", false); volume_section.append_item (slider); this.mic_volume_shown = true; } -- cgit v1.2.3 From f193bca3b029fa2e379f61e28bb1e4b38ec43fac Mon Sep 17 00:00:00 2001 From: mateosalta Date: Mon, 3 Feb 2020 06:01:34 -0600 Subject: backwards --- src/sound-menu.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound-menu.vala b/src/sound-menu.vala index c0779e1..ebde2a9 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -123,8 +123,8 @@ public class SoundMenu: Object set { if (value && !this.mic_volume_shown) { var slider = this.create_slider_menu_item (_("Microphone Volume"), "indicator.mic-volume", 0.0, 1.0, 0.01, - "audio-input-microphone-symbolic", - "audio-input-microphone-muted-symbolic", false); + "audio-input-microphone-muted-symbolic", + "audio-input-microphone-symbolic", false); volume_section.append_item (slider); this.mic_volume_shown = true; } -- cgit v1.2.3 From ef802adfb4afe44ae2ef529275aadc2629d7170f Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Mon, 27 Apr 2020 17:58:04 +0700 Subject: integration-test: provide a temporary HOME directory to the test A couple of things in the integration-test rely on having a HOME directory. Provide a temporary HOME for the test and its child, which both prevents polluting the building user's HOME and allow the test to run where HOME=/nonexistent (i.e. autobuilder). Also remove the exception not to run the integration test inside the (Canonical's) Jenkins, as it's not relevant anymore. --- tests/integration/CMakeLists.txt | 13 ------------- tests/integration/main.cpp | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index 74b9c23..e803a87 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -87,19 +87,6 @@ target_link_libraries( gmenuharness-shared ) -#### -## When building under jenkins, pulseuadio fails to start as there is no -## /run/user tree, HOME directory is missing, and similar issues. So here -## we check that we are the jenkins user, and avoid the integration tests, -## until such time in future when we can run these tests in some different -## manner to avoid needing to run pulseaudio in this way. -#### -execute_process( - COMMAND whoami - OUTPUT_VARIABLE TESTS_USER - OUTPUT_STRIP_TRAILING_WHITESPACE -) - add_test( integration-tests integration-tests diff --git a/tests/integration/main.cpp b/tests/integration/main.cpp index a29b3b6..f42c90a 100644 --- a/tests/integration/main.cpp +++ b/tests/integration/main.cpp @@ -20,6 +20,7 @@ //#include #include +#include #include #include @@ -44,6 +45,22 @@ int main(int argc, char **argv) qputenv("LANG", "C.UTF-8"); unsetenv("LC_ALL"); + /* + * A couple of things rely on having a HOME directory: + * - The indicator itself relies on having a writable gsettings/dconf + * database, and the test relies on the functionality it provides. + * - The test starts Pulseaudio, which requires both a runtime and a + * state directory, both of which has a failback to the HOME. + * Provide a temporary HOME for the test and its child, which both prevents + * polluting the building user's HOME and allow the test to run where + * HOME=/nonexistent (i.e. autobuilder). + */ + QTemporaryDir tmpHome; + if (!tmpHome.isValid()) + qFatal("Cannot create a temporary HOME for the test."); + + setenv("HOME", tmpHome.path().toLocal8Bit().constData(), true); + QCoreApplication application(argc, argv); DBusMock::registerMetaTypes(); DBusTypes::registerMetaTypes(); -- cgit v1.2.3 From e27469555f2e2f2d8b7722507c50f15952f24bd1 Mon Sep 17 00:00:00 2001 From: Ratchanan Srirattanamet Date: Tue, 28 Apr 2020 01:01:51 +0700 Subject: Revert "Merge pull request #19 from mateosalta/patch-1" This attempt to fix the microphone icon in the sound indicator doesn't fix the problem and breaks the test. I decided to revert it so that when the correct fix is in place (which is outside the indicator), it'll work as intended. This reverts commit d73cef63a75cb313842436266f5158de6ac3fe07, reversing changes made to 9dd32c3ac9392a5412d8274cb198e0d6687e982c. --- src/sound-menu.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound-menu.vala b/src/sound-menu.vala index ebde2a9..bcf2042 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -123,8 +123,8 @@ public class SoundMenu: Object set { if (value && !this.mic_volume_shown) { var slider = this.create_slider_menu_item (_("Microphone Volume"), "indicator.mic-volume", 0.0, 1.0, 0.01, - "audio-input-microphone-muted-symbolic", - "audio-input-microphone-symbolic", false); + "audio-input-microphone-low-zero-panel", + "audio-input-microphone-high-panel", false); volume_section.append_item (slider); this.mic_volume_shown = true; } -- cgit v1.2.3 From 81e181c07147a124a39f797416c2e02076d30ef1 Mon Sep 17 00:00:00 2001 From: userj Date: Wed, 26 May 2021 11:12:27 -0700 Subject: Add newline between sentences in volume warning (#3) --- src/warn-notification.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/warn-notification.vala b/src/warn-notification.vala index c873ede..12e34e4 100644 --- a/src/warn-notification.vala +++ b/src/warn-notification.vala @@ -29,7 +29,7 @@ public class IndicatorSound.WarnNotification: Notification protected override Notify.Notification create_notification () { var n = new Notify.Notification ( _("Volume"), - _("Allow volume above safe level? High volume can damage your hearing."), + _("Allow volume above safe level?\nHigh volume can damage your hearing."), "audio-volume-high"); n.set_hint ("x-canonical-non-shaped-icon", "true"); n.set_hint ("x-canonical-snap-decisions", "true"); -- cgit v1.2.3