aboutsummaryrefslogtreecommitdiff
path: root/src/accounts-service-user.vala
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-11-11 00:10:38 +0100
committerRobert Tari <robert@tari.in>2021-11-15 04:40:51 +0100
commit88e440bb1689063c6d47ac7a4965eb597a8ec9cb (patch)
treea603306b2a6ba80ca8053e48b18deccc1ee37cf5 /src/accounts-service-user.vala
parent425c531ba241415514743f7cc6dae8c17683cb9f (diff)
downloadayatana-indicator-sound-88e440bb1689063c6d47ac7a4965eb597a8ec9cb.tar.gz
ayatana-indicator-sound-88e440bb1689063c6d47ac7a4965eb597a8ec9cb.tar.bz2
ayatana-indicator-sound-88e440bb1689063c6d47ac7a4965eb597a8ec9cb.zip
Clean up schema detection and conditional code
Diffstat (limited to 'src/accounts-service-user.vala')
-rw-r--r--src/accounts-service-user.vala14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/accounts-service-user.vala b/src/accounts-service-user.vala
index 0679392..ac803a1 100644
--- a/src/accounts-service-user.vala
+++ b/src/accounts-service-user.vala
@@ -23,10 +23,8 @@ public class AccountsServiceUser : Object {
Act.UserManager accounts_manager = Act.UserManager.get_default();
Act.User? user = null;
AccountsServiceSoundSettings? proxy = null;
-#if HAS_LOMIRI_ACCTSERVICE_PRIVACY_SETTINGS
+#if HAS_LOMIRI_SCHEMAS
AccountsServicePrivacySettings? privacyproxy = null;
-#endif
-#if HAS_LOMIRI_ACCTSERVICE_SYSTEMSOUND_SETTINGS
AccountsServiceSystemSoundSettings? syssoundproxy = null;
#endif
uint timer = 0;
@@ -42,7 +40,7 @@ public class AccountsServiceUser : Object {
}
set {
_silentMode = value;
-#if HAS_LOMIRI_ACCTSERVICE_SYSTEMSOUND_SETTINGS
+#if HAS_LOMIRI_SCHEMAS
if (syssoundproxy != null)
syssoundproxy.silent_mode = value;
#endif
@@ -149,7 +147,7 @@ public class AccountsServiceUser : Object {
DBusProxyFlags.GET_INVALIDATED_PROPERTIES,
null,
new_sound_proxy);
-#if HAS_LOMIRI_ACCTSERVICE_PRIVACY_SETTINGS
+#if HAS_LOMIRI_SCHEMAS
Bus.get_proxy.begin<AccountsServicePrivacySettings> (
BusType.SYSTEM,
"org.freedesktop.Accounts",
@@ -159,7 +157,7 @@ public class AccountsServiceUser : Object {
new_privacy_proxy);
#endif
-#if HAS_LOMIRI_ACCTSERVICE_SYSTEMSOUND_SETTINGS
+#if HAS_LOMIRI_SCHEMAS
Bus.get_proxy.begin<AccountsServiceSystemSoundSettings> (
BusType.SYSTEM,
"org.freedesktop.Accounts",
@@ -191,7 +189,7 @@ public class AccountsServiceUser : Object {
}
}
-#if HAS_LOMIRI_ACCTSERVICE_PRIVACY_SETTINGS
+#if HAS_LOMIRI_SCHEMAS
void new_privacy_proxy (GLib.Object? obj, AsyncResult res) {
try {
this.privacyproxy = Bus.get_proxy.end (res);
@@ -216,7 +214,7 @@ public class AccountsServiceUser : Object {
}
#endif
-#if HAS_LOMIRI_ACCTSERVICE_SYSTEMSOUND_SETTINGS
+#if HAS_LOMIRI_SCHEMAS
void new_system_sound_proxy (GLib.Object? obj, AsyncResult res) {
try {
this.syssoundproxy = Bus.get_proxy.end (res);