diff options
author | Sebastien Bacher <seb128@ubuntu.com> | 2010-07-22 23:12:10 +0200 |
---|---|---|
committer | Bazaar Package Importer <james.westby@ubuntu.com> | 2010-07-22 23:12:10 +0200 |
commit | 6383dbb01af071843bd8089fd48f173540734148 (patch) | |
tree | 101cc9ea1b424973a7c43cd7ce7bb9c4f9ac66aa /src/player-controller.vala | |
parent | 944907b441affebd907605ccd1f825e801650427 (diff) | |
parent | 1777ee4291dc792ca3d4df087c8af23cd8458961 (diff) | |
download | ayatana-indicator-sound-6383dbb01af071843bd8089fd48f173540734148.tar.gz ayatana-indicator-sound-6383dbb01af071843bd8089fd48f173540734148.tar.bz2 ayatana-indicator-sound-6383dbb01af071843bd8089fd48f173540734148.zip |
Import upstream version 0.3.8
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r-- | src/player-controller.vala | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala index 48416b9..f824d6f 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -60,13 +60,14 @@ public class PlayerController : GLib.Object this.menu_offset = offset; construct_widgets(); establish_mpris_connection(); - update_layout(); + this.update_layout(); } public void update_state(state new_state) { debug("update_state - player controller %s : new state %i", this.name, new_state); this.current_state = new_state; + //this.update_layout(); } public void activate() @@ -125,10 +126,12 @@ public class PlayerController : GLib.Object } } - private void update_layout() + public void update_layout() { bool visibility = true; - if(this.current_state != state.CONNECTED){ + MetadataMenuitem meta_item = this.custom_items[widget_order.METADATA] as MetadataMenuitem; + if(this.current_state != state.CONNECTED /*|| + meta_item.not_populated()*/){ visibility = false; } debug("about the set the visibility on both the transport and metadata widget to %s", visibility.to_string()); @@ -136,8 +139,8 @@ public class PlayerController : GLib.Object this.custom_items[widget_order.SCRUB].property_set_bool(MENUITEM_PROP_VISIBLE, visibility); this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE, visibility); // DEBUG - if(this.mpris_adaptor == null){ - warning("Why is the mpris object null"); + if(visibility == false){ + warning("Update layout of client %s is setting widgets to invisibile!", this.name); } } |