~bratsche/indicator-sound/icon-placement

« back to all changes in this revision

Viewing changes to src/transport-menu-item.vala

  • Committer: Conor Curran
  • Date: 2010-06-21 10:36:58 UTC
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: conor.curran@canonical.com-20100621103658-msyb0m4mtrpzp0ho
lots of changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
using Dbusmenu;
22
22
using Gee;
23
23
 
24
 
public class TransportMenuitem : Dbusmenu.Menuitem
 
24
public class TransportMenuitem : PlayerItem
25
25
{
26
26
        /* Not ideal duplicate definition of const - see common-defs/h */
27
27
        const string DBUSMENU_TRANSPORT_MENUITEM_TYPE = "x-canonical-transport-bar";
28
28
        const string DBUSMENU_TRANSPORT_MENUITEM_STATE = "x-canonical-transport-state";
29
 
        private MprisController mpris_adaptor;
30
29
        
31
30
        public TransportMenuitem()
32
31
  {
33
32
                this.property_set(MENUITEM_PROP_TYPE, DBUSMENU_TRANSPORT_MENUITEM_TYPE);
34
 
                // Hardcode the set up state until we can get the struct vala bug fixed
35
33
                this.property_set_bool(DBUSMENU_TRANSPORT_MENUITEM_STATE, false);
36
34
                debug("transport on the vala side");
37
35
        }
38
36
 
39
 
        public void set_adaptor(MprisController adaptor)
 
37
        public override void update(HashMap<string, string> data)
40
38
        {
41
 
                this.mpris_adaptor = adaptor;           
 
39
                debug("TransportMenuitem::update()");
42
40
        }
43
 
        
44
 
        /**
45
 
         Callback method for the handle_event
46
 
         * TRUE  => Playing
47
 
         * FALSE => Paused
48
 
         **/
 
41
                
49
42
        public override void handle_event(string name, GLib.Value input_value, uint timestamp)
50
43
        {
51
44
                debug("handle_event with bool value %s", input_value.get_boolean().to_string());