aboutsummaryrefslogtreecommitdiff
path: root/src/title-menu-item.vala
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-02-10 11:52:58 -0500
committerKen VanDine <ken.vandine@canonical.com>2011-02-10 11:52:58 -0500
commitb4b1c772dc57c3034cc80b785e4b472b8fe1b404 (patch)
tree6121e6d4e7b7bef8fe6c4f71e0b1064d32db3668 /src/title-menu-item.vala
parent868c3e3d18c5de79c679c57ae468f52a504dffd7 (diff)
parentc963e37be35b53d6f9da68a92b2bb9f1d42a788d (diff)
downloadayatana-indicator-sound-b4b1c772dc57c3034cc80b785e4b472b8fe1b404.tar.gz
ayatana-indicator-sound-b4b1c772dc57c3034cc80b785e4b472b8fe1b404.tar.bz2
ayatana-indicator-sound-b4b1c772dc57c3034cc80b785e4b472b8fe1b404.zip
Import upstream version 0.5.9
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);