From 3cec34da0d992880b4e5013e4906bcd74630be05 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Wed, 3 Nov 2021 21:02:56 +0100 Subject: Whitespace fix --- src/options-gsettings.vala | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/options-gsettings.vala b/src/options-gsettings.vala index 556bbc6..7c187f9 100644 --- a/src/options-gsettings.vala +++ b/src/options-gsettings.vala @@ -22,13 +22,13 @@ using PulseAudio; public class IndicatorSound.OptionsGSettings : Options { - public OptionsGSettings() { - init_max_volume(); - init_loud_volume(); - } + public OptionsGSettings() { + init_max_volume(); + init_loud_volume(); + } - ~OptionsGSettings() { - } + ~OptionsGSettings() { + } private Settings _settings = new Settings ("org.ayatana.indicator.sound"); #if HAS_UBUNTU_SOUND_SCHEMA @@ -38,9 +38,9 @@ public class IndicatorSound.OptionsGSettings : Options #endif /** MAX VOLUME PROPERTY **/ - private const string AMP_dB_KEY = "amplified-volume-decibels"; - private const string NORMAL_dB_KEY = "normal-volume-decibels"; - private const string ALLOW_AMP_KEY = "allow-amplified-volume"; + private const string AMP_dB_KEY = "amplified-volume-decibels"; + private const string NORMAL_dB_KEY = "normal-volume-decibels"; + private const string ALLOW_AMP_KEY = "allow-amplified-volume"; private void init_max_volume() { _settings.changed[NORMAL_dB_KEY].connect(() => update_max_volume()); @@ -67,24 +67,24 @@ public class IndicatorSound.OptionsGSettings : Options } - /** LOUD VOLUME **/ + /** LOUD VOLUME **/ - private const string LOUD_ENABLED_KEY = "warning-volume-enabled"; - private const string LOUD_DECIBEL_KEY = "warning-volume-decibels"; + private const string LOUD_ENABLED_KEY = "warning-volume-enabled"; + private const string LOUD_DECIBEL_KEY = "warning-volume-decibels"; private void init_loud_volume() { _settings.changed[LOUD_ENABLED_KEY].connect(() => update_loud_volume()); _settings.changed[LOUD_DECIBEL_KEY].connect(() => update_loud_volume()); - update_loud_volume(); - } - private void update_loud_volume() { + update_loud_volume(); + } + private void update_loud_volume() { - var vol = PulseAudio.Volume.sw_from_dB (_settings.get_double (LOUD_DECIBEL_KEY)); - if (loud_volume != vol) - loud_volume = vol; + var vol = PulseAudio.Volume.sw_from_dB (_settings.get_double (LOUD_DECIBEL_KEY)); + if (loud_volume != vol) + loud_volume = vol; - var enabled = _settings.get_boolean(LOUD_ENABLED_KEY); - if (loud_warning_enabled != enabled) - loud_warning_enabled = enabled; + var enabled = _settings.get_boolean(LOUD_ENABLED_KEY); + if (loud_warning_enabled != enabled) + loud_warning_enabled = enabled; } } -- cgit v1.2.3 From 1ca91789f224d76507e2a2eac1cfef46c5c3c902 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Wed, 3 Nov 2021 21:04:41 +0100 Subject: Rename com.ubuntu.sound --- data/CMakeLists.txt | 2 +- data/org.ayatana.indicator.sound.gschema.xml | 6 +++--- src/CMakeLists.txt | 2 +- src/options-gsettings.vala | 2 +- tests/CMakeLists.txt | 4 ++-- tests/integration/indicator-sound-test-base.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index e9ed905..0e30f7c 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -66,7 +66,7 @@ install( add_schema ("org.ayatana.indicator.sound.gschema.xml") -if(NOT EXISTS /usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml) +if(NOT EXISTS /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml) add_schema ("org.ayatana.sound.gschema.xml") endif() diff --git a/data/org.ayatana.indicator.sound.gschema.xml b/data/org.ayatana.indicator.sound.gschema.xml index de9c8b9..b94213c 100644 --- a/data/org.ayatana.indicator.sound.gschema.xml +++ b/data/org.ayatana.indicator.sound.gschema.xml @@ -82,7 +82,7 @@ 0 Normal output volume. - The maximum volume when com.ubuntu.sound's 'allow-amplified-volume' setting is disabled. + The maximum volume when com.lomiri.sound's 'allow-amplified-volume' setting is disabled. To conform with EU standard EN 60950-1/Al2, this value should never be set to a dB that causes headphone sound output to exceed 100 dBA, nor @@ -94,9 +94,9 @@ 11 - Output volume to use when com.ubuntu.sound's 'allow-amplified-volume' setting is enabled. + Output volume to use when com.lomiri.sound's 'allow-amplified-volume' setting is enabled. - The maximum volume when com.ubuntu.sound's 'allow-amplified-volume' setting is enabled. + The maximum volume when com.lomiri.sound's 'allow-amplified-volume' setting is enabled. To conform with EU standard EN 60950-1/Al2, this value should never be set to a dB that causes headphone sound output to exceed 100 dBA, nor diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6706222..13576f1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,7 +6,7 @@ set(HEADER_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.h") set(SYMBOLS_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.def") set(VAPI_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.vapi") -if(EXISTS "/usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml") +if(EXISTS "/usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml") set (VALA_DEFINE_UBUNTU_SOUND_SCHEMA "--define=HAS_UBUNTU_SOUND_SCHEMA") endif() diff --git a/src/options-gsettings.vala b/src/options-gsettings.vala index 7c187f9..5284011 100644 --- a/src/options-gsettings.vala +++ b/src/options-gsettings.vala @@ -32,7 +32,7 @@ public class IndicatorSound.OptionsGSettings : Options private Settings _settings = new Settings ("org.ayatana.indicator.sound"); #if HAS_UBUNTU_SOUND_SCHEMA - private Settings _shared_settings = new Settings ("com.ubuntu.sound"); + private Settings _shared_settings = new Settings ("com.lomiri.sound"); #else private Settings _shared_settings = new Settings ("org.ayatana.sound"); #endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 10c3cf5..9a80bdd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -33,8 +33,8 @@ add_custom_target ( # and help the tests to find that file by setting -DSCHEMA_DIR set (XDG_DATA_DIRS "${CMAKE_CURRENT_BINARY_DIR}/gsettings-schemas") set (SCHEMA_DIR "${XDG_DATA_DIRS}/glib-2.0/schemas") -if (EXISTS /usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml) - set (SOUND_SCHEMA /usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml) +if (EXISTS /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml) + set (SOUND_SCHEMA /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml) add_definitions ( -DHAS_UBUNTU_SOUND_SCHEMA ) else() set (SOUND_SCHEMA ${CMAKE_SOURCE_DIR}/data/org.ayatana.sound.gschema.xml) diff --git a/tests/integration/indicator-sound-test-base.cpp b/tests/integration/indicator-sound-test-base.cpp index b92cc9f..869139b 100644 --- a/tests/integration/indicator-sound-test-base.cpp +++ b/tests/integration/indicator-sound-test-base.cpp @@ -184,7 +184,7 @@ bool IndicatorSoundTestBase::resetAllowAmplifiedVolume() proc.start("gsettings", QStringList() << "reset" #ifdef HAS_UBUNTU_SOUND_SCHEMA - << "com.ubuntu.sound" + << "com.lomiri.sound" #else << "org.ayatana.sound" #endif -- cgit v1.2.3 From 099ce0e931646aae11ab086b94d15f2a1414c797 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Wed, 3 Nov 2021 21:08:34 +0100 Subject: Rename VALA_DEFINE_UBUNTU_SOUND_SCHEMA --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 13576f1..2c04550 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,7 @@ set(SYMBOLS_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.def") set(VAPI_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.vapi") if(EXISTS "/usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml") - set (VALA_DEFINE_UBUNTU_SOUND_SCHEMA "--define=HAS_UBUNTU_SOUND_SCHEMA") + set (VALA_DEFINE_LOMIRI_SOUND_SCHEMA "--define=HAS_UBUNTU_SOUND_SCHEMA") endif() if(EXISTS "/usr/share/accountsservice/interfaces/com.lomiri.touch.AccountsService.SecurityPrivacy.xml") @@ -59,7 +59,7 @@ vala_init(ayatana-indicator-sound-service --vapidir=${CMAKE_SOURCE_DIR}/vapi/ --vapidir=. --pkg=bus-watcher - ${VALA_DEFINE_UBUNTU_SOUND_SCHEMA} + ${VALA_DEFINE_LOMIRI_SOUND_SCHEMA} ${VALA_DEFINE_ACCTSERVICE_PRIVACY_SETTINGS} ${VALA_DEFINE_ACCTSERVICE_SOUND_SETTINGS} ${VALA_DEFINE_ACCTSERVICE_SYSTEMSOUND_SETTINGS} -- cgit v1.2.3 From 45c279316fe33302d1348ef91a5851643c207f64 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Wed, 3 Nov 2021 21:10:43 +0100 Subject: Rename HAS_UBUNTU_SOUND_SCHEMA --- src/CMakeLists.txt | 2 +- src/options-gsettings.vala | 2 +- tests/CMakeLists.txt | 2 +- tests/integration/indicator-sound-test-base.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2c04550..761e87b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,7 @@ set(SYMBOLS_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.def") set(VAPI_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.vapi") if(EXISTS "/usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml") - set (VALA_DEFINE_LOMIRI_SOUND_SCHEMA "--define=HAS_UBUNTU_SOUND_SCHEMA") + set (VALA_DEFINE_LOMIRI_SOUND_SCHEMA "--define=HAS_LOMIRI_SOUND_SCHEMA") endif() if(EXISTS "/usr/share/accountsservice/interfaces/com.lomiri.touch.AccountsService.SecurityPrivacy.xml") diff --git a/src/options-gsettings.vala b/src/options-gsettings.vala index 5284011..5691a17 100644 --- a/src/options-gsettings.vala +++ b/src/options-gsettings.vala @@ -31,7 +31,7 @@ public class IndicatorSound.OptionsGSettings : Options } private Settings _settings = new Settings ("org.ayatana.indicator.sound"); -#if HAS_UBUNTU_SOUND_SCHEMA +#if HAS_LOMIRI_SOUND_SCHEMA private Settings _shared_settings = new Settings ("com.lomiri.sound"); #else private Settings _shared_settings = new Settings ("org.ayatana.sound"); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9a80bdd..75dab34 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,7 +35,7 @@ set (XDG_DATA_DIRS "${CMAKE_CURRENT_BINARY_DIR}/gsettings-schemas") set (SCHEMA_DIR "${XDG_DATA_DIRS}/glib-2.0/schemas") if (EXISTS /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml) set (SOUND_SCHEMA /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml) - add_definitions ( -DHAS_UBUNTU_SOUND_SCHEMA ) + add_definitions ( -DHAS_LOMIRI_SOUND_SCHEMA ) else() set (SOUND_SCHEMA ${CMAKE_SOURCE_DIR}/data/org.ayatana.sound.gschema.xml) endif() diff --git a/tests/integration/indicator-sound-test-base.cpp b/tests/integration/indicator-sound-test-base.cpp index 869139b..5812a04 100644 --- a/tests/integration/indicator-sound-test-base.cpp +++ b/tests/integration/indicator-sound-test-base.cpp @@ -183,7 +183,7 @@ bool IndicatorSoundTestBase::resetAllowAmplifiedVolume() proc.start("gsettings", QStringList() << "reset" -#ifdef HAS_UBUNTU_SOUND_SCHEMA +#ifdef HAS_LOMIRI_SOUND_SCHEMA << "com.lomiri.sound" #else << "org.ayatana.sound" -- cgit v1.2.3