diff options
-rw-r--r-- | data/CMakeLists.txt | 2 | ||||
-rw-r--r-- | data/org.ayatana.indicator.sound.gschema.xml | 6 | ||||
-rw-r--r-- | src/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/options-gsettings.vala | 46 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tests/integration/indicator-sound-test-base.cpp | 4 |
6 files changed, 35 insertions, 35 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 @@ <default>0</default> <summary>Normal output volume.</summary> <description> - 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 @@ <key name="amplified-volume-decibels" type="d"> <default>11</default> - <summary>Output volume to use when com.ubuntu.sound's 'allow-amplified-volume' setting is enabled.</summary> + <summary>Output volume to use when com.lomiri.sound's 'allow-amplified-volume' setting is enabled.</summary> <description> - 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..761e87b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,8 +6,8 @@ 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") - set (VALA_DEFINE_UBUNTU_SOUND_SCHEMA "--define=HAS_UBUNTU_SOUND_SCHEMA") +if(EXISTS "/usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml") + set (VALA_DEFINE_LOMIRI_SOUND_SCHEMA "--define=HAS_LOMIRI_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} diff --git a/src/options-gsettings.vala b/src/options-gsettings.vala index 556bbc6..5691a17 100644 --- a/src/options-gsettings.vala +++ b/src/options-gsettings.vala @@ -22,25 +22,25 @@ 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 - private Settings _shared_settings = new Settings ("com.ubuntu.sound"); +#if HAS_LOMIRI_SOUND_SCHEMA + private Settings _shared_settings = new Settings ("com.lomiri.sound"); #else private Settings _shared_settings = new Settings ("org.ayatana.sound"); #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; } } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 10c3cf5..75dab34 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -33,9 +33,9 @@ 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) - add_definitions ( -DHAS_UBUNTU_SOUND_SCHEMA ) +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_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 b92cc9f..5812a04 100644 --- a/tests/integration/indicator-sound-test-base.cpp +++ b/tests/integration/indicator-sound-test-base.cpp @@ -183,8 +183,8 @@ bool IndicatorSoundTestBase::resetAllowAmplifiedVolume() proc.start("gsettings", QStringList() << "reset" -#ifdef HAS_UBUNTU_SOUND_SCHEMA - << "com.ubuntu.sound" +#ifdef HAS_LOMIRI_SOUND_SCHEMA + << "com.lomiri.sound" #else << "org.ayatana.sound" #endif |