aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog29
-rw-r--r--src/service.vala4
-rw-r--r--src/sound-menu.vala3
-rw-r--r--src/volume-control.vala15
-rw-r--r--tests/manual64
5 files changed, 87 insertions, 28 deletions
diff --git a/debian/changelog b/debian/changelog
index 7f780e9..93626ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,23 +1,16 @@
-indicator-sound (12.10.2+14.10.20141021~rtm-0ubuntu1) 14.09; urgency=medium
+indicator-sound (12.10.2+15.04.20141105-0ubuntu1) vivid; urgency=medium
[ Ted Gould ]
- * Silent Mode checkbox in indicator (LP: #1342151)
-
- -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 21 Oct 2014 20:06:43 +0000
-
-indicator-sound (12.10.2+14.10.20141016-0ubuntu1) 14.09; urgency=low
-
- [ Lars Uebernickel ]
- * service.vala: don't call set_volume unnecessarily
-
- -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 16 Oct 2014 13:31:43 +0000
-
-indicator-sound (12.10.2+14.10.20141015.5~rtm-0ubuntu1) 14.09; urgency=low
-
- [ Ted Gould ]
- * Show notifications on volume change (LP: #1378564)
-
- -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 15 Oct 2014 16:19:12 +0000
+ * Remove various Vala warnings
+ * Show notifications on volume change (LP: #1378564, #1378961)
+ * Warn on high audio levels when using headphones (LP: #1232633, #1373404)
+ * service.vala: don't call set_volume unnecessarily (LP: #1381871)
+ * Integration test for audio roles
+ * Integration test for silent mode
+ * Ensure the greeter menu matches whether song metadata should be shown,
+ and update the metadata based on the new setting. (LP: #1358340)
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 05 Nov 2014 17:56:29 +0000
indicator-sound (12.10.2+14.10.20141010-0ubuntu1) utopic; urgency=low
diff --git a/src/service.vala b/src/service.vala
index fa8bbdc..fd0c08d 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -74,7 +74,7 @@ public class IndicatorSound.Service: Object {
List<string> caps = Notify.get_server_caps ();
if (caps.find_custom ("x-canonical-private-synchronous", strcmp) != null) {
this.notification = new Notify.Notification ("indicator-sound", "", "");
- this.notification.set_hint_string ("x-canonical-private-synchronous", "indicator-sound");
+ this.notification.set_hint ("x-canonical-private-synchronous", "indicator-sound");
}
}
@@ -196,7 +196,7 @@ public class IndicatorSound.Service: Object {
icon = "notification-audio-volume-high";
this.notification.update ("indicator-sound", "", icon);
- this.notification.set_hint_int32 ("value", ((int32) (100 * v / this.max_volume)).clamp (-1, 101));
+ this.notification.set_hint ("value", ((int32) (100 * v / this.max_volume)).clamp (-1, 101));
try {
this.notification.show ();
}
diff --git a/src/sound-menu.vala b/src/sound-menu.vala
index a9efd74..3881faf 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -118,7 +118,6 @@ public class SoundMenu: Object
while ((location = find_action(this.volume_section, "indicator.high-volume-warning-item")) != -1) {
this.volume_section.remove (location);
}
- this.volume_section.remove (this.volume_section.get_n_items () -1);
this.high_volume_warning_shown = false;
}
}
@@ -128,7 +127,7 @@ public class SoundMenu: Object
int n = menu.get_n_items ();
for (int i = 0; i < n; i++) {
string action;
- menu.get_item_attribute (0, "action", "s", out action);
+ menu.get_item_attribute (i, "action", "s", out action);
if (in_action == action)
return i;
}
diff --git a/src/volume-control.vala b/src/volume-control.vala
index 6f48c5d..6f22dc5 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -69,7 +69,6 @@ public class VolumeControl : Object
private bool _send_next_local_volume = false;
private double _account_service_volume = 0.0;
private Notify.Notification _notification;
-
private bool _active_port_headphone = false;
public signal void volume_changed (double v);
@@ -776,7 +775,7 @@ public class VolumeControl : Object
}
/* AccountsService operations */
- private void accountsservice_props_changed_cb (DBusProxy proxy, Variant changed_properties, string[] invalidated_properties)
+ private void accountsservice_props_changed_cb (DBusProxy proxy, Variant changed_properties, string[]? invalidated_properties)
{
Variant volume_variant = changed_properties.lookup_value ("Volume", new VariantType ("d"));
if (volume_variant != null) {
@@ -834,10 +833,14 @@ public class VolumeControl : Object
// Get current values and listen for changes
_user_proxy.g_properties_changed.connect (accountsservice_props_changed_cb);
- var props_variant = yield _user_proxy.get_connection ().call (_user_proxy.get_name (), _user_proxy.get_object_path (), "org.freedesktop.DBus.Properties", "GetAll", new Variant ("(s)", _user_proxy.get_interface_name ()), null, DBusCallFlags.NONE, -1);
- Variant props;
- props_variant.get ("(@a{sv})", out props);
- accountsservice_props_changed_cb(_user_proxy, props, null);
+ try {
+ var props_variant = yield _user_proxy.get_connection ().call (_user_proxy.get_name (), _user_proxy.get_object_path (), "org.freedesktop.DBus.Properties", "GetAll", new Variant ("(s)", _user_proxy.get_interface_name ()), null, DBusCallFlags.NONE, -1);
+ Variant props;
+ props_variant.get ("(@a{sv})", out props);
+ accountsservice_props_changed_cb(_user_proxy, props, null);
+ } catch (GLib.Error e) {
+ debug("Unable to get properties for user %s at first try: %s", username, e.message);
+ }
}
private void greeter_user_changed (string username)
diff --git a/tests/manual b/tests/manual
index 0df4186..c1cc214 100644
--- a/tests/manual
+++ b/tests/manual
@@ -57,3 +57,67 @@ Test-case indicator-sound/unity8-high-volume
<dd>There should be no text on the notification</dd>
<dd>The range on the notification bubble should have a standard color</dd>
</dl>
+
+Test-case indicator-sound/unity8-silent-mode
+<dl>
+ <dt>NOTE: This test currently doesn't work because of a bug: http://pad.lv/1336715</dt>
+ <dt>Open the Sound menu</dt>
+ <dd>The sound menu includes an item "Silent Mode" which is a check box</dd>
+ <dd>The checkbox is not checked</dd>
+ <dt>Enable silent mode</dt>
+ <dd>Selecting the "Silent Mode" item should cause the box to be checked</dd>
+ <dt>Open the sound panel in system settings</dt>
+ <dd>The sound panel includes an item "Silent Mode" which is a check box</dd>
+ <dd>The checkbox is checked</dd>
+ <dt>Disable silent mode in system settings</dt>
+ <dd>The checkbox is not checked</dd>
+ <dt>Open the Sound menu</dt>
+ <dd>The sound menu includes an item "Silent Mode" which is a check box</dd>
+ <dd>The checkbox is not checked</dd>
+</dl>
+
+Test-case indicator-sound/unity8-audio-roles
+<dl>
+ <dt>Without playing anything (no active audio stream), change the volume on the indicator or with the volume buttons and then try playing one of the following audio streams: camera shutter, ringtone, message notification, dtmf</dt>
+ <dd>The audio stream should reflect the volume set on the indicator</dd>
+ <dt>Without playing anything (no active audio stream), change the volume on the indicator or with volume buttons and then try playing one of the following audio streams: music-app, webrowser (youtube)</dt>
+ <dd>The audio stream should not be affected by the volume set on the indicator when there was no other active stream</dt>
+ <dt>Play a multimedia stream (music-app, webrowser) and change the volume on the indicator when the stream is active</dt>
+ <dd>The multimedia audio stream should reflect the volume set on the indicator</dd>
+ <dd>When stopping/closing the multimedia stream, it should automatically show up the volume for the alert role (ringtone, notification, etc)</dd>
+ <dd>No other role should be affected by the volume level used by the multimedia role</dd>
+ <dt>Play a alarm stream (clock-app) and change the volume on the indicator when the stream is active</dt>
+ <dd>The alarm audio stream should reflect the volume set on the indicator</dd>
+ <dd>When stopping/closing the alarm stream, it should automatically show up the volume for the alert role (ringtone, notification, etc)</dd>
+ <dd>No other role should be affected by the volume level used by the alarm role</dd>
+ <dt>Start a voice call using the dialer-app and change the volume on the indicator when the call is active</dt>
+ <dd>The phone audio stream should reflect the volume set on the indicator</dd>
+ <dd>When hanging up the voice call it should automatically show up the volume for the alert role (ringtone, notification, etc)</dd>
+ <dd>No other role should be affected by the volume level used by the phone role</dd>
+</dl>
+
+Test-case indicator-sound/unity8-embedded-greeter
+<dl>
+ <dt>NOTE: Only works with embedded greeter, split greeter will require modifications to this test</dt>
+ <dt>Ensure System Settings is set to "Show Messages on Greeter"</dt>
+ <dt>Play a song in the media player</dt>
+ <dd>The song should be heard</dd>
+ <dd>There should be an entry in the sound menu with the meta data for the song being played</dd>
+ <dt>Go to the greeter. This can be done by hitting the lock button twice.</dt>
+ <dt>Ensure the sound menu has song meta data</dt>
+ <dd>There should be an entry in the sound menu with the meta data for the song being played</dd>
+ <dt>Pause the song in the greeter</dt>
+ <dd>The song should stop playing</dd>
+ <dt>Resume the song in the greeter</dt>
+ <dd>The song should continue to play</dd>
+ <dt>Disable System Settings value "Show Messages on Greeter"</dt>
+ <dt>Ensure the sound menu has song meta data</dt>
+ <dd>There should be an entry in the sound menu with the meta data for the song being played</dd>
+ <dt>Go to the greeter. This can be done by hitting the lock button twice.</dt>
+ <dt>Ensure the sound menu does not have song meta data</dt>
+ <dd>There should be an entry for the player but it should have no information on the song being played</dd>
+ <dt>Pause the song in the greeter</dt>
+ <dd>The song should stop playing</dd>
+ <dt>Resume the song in the greeter</dt>
+ <dd>The song should continue to play</dd>
+</dl>