aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/com.canonical.indicator.sound3
-rw-r--r--debian/changelog22
-rw-r--r--debian/control2
-rw-r--r--src/service.vala9
-rw-r--r--src/sound-menu.vala15
5 files changed, 42 insertions, 9 deletions
diff --git a/data/com.canonical.indicator.sound b/data/com.canonical.indicator.sound
index 7d9ab41..ae31770 100644
--- a/data/com.canonical.indicator.sound
+++ b/data/com.canonical.indicator.sound
@@ -12,6 +12,9 @@ ObjectPath=/com/canonical/indicator/sound/phone
[desktop_greeter]
ObjectPath=/com/canonical/indicator/sound/desktop_greeter
+[desktop_lockscreen]
+ObjectPath=/com/canonical/indicator/sound/desktop_greeter
+
[ubiquity]
ObjectPath=/com/canonical/indicator/sound/desktop_greeter
diff --git a/debian/changelog b/debian/changelog
index 818a735..16c2828 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,25 @@
+indicator-sound (12.10.2+14.04.20140313-0ubuntu1) trusty; urgency=low
+
+ [ Lars Uebernickel ]
+ * Don't show player sections on the greeter and lock screen (LP:
+ #1280378)
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 13 Mar 2014 15:33:11 +0000
+
+indicator-sound (12.10.2+14.04.20140311.1-0ubuntu1) trusty; urgency=low
+
+ [ Lars Uebernickel ]
+ * Add desktop_lockscreen profile
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 11 Mar 2014 18:26:29 +0000
+
+indicator-sound (12.10.2+14.04.20140305-0ubuntu1) trusty; urgency=low
+
+ [ Lars Uebernickel ]
+ * Honor com.canonical.indicator.sound visible (LP: #829648)
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 05 Mar 2014 08:44:14 +0000
+
indicator-sound (12.10.2+14.04.20140224-0ubuntu1) trusty; urgency=low
[ Sebastien Bacher ]
diff --git a/debian/control b/debian/control
index cb95177..f10d9b0 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ XSBC-Original-Maintainer: Conor Curran <conor.curran@canonical.com>
Build-Depends: debhelper (>= 9.0),
cmake,
dbus,
- dbus-test-runner,
+ dbus-test-runner (>= 14.04.0+14.04.20140226),
dh-translations,
gir1.2-accountsservice-1.0,
gnome-common,
diff --git a/src/service.vala b/src/service.vala
index ca00caa..793a91a 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 = playerlist;
@@ -35,7 +38,7 @@ public class IndicatorSound.Service: Object {
this.actions.add_action (this.create_mic_volume_action ());
this.menus = new HashTable<string, SoundMenu> (str_hash, str_equal);
- this.menus.insert ("desktop_greeter", new SoundMenu (null, SoundMenu.DisplayFlags.SHOW_MUTE | SoundMenu.DisplayFlags.DONT_SHOW_PLAYERS));
+ this.menus.insert ("desktop_greeter", new SoundMenu (null, SoundMenu.DisplayFlags.SHOW_MUTE | SoundMenu.DisplayFlags.HIDE_PLAYERS));
this.menus.insert ("phone_greeter", new SoundMenu (null, SoundMenu.DisplayFlags.SHOW_MUTE | SoundMenu.DisplayFlags.HIDE_INACTIVE_PLAYERS));
this.menus.insert ("desktop", new SoundMenu ("indicator.desktop-settings", SoundMenu.DisplayFlags.SHOW_MUTE));
this.menus.insert ("phone", new SoundMenu ("indicator.phone-settings", SoundMenu.DisplayFlags.HIDE_INACTIVE_PLAYERS));
@@ -79,6 +82,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;
@@ -210,7 +215,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());
}
diff --git a/src/sound-menu.vala b/src/sound-menu.vala
index ebb7632..e37c4e9 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -23,7 +23,7 @@ public class SoundMenu: Object
NONE = 0,
SHOW_MUTE = 1,
HIDE_INACTIVE_PLAYERS = 2,
- DONT_SHOW_PLAYERS = 4
+ HIDE_PLAYERS = 4
}
public SoundMenu (string? settings_action, DisplayFlags flags) {
@@ -32,8 +32,6 @@ public class SoundMenu: Object
* it has a dynamic amount of player sections, one for each registered player.
*/
- this.no_players = ((flags & DisplayFlags.DONT_SHOW_PLAYERS) != 0);
-
this.volume_section = new Menu ();
if ((flags & DisplayFlags.SHOW_MUTE) != 0)
volume_section.append (_("Mute"), "indicator.mute");
@@ -58,6 +56,7 @@ public class SoundMenu: Object
this.root = new Menu ();
root.append_item (root_item);
+ this.hide_players = (flags & DisplayFlags.HIDE_PLAYERS) != 0;
this.hide_inactive = (flags & DisplayFlags.HIDE_INACTIVE_PLAYERS) != 0;
this.notify_handlers = new HashTable<MediaPlayer, ulong> (direct_hash, direct_equal);
}
@@ -90,8 +89,6 @@ public class SoundMenu: Object
}
public void add_player (MediaPlayer player) {
- if (this.no_players)
- return;
if (this.notify_handlers.contains (player))
return;
@@ -134,7 +131,7 @@ public class SoundMenu: Object
bool mic_volume_shown;
bool settings_shown = false;
bool hide_inactive;
- bool no_players;
+ bool hide_players = false;
HashTable<MediaPlayer, ulong> notify_handlers;
/* returns the position in this.menu of the section that's associated with @player */
@@ -157,6 +154,9 @@ public class SoundMenu: Object
}
void insert_player_section (MediaPlayer player) {
+ if (this.hide_players)
+ return;
+
var section = new Menu ();
Icon icon;
@@ -188,6 +188,9 @@ public class SoundMenu: Object
}
void remove_player_section (MediaPlayer player) {
+ if (this.hide_players)
+ return;
+
int index = this.find_player_section (player);
if (index >= 0)
this.menu.remove (index);