diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-12-07 11:49:54 +0000 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-12-07 14:19:24 +0100 |
commit | 5309a605a0259edccb1745bafc117a02801af90e (patch) | |
tree | 9e79aac08c4de70178a570a1ab365aed6a620eed /src/accounts-service-user.vala | |
parent | a162229fb1d77a1616dd7fed2b17ad6cbe038b12 (diff) | |
download | ayatana-indicator-sound-5309a605a0259edccb1745bafc117a02801af90e.tar.gz ayatana-indicator-sound-5309a605a0259edccb1745bafc117a02801af90e.tar.bz2 ayatana-indicator-sound-5309a605a0259edccb1745bafc117a02801af90e.zip |
Make AcctService SecurityPrivacy and System.Sound optional.
Diffstat (limited to 'src/accounts-service-user.vala')
-rw-r--r-- | src/accounts-service-user.vala | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/accounts-service-user.vala b/src/accounts-service-user.vala index 535f6c7..25b19ee 100644 --- a/src/accounts-service-user.vala +++ b/src/accounts-service-user.vala @@ -21,8 +21,12 @@ public class AccountsServiceUser : Object { Act.UserManager accounts_manager = Act.UserManager.get_default(); Act.User? user = null; AccountsServiceSoundSettings? proxy = null; +#if HAS_UT_ACCTSERVICE_PRIVACY_SETTINGS AccountsServicePrivacySettings? privacyproxy = null; +#endif +#if HAS_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS AccountsServiceSystemSoundSettings? syssoundproxy = null; +#endif uint timer = 0; MediaPlayer? _player = null; GreeterBroadcast? greeter = null; @@ -36,8 +40,10 @@ public class AccountsServiceUser : Object { } set { _silentMode = value; +#if HAS_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS if (syssoundproxy != null) syssoundproxy.silent_mode = value; +#endif } } @@ -141,7 +147,7 @@ public class AccountsServiceUser : Object { DBusProxyFlags.GET_INVALIDATED_PROPERTIES, null, new_sound_proxy); - +#if HAS_UT_ACCTSERVICE_PRIVACY_SETTINGS Bus.get_proxy.begin<AccountsServicePrivacySettings> ( BusType.SYSTEM, "org.freedesktop.Accounts", @@ -149,7 +155,9 @@ public class AccountsServiceUser : Object { DBusProxyFlags.GET_INVALIDATED_PROPERTIES, null, new_privacy_proxy); +#endif +#if HAS_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS Bus.get_proxy.begin<AccountsServiceSystemSoundSettings> ( BusType.SYSTEM, "org.freedesktop.Accounts", @@ -157,6 +165,7 @@ public class AccountsServiceUser : Object { DBusProxyFlags.GET_INVALIDATED_PROPERTIES, null, new_system_sound_proxy); +#endif } } @@ -180,6 +189,7 @@ public class AccountsServiceUser : Object { } } +#if HAS_UT_ACCTSERVICE_PRIVACY_SETTINGS void new_privacy_proxy (GLib.Object? obj, AsyncResult res) { try { this.privacyproxy = Bus.get_proxy.end (res); @@ -198,7 +208,9 @@ public class AccountsServiceUser : Object { warning("Unable to get proxy to user privacy settings: %s", e.message); } } +#endif +#if HAS_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS void new_system_sound_proxy (GLib.Object? obj, AsyncResult res) { try { this.syssoundproxy = Bus.get_proxy.end (res); @@ -219,6 +231,7 @@ public class AccountsServiceUser : Object { warning("Unable to get proxy to system sound settings: %s", e.message); } } +#endif void greeter_proxy_new (GLib.Object? obj, AsyncResult res) { try { |