Merge lp:~larsu/indicator-sound/honor-visible into lp:indicator-sound/14.04

Proposed by Lars Karlitski
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 418
Merged at revision: 418
Proposed branch: lp:~larsu/indicator-sound/honor-visible
Merge into: lp:indicator-sound/14.04
Diff against target: 30 lines (+6/-1)
1 file modified
src/service.vala (+6/-1)
To merge this branch: bzr merge lp:~larsu/indicator-sound/honor-visible
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+209023@code.launchpad.net

Commit message

Honor com.canonical.indicator.sound visible

Description of the change

Honor com.canonical.indicator.sound visible

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

looks good, thanks

review: Approve
Revision history for this message
Charles Kerr (charlesk) wrote :

larsu, thanks! \o/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/service.vala'
2--- src/service.vala 2014-02-24 11:57:51 +0000
3+++ src/service.vala 2014-03-03 10:07:45 +0000
4@@ -22,6 +22,9 @@
5 this.settings = new Settings ("com.canonical.indicator.sound");
6 this.sharedsettings = new Settings ("com.ubuntu.sound");
7
8+ this.settings.bind ("visible", this, "visible", SettingsBindFlags.GET);
9+ this.notify["visible"].connect ( () => this.update_root_icon () );
10+
11 this.volume_control = new VolumeControl ();
12
13 this.players = new MediaPlayerList ();
14@@ -74,6 +77,8 @@
15 return 0;
16 }
17
18+ public bool visible { get; set; }
19+
20 public bool allow_amplified_volume {
21 get {
22 return this.max_volume > 1.0;
23@@ -204,7 +209,7 @@
24 builder.add ("{sv}", "title", new Variant.string (_("Sound")));
25 builder.add ("{sv}", "accessible-desc", new Variant.string (accessible_name));
26 builder.add ("{sv}", "icon", serialize_themed_icon (icon));
27- builder.add ("{sv}", "visible", new Variant.boolean (true));
28+ builder.add ("{sv}", "visible", new Variant.boolean (this.visible));
29 root_action.set_state (builder.end());
30 }
31

Subscribers

People subscribed via source and target branches