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(-) (limited to 'src') 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 --- src/CMakeLists.txt | 2 +- src/options-gsettings.vala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 -- 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(-) (limited to 'src') 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 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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"); -- cgit v1.2.3