diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-07-14 18:03:32 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-07-14 18:03:32 +0100 |
commit | bf4f73249f5b6bf4c9196f251382c5a6cec9634f (patch) | |
tree | bfb29b5498501f304cfb89d68aecde6b58e564b5 /src/player-controller.vala | |
parent | 07a314b698c43f47d706a1b87b8101a2f6edc4db (diff) | |
download | ayatana-indicator-sound-bf4f73249f5b6bf4c9196f251382c5a6cec9634f.tar.gz ayatana-indicator-sound-bf4f73249f5b6bf4c9196f251382c5a6cec9634f.tar.bz2 ayatana-indicator-sound-bf4f73249f5b6bf4c9196f251382c5a6cec9634f.zip |
scrub bar almost working - vala Glib value bugs again are biting me
Diffstat (limited to 'src/player-controller.vala')
-rw-r--r-- | src/player-controller.vala | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/player-controller.vala b/src/player-controller.vala index db81ee2..48416b9 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -23,16 +23,15 @@ using Gee; public class PlayerController : GLib.Object { - public const int WIDGET_QUANTITY = 4;//for now //5; + public const int WIDGET_QUANTITY = 5; public static enum widget_order{ SEPARATOR, TITLE, METADATA, + SCRUB, TRANSPORT } - //public const int METADATA = 2; - //private const int TRANSPORT = 3; public enum state{ OFFLINE, @@ -134,14 +133,14 @@ public class PlayerController : GLib.Object } debug("about the set the visibility on both the transport and metadata widget to %s", visibility.to_string()); this.custom_items[widget_order.TRANSPORT].property_set_bool(MENUITEM_PROP_VISIBLE, visibility); - this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE, visibility); + 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"); } } - - + private void construct_widgets() { // Separator item @@ -154,11 +153,16 @@ public class PlayerController : GLib.Object // Metadata item MetadataMenuitem metadata_item = new MetadataMenuitem(); this.custom_items.add(metadata_item); - + + // Scrub item + ScrubMenuitem scrub_item = new ScrubMenuitem(this); + this.custom_items.add(scrub_item); + // Transport item TransportMenuitem transport_item = new TransportMenuitem(this); this.custom_items.add(transport_item); + foreach(PlayerItem item in this.custom_items){ root_menu.child_add_position(item, this.menu_offset + this.custom_items.index_of(item)); } |