aboutsummaryrefslogtreecommitdiff
path: root/src/player-item.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-07-06 18:55:05 +0100
committerConor Curran <conor.curran@canonical.com>2010-07-06 18:55:05 +0100
commit7555ea6755750dd64a6c4652b852a0bdc0d0bfeb (patch)
treef636897b4b133057a06dcc60e650e0b8f95acd2d /src/player-item.vala
parentedac78eadc5ddceb17b93bffa101eeffbab4437c (diff)
downloadayatana-indicator-sound-7555ea6755750dd64a6c4652b852a0bdc0d0bfeb.tar.gz
ayatana-indicator-sound-7555ea6755750dd64a6c4652b852a0bdc0d0bfeb.tar.bz2
ayatana-indicator-sound-7555ea6755750dd64a6c4652b852a0bdc0d0bfeb.zip
whole new widget to house the customised title item
Diffstat (limited to 'src/player-item.vala')
-rw-r--r--src/player-item.vala30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/player-item.vala b/src/player-item.vala
index a5c5512..88e1dd3 100644
--- a/src/player-item.vala
+++ b/src/player-item.vala
@@ -22,10 +22,18 @@ using Gee;
public class PlayerItem : Dbusmenu.Menuitem
{
+
public MprisController mpris_adaptor;
-
- public PlayerItem()
+ public string item_type { get; construct; }
+
+ public PlayerItem(string type)
{
+ Object(item_type: type);
+ }
+
+ construct {
+ debug("in the base constructor for %s", item_type);
+ this.property_set(MENUITEM_PROP_TYPE, item_type);
}
public void reset(HashSet<string> attrs){
@@ -94,19 +102,19 @@ public class PlayerItem : Dbusmenu.Menuitem
//----- Custom constructors for player items ----------------//
// Title item
- public static PlayerItem new_title_item(dynamic string name)
- {
- PlayerItem item = new PlayerItem();
- item.property_set(MENUITEM_PROP_LABEL, name);
- item.property_set(MENUITEM_PROP_ICON_NAME, "applications-multimedia");
- return item;
- }
+ //public static PlayerItem new_title_item(dynamic string name)
+ //{
+ // PlayerItem item = new PlayerItem();
+ // item.property_set(MENUITEM_PROP_LABEL, name);
+ // item.property_set(MENUITEM_PROP_ICON_NAME, "applications-multimedia");
+ // return item;
+ //}
// Separator item
public static PlayerItem new_separator_item()
{
- PlayerItem separator = new PlayerItem();
- separator.property_set(MENUITEM_PROP_TYPE, CLIENT_TYPES_SEPARATOR);
+ PlayerItem separator = new PlayerItem(CLIENT_TYPES_SEPARATOR);
+ //separator.property_set(MENUITEM_PROP_TYPE, CLIENT_TYPES_SEPARATOR);
return separator;
}