aboutsummaryrefslogtreecommitdiff
path: root/src/player-item.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-24 17:23:39 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-24 17:23:39 +0100
commit81d9af3fc3f1d3784e623ede592e6d91032353ad (patch)
tree5721aa695a55e8179b75c998cc75089b8d820f6a /src/player-item.vala
parent98c55dde34ae7ed062ae22712b998ef4787b14ee (diff)
downloadayatana-indicator-sound-81d9af3fc3f1d3784e623ede592e6d91032353ad.tar.gz
ayatana-indicator-sound-81d9af3fc3f1d3784e623ede592e6d91032353ad.tar.bz2
ayatana-indicator-sound-81d9af3fc3f1d3784e623ede592e6d91032353ad.zip
moving towards offline application launching
Diffstat (limited to 'src/player-item.vala')
-rw-r--r--src/player-item.vala31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/player-item.vala b/src/player-item.vala
index d1cf08c..7fcf912 100644
--- a/src/player-item.vala
+++ b/src/player-item.vala
@@ -27,24 +27,12 @@ public class PlayerItem : Dbusmenu.Menuitem
public PlayerItem()
{
}
-
- private static bool ensure_valid_updates(HashTable<string, Value?> data, HashSet<string> attributes)
- {
- if(data == null){
- return false;
- }
- if(data.size() < attributes.size){
- warning("update hash was too small for the target");
- return false;
- }
- return true;
- }
public void update(HashTable<string, Value?> data, HashSet<string> attributes)
{
debug("PlayerItem::update()");
if(ensure_valid_updates(data, attributes) == false){
- debug("PlayerItem::Update -> update hash is not what we were expecting");
+ debug("PlayerItem::Update -> The hashtable update does not contain what we were expecting - just leave it!");
return;
}
foreach(string property in attributes){
@@ -64,6 +52,8 @@ public class PlayerItem : Dbusmenu.Menuitem
this.property_set_bool(property, v.get_boolean());
}
}
+ // TODO: not working
+ //this.check_layout();
}
public void set_adaptor(MprisController adaptor)
@@ -71,6 +61,17 @@ public class PlayerItem : Dbusmenu.Menuitem
this.mpris_adaptor = adaptor;
}
+ private static bool ensure_valid_updates(HashTable<string, Value?> data, HashSet<string> attributes)
+ {
+ if(data == null){
+ return false;
+ }
+ if(data.size() < attributes.size){
+ warning("update hash was too small for the target");
+ return false;
+ }
+ return true;
+ }
public static string sanitize_string(string st)
{
@@ -100,5 +101,9 @@ public class PlayerItem : Dbusmenu.Menuitem
separator.property_set(MENUITEM_PROP_TYPE, CLIENT_TYPES_SEPARATOR);
return separator;
}
+
+ public virtual void check_layout(){
+ warning("this should not be hit");
+ }
}