aboutsummaryrefslogtreecommitdiff
path: root/src/mpris-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-22 12:43:24 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-22 12:43:24 +0100
commit38e16eeeff6ec6f54662cc4da194e2ad1e024241 (patch)
treeda9a6ff8ec6e6c54d09e836ce261d22d13b59946 /src/mpris-controller.vala
parent770b3266e2e7a92efb220f990d10ee0e36577b0f (diff)
downloadayatana-indicator-sound-38e16eeeff6ec6f54662cc4da194e2ad1e024241.tar.gz
ayatana-indicator-sound-38e16eeeff6ec6f54662cc4da194e2ad1e024241.tar.bz2
ayatana-indicator-sound-38e16eeeff6ec6f54662cc4da194e2ad1e024241.zip
silly vala errors rectified
Diffstat (limited to 'src/mpris-controller.vala')
-rw-r--r--src/mpris-controller.vala14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mpris-controller.vala b/src/mpris-controller.vala
index 4515c00..64a46e6 100644
--- a/src/mpris-controller.vala
+++ b/src/mpris-controller.vala
@@ -80,16 +80,14 @@ public class MprisController : GLib.Object
{
debug("onStatusChange - signal received");
status* status = &st;
- unowned ValueArray ar = (ValueArray)status;
-
+ unowned ValueArray ar = (ValueArray)status;
int play_state = ar.get_nth(0).get_int();
debug("onStatusChange - play state %i", play_state);
- //HashTable<string, Value?> ht = new HashTable<string, Value?>(str_hash, str_equal);
- //int* type = &play_state;
- //Value v = Value(typeof(int*));
- //v.set_pointer(type);
- //ht.insert("state", v);
- (this.controller.custom_items[this.controller.TRANSPORT] as TransportMenuitem).change_play_state(play_state);
+ HashTable<string, Value?> ht = new HashTable<string, Value?>(str_hash, str_equal);
+ Value v = Value(typeof(int));
+ v.set_int(play_state);
+ ht.insert("state", v);
+ this.controller.custom_items[this.controller.TRANSPORT].update(ht, TransportMenuitem.attributes_format());
}
}