aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/accounts-service-user.vala13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/accounts-service-user.vala b/src/accounts-service-user.vala
index 77dc9d4..e18e20f 100644
--- a/src/accounts-service-user.vala
+++ b/src/accounts-service-user.vala
@@ -93,11 +93,16 @@ public class AccountsServiceUser : Object {
public AccountsServiceUser () {
user = accounts_manager.get_user(GLib.Environment.get_user_name());
- user.notify["is-loaded"].connect(() => {
- debug("User loaded");
+ user.notify["is-loaded"].connect(() => user_loaded_changed());
+ user_loaded_changed();
+ }
- this.proxy = null;
+ void user_loaded_changed () {
+ debug("User loaded changed");
+ this.proxy = null;
+
+ if (this.user.is_loaded) {
Bus.get_proxy.begin<AccountsServiceSoundSettings> (
BusType.SYSTEM,
"org.freedesktop.Accounts",
@@ -105,7 +110,7 @@ public class AccountsServiceUser : Object {
DBusProxyFlags.GET_INVALIDATED_PROPERTIES,
null,
new_proxy);
- });
+ }
}
~AccountsServiceUser () {