diff options
-rw-r--r-- | data/com.canonical.indicator.sound.AccountsService.xml | 3 | ||||
-rw-r--r-- | src/accounts-service-user.vala | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/data/com.canonical.indicator.sound.AccountsService.xml b/data/com.canonical.indicator.sound.AccountsService.xml index 1651a43..fb7e96f 100644 --- a/data/com.canonical.indicator.sound.AccountsService.xml +++ b/data/com.canonical.indicator.sound.AccountsService.xml @@ -12,6 +12,9 @@ <annotation name="org.freedesktop.Accounts.Authentication.ChangeAny" value="com.canonical.indicator.sound.AccountsService.ModifyAnyUser"/> + <property name="Timestamp" type="t" access="readwrite"> + <annotation name="org.freedesktop.Accounts.DefaultValue" value="0"/> + </property> <property name="PlayerName" type="s" access="readwrite"> <annotation name="org.freedesktop.Accounts.DefaultValue" value=""/> </property> diff --git a/src/accounts-service-user.vala b/src/accounts-service-user.vala index 19ca774..2062dc8 100644 --- a/src/accounts-service-user.vala +++ b/src/accounts-service-user.vala @@ -20,6 +20,7 @@ [DBus (name = "com.canonical.indicator.sound.AccountsService")] public interface AccountsServiceSoundSettings : Object { // properties + public abstract uint64 timestamp {owned get; set;} public abstract string player_name {owned get; set;} public abstract Variant player_icon {owned get; set;} public abstract bool running {owned get; set;} @@ -47,7 +48,9 @@ public class AccountsServiceUser : Object { if (this._player == null) { /* Clear it */ this.proxy.player_name = ""; + this.proxy.timestamp = 0; } else { + this.proxy.timestamp = GLib.get_monotonic_time(); this.proxy.player_name = this._player.name; if (this._player.icon == null) { var icon = new ThemedIcon.with_default_fallbacks ("application-default-icon"); |