aboutsummaryrefslogtreecommitdiff
path: root/src/title-menu-item.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-02-02 16:00:20 -0600
committerConor Curran <conor.curran@canonical.com>2011-02-02 16:00:20 -0600
commitaa063e3e1c57346a6af86cc0a6cee81a846b1154 (patch)
tree6236a6b6fa1096879b8a2ad420752432813eb8f3 /src/title-menu-item.vala
parent81ab9100b3d3e767e32ff4c960abf20c089e0457 (diff)
parent2b6453d1a988eb4a82df18401b3ba9b3867a2f40 (diff)
downloadayatana-indicator-sound-aa063e3e1c57346a6af86cc0a6cee81a846b1154.tar.gz
ayatana-indicator-sound-aa063e3e1c57346a6af86cc0a6cee81a846b1154.tar.bz2
ayatana-indicator-sound-aa063e3e1c57346a6af86cc0a6cee81a846b1154.zip
player title is now set via the identity property on the root mpris interface
Diffstat (limited to 'src/title-menu-item.vala')
-rw-r--r--src/title-menu-item.vala14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/title-menu-item.vala b/src/title-menu-item.vala
index 6ed24d8..ac93b89 100644
--- a/src/title-menu-item.vala
+++ b/src/title-menu-item.vala
@@ -26,8 +26,12 @@ public class TitleMenuitem : PlayerItem
public TitleMenuitem(PlayerController parent)
{
Object(item_type: MENUITEM_TYPE, owner: parent);
- this.property_set(MENUITEM_NAME, parent.app_info.get_name());
- this.property_set(MENUITEM_ICON, parent.icon_name);
+ }
+
+ construct
+ {
+ this.property_set(MENUITEM_NAME, this.owner.app_info.get_name());
+ this.property_set(MENUITEM_ICON, this.owner.icon_name);
this.property_set_bool(MENUITEM_RUNNING, false);
}
@@ -42,6 +46,12 @@ public class TitleMenuitem : PlayerItem
}
}
+ public void alter_label (string new_title)
+ {
+ if (new_title == null) return;
+ this.property_set(MENUITEM_NAME, new_title);
+ }
+
public void toggle_active_triangle(bool update)
{
this.property_set_bool(MENUITEM_RUNNING, update);