aboutsummaryrefslogtreecommitdiff
path: root/src/mpris2-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-06-13 17:02:41 +0200
committerConor Curran <conor.curran@canonical.com>2011-06-13 17:02:41 +0200
commited942a6e5eb61a366a87b7346999ef5c146fc7fb (patch)
tree943b794194308f1e1cfa5f3d5dac1c7a1d9f32b8 /src/mpris2-controller.vala
parentec14b8310dd5b02ed749c2cfade5c1a45ef00bac (diff)
downloadayatana-indicator-sound-ed942a6e5eb61a366a87b7346999ef5c146fc7fb.tar.gz
ayatana-indicator-sound-ed942a6e5eb61a366a87b7346999ef5c146fc7fb.tar.bz2
ayatana-indicator-sound-ed942a6e5eb61a366a87b7346999ef5c146fc7fb.zip
arrow drawing properly
Diffstat (limited to 'src/mpris2-controller.vala')
-rw-r--r--src/mpris2-controller.vala14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mpris2-controller.vala b/src/mpris2-controller.vala
index 7e128dd..74e9823 100644
--- a/src/mpris2-controller.vala
+++ b/src/mpris2-controller.vala
@@ -83,18 +83,16 @@ public class Mpris2Controller : GLib.Object
}
Variant? meta_v = changed_properties.lookup("Metadata");
if(meta_v != null){
- GLib.HashTable<string, Variant?> changed_updates = clean_metadata();
- //MetadataMenuitem md = this.owner.custom_items[PlayerController.widget_order.METADATA] as MetadataMenuitem;
- //md.reset_track_details ();
-
+ GLib.HashTable<string, Variant?> changed_updates = clean_metadata();
PlayerItem metadata = this.owner.custom_items[PlayerController.widget_order.METADATA];
metadata.reset (MetadataMenuitem.relevant_attributes_for_ui());
metadata.update ( changed_updates,
MetadataMenuitem.attributes_format());
- /*metadata.property_set_bool ( MENUITEM_PROP_VISIBLE,
- metadata.populated(MetadataMenuitem.relevant_attributes_for_ui()));*/
- debug ("metadata visibility = %s",
- metadata.populated (MetadataMenuitem.relevant_attributes_for_ui()).to_string());
+ MetadataMenuitem md = this.owner.custom_items[PlayerController.widget_order.METADATA] as MetadataMenuitem;
+ bool collapsing = !metadata.populated(MetadataMenuitem.relevant_attributes_for_ui());
+ md.should_collapse(collapsing);
+
+ debug ("metadata should collapse = %s", collapsing.to_string());
}
Variant? playlist_v = changed_properties.lookup("ActivePlaylist");
if ( playlist_v != null && this.owner.use_playlists == true ){