aboutsummaryrefslogtreecommitdiff
path: root/src/player-controller.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-07-22 19:56:43 +0200
committerConor Curran <conor.curran@canonical.com>2010-07-22 19:56:43 +0200
commitcf97680d74aa9ab00cd55359d9e16acdad9f057f (patch)
tree5a96a46ad8617c0fc7f24870f4d3840078b7a50d /src/player-controller.vala
parent928fbf4bab7659ec523ae16adc052ca42fece589 (diff)
downloadayatana-indicator-sound-cf97680d74aa9ab00cd55359d9e16acdad9f057f.tar.gz
ayatana-indicator-sound-cf97680d74aa9ab00cd55359d9e16acdad9f057f.tar.bz2
ayatana-indicator-sound-cf97680d74aa9ab00cd55359d9e16acdad9f057f.zip
trying to set the time line
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r--src/player-controller.vala13
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);
}
}