aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2014-03-03 10:32:53 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2014-03-03 10:32:53 +0100
commit2b344df118fe82ff89bd878b86e1827d7ff85528 (patch)
treed15d83f4abd4cf3ccab51009a68e0803e4425589
parent1bbfa7f3988d67f1086eb79368a47fb44ce998a9 (diff)
downloadayatana-indicator-sound-2b344df118fe82ff89bd878b86e1827d7ff85528.tar.gz
ayatana-indicator-sound-2b344df118fe82ff89bd878b86e1827d7ff85528.tar.bz2
ayatana-indicator-sound-2b344df118fe82ff89bd878b86e1827d7ff85528.zip
Honor com.canonical.indicator.sound visible
-rw-r--r--src/service.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/service.vala b/src/service.vala
index 22e5f1c..2b21275 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -22,6 +22,9 @@ public class IndicatorSound.Service: Object {
this.settings = new Settings ("com.canonical.indicator.sound");
this.sharedsettings = new Settings ("com.ubuntu.sound");
+ this.settings.bind ("visible", this, "visible", SettingsBindFlags.GET);
+ this.notify["visible"].connect ( () => this.update_root_icon () );
+
this.volume_control = new VolumeControl ();
this.players = new MediaPlayerList ();
@@ -74,6 +77,8 @@ public class IndicatorSound.Service: Object {
return 0;
}
+ public bool visible { get; set; }
+
public bool allow_amplified_volume {
get {
return this.max_volume > 1.0;
@@ -204,7 +209,7 @@ public class IndicatorSound.Service: Object {
builder.add ("{sv}", "title", new Variant.string (_("Sound")));
builder.add ("{sv}", "accessible-desc", new Variant.string (accessible_name));
builder.add ("{sv}", "icon", serialize_themed_icon (icon));
- builder.add ("{sv}", "visible", new Variant.boolean (true));
+ builder.add ("{sv}", "visible", new Variant.boolean (this.visible));
root_action.set_state (builder.end());
}