diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-01-16 10:00:07 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-01-16 10:18:03 +0100 |
commit | 507a4208b75e3eae389d7b33d31f48550b921579 (patch) | |
tree | 1dbeff4e1a640d5c14906b12e623f453ba23903c /src | |
parent | f67f74e2569cb5061261bbb34065ac3680fa4e57 (diff) | |
download | ayatana-indicator-sound-507a4208b75e3eae389d7b33d31f48550b921579.tar.gz ayatana-indicator-sound-507a4208b75e3eae389d7b33d31f48550b921579.tar.bz2 ayatana-indicator-sound-507a4208b75e3eae389d7b33d31f48550b921579.zip |
src/accounts-service-access.vala: Locate another location in the code where we need to check for HAS_UT_ACCTSERVICE_SOUND_SETTINGS.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/accounts-service-access.vala | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ba64aa7..2a06187 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,6 +31,13 @@ else() set (HAVE_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS OFF) endif() +if(EXISTS "/usr/share/accountsservice/interfaces/com.ubuntu.AccountsService.Sound.xml") + set (HAVE_UT_ACCTSERVICE_SOUND_SETTINGS ON) + set (VALA_DEFINE_ACCTSERVICE_SOUND_SETTINGS "--define=HAS_UT_ACCTSERVICE_SOUND_SETTINGS") +else() + set (HAVE_UT_ACCTSERVICE_SOUND_SETTINGS OFF) +endif() + vapi_gen(accounts-service LIBRARY accounts-service @@ -64,6 +71,7 @@ vala_init(ayatana-indicator-sound-service ${VALA_DEFINE_URLDISPATCHER} ${VALA_DEFINE_UBUNTU_SOUND_SCHEMA} ${VALA_DEFINE_ACCTSERVICE_PRIVACY_SETTINGS} + ${VALA_DEFINE_ACCTSERVICE_SOUND_SETTINGS} ${VALA_DEFINE_ACCTSERVICE_SYSTEMSOUND_SETTINGS} ) diff --git a/src/accounts-service-access.vala b/src/accounts-service-access.vala index 9ce7f66..57c625e 100644 --- a/src/accounts-service-access.vala +++ b/src/accounts-service-access.vala @@ -142,7 +142,11 @@ public class AccountsServiceAccess : Object string user_path; if (user_path_variant.check_format_string ("(o)", true)) { user_path_variant.get ("(o)", out user_path); +#if HAS_UT_ACCTSERVICE_SOUND_SETTINGS + _user_proxy = yield DBusProxy.create_for_bus (BusType.SYSTEM, DBusProxyFlags.GET_INVALIDATED_PROPERTIES, null, "org.freedesktop.Accounts", user_path, "com.ubuntu.AccountsService.Sound"); +#else _user_proxy = yield DBusProxy.create_for_bus (BusType.SYSTEM, DBusProxyFlags.GET_INVALIDATED_PROPERTIES, null, "org.freedesktop.Accounts", user_path, "org.ayatana.AccountsService.Sound"); +#endif } else { warning ("Unable to find user name after calling FindUserByName. Expected type: %s and obtained %s", "(o)", user_path_variant.get_type_string () ); return; |