From b1f2e733c521b83d4417c8d354aac8fcd0c4f126 Mon Sep 17 00:00:00 2001 From: Unit193 Date: Tue, 28 Jan 2014 01:00:38 -0500 Subject: Dropped Recommends to Suggests, indicator-sound isn't used to install those packages anyway, and it's highly irritating having to 'manually' update indicator-sound with --no-install-recommends on the other flavors. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 55aae86..8235ac9 100644 --- a/debian/control +++ b/debian/control @@ -31,7 +31,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, pulseaudio, -Recommends: unity-control-center | gnome-control-center | ubuntu-system-settings, +Suggests: unity-control-center | gnome-control-center | ubuntu-system-settings, Description: System sound indicator. System sound indicator which provides easy control of the PulseAudio sound daemon. -- cgit v1.2.3 From 3da7d8735d5ee17906814ba4da61d11ab2947bd9 Mon Sep 17 00:00:00 2001 From: Unit193 Date: Tue, 28 Jan 2014 05:49:39 -0500 Subject: Revert last commit, simply add pavucontrol as another alternate. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 8235ac9..ef7d463 100644 --- a/debian/control +++ b/debian/control @@ -31,7 +31,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, pulseaudio, -Suggests: unity-control-center | gnome-control-center | ubuntu-system-settings, +Recommends: unity-control-center | gnome-control-center | ubuntu-system-settings | pavucontrol, Description: System sound indicator. System sound indicator which provides easy control of the PulseAudio sound daemon. -- cgit v1.2.3 From da9efdc504926972fc578ebd4edb3c759d419a4d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 31 Jan 2014 14:09:51 -0600 Subject: Adding basic acceptance tests --- tests/manual | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/manual diff --git a/tests/manual b/tests/manual new file mode 100644 index 0000000..201465c --- /dev/null +++ b/tests/manual @@ -0,0 +1,24 @@ + +Test-case indicator-sound/unity7-items-check +
+
Log in to a Unity 7 user session
+
Go to the panel and click on the Sound indicator
+
Ensure there are items in the menu
+
+ +Test-case indicator-sound/unity7-greeter-items-check +
+
Start a system and wait for the greeter or logout of the current user session
+
Go to the panel and click on the Sound indicator
+
Ensure there are items in the menu
+
+ +Test-case indicator-sound/unity8-items-check +
+
Login to a user session running Unity 8
+
Pull down the top panel until it sticks open
+
Navigate through the tabs until "Sound" is shown
+
Sound is at the top of the menu
+
The menu is populated with items
+
+ -- cgit v1.2.3 From 8174c565f1315fb007363a8956152c978553af7d Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 31 Jan 2014 14:09:52 -0600 Subject: Adding merge review policy --- MERGE-REVIEW | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 MERGE-REVIEW diff --git a/MERGE-REVIEW b/MERGE-REVIEW new file mode 100644 index 0000000..1b7ff95 --- /dev/null +++ b/MERGE-REVIEW @@ -0,0 +1,19 @@ + +This documents the expections that the project has on what both submitters +and reviewers should ensure that they've done for a merge into the project. + +== Submitter Responsibilities == + + * Ensure the project compiles and the test suite executes without error + * Ensure that non-obvious code has comments explaining it + * If the change works on specific profiles, please include those in the merge description. + +== Reviewer Responsibilities == + + * Did the Jenkins build compile? Pass? Run unit tests successfully? + * Are there appropriate tests to cover any new functionality? + * If the description says this effects the phone profile: + * Run tests indicator-sound/unity8* + * If the description says this effects the desktop profile: + * Run tests indicator-sound/unity7* + -- cgit v1.2.3 -- cgit v1.2.3 From 838ea79ea2ad530c8780f67503a6bd9b31777b47 Mon Sep 17 00:00:00 2001 From: CI bot Date: Fri, 7 Feb 2014 16:26:07 +0000 Subject: Releasing 12.10.2+14.04.20140207-0ubuntu1 --- debian/changelog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index eb3fedf..4a4263f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +indicator-sound (12.10.2+14.04.20140207-0ubuntu1) trusty; urgency=low + + [ Unit193 ] + * Drop the recommends to suggests for the control centers and system + settings so that flavors that don't seed those packages aren't stuck + with them. + + [ Ted Gould ] + * Adding acceptance tests and merge review policies. + + [ CI bot ] + * Adding acceptance tests and merge review policies + + -- Ubuntu daily release Fri, 07 Feb 2014 16:26:07 +0000 + indicator-sound (12.10.2+14.04.20140124-0ubuntu1) trusty; urgency=low [ Robert Ancell ] -- cgit v1.2.3 From 60d21d58c2dd67a083857aafe9c3d58c4bd0685e Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 20 Feb 2014 17:08:58 +0100 Subject: Add support for amplified volumes Add a settings key "allow-amplified-volume" which controls whether the volume slider stops at 100% or PA_VOLUME_UI_MAX. unity-control-center will provide a ui for this key. --- data/com.canonical.indicator.sound.gschema.xml | 4 +++ src/service.vala | 45 ++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/data/com.canonical.indicator.sound.gschema.xml b/data/com.canonical.indicator.sound.gschema.xml index 102a1db..be759fa 100644 --- a/data/com.canonical.indicator.sound.gschema.xml +++ b/data/com.canonical.indicator.sound.gschema.xml @@ -48,5 +48,9 @@ Whether or not to show the sound indicator in the menu bar. + + false + Whether the volume slider allows setting the volume above 100% + diff --git a/src/service.vala b/src/service.vala index f7d86bb..3a64cb2 100644 --- a/src/service.vala +++ b/src/service.vala @@ -17,7 +17,7 @@ * Lars Uebernickel */ -public class IndicatorSound.Service { +public class IndicatorSound.Service: Object { public Service () { this.settings = new Settings ("com.canonical.indicator.sound"); @@ -54,6 +54,8 @@ public class IndicatorSound.Service { this.notification.set_hint_string ("x-canonical-private-synchronous", "indicator-sound"); } } + + settings.bind ("allow-amplified-volume", this, "allow-amplified-volume", SettingsBindFlags.GET); } public int run () { @@ -71,6 +73,24 @@ public class IndicatorSound.Service { return 0; } + public bool allow_amplified_volume { + get { + return this.max_volume > 1.0; + } + + set { + if (value) { + /* from pulse/volume.h: #define PA_VOLUME_UI_MAX (pa_sw_volume_from_dB(+11.0)) */ + this.max_volume = (double)PulseAudio.Volume.sw_from_dB(11.0) / PulseAudio.Volume.NORM; + } + else { + this.max_volume = 1.0; + } + + this.actions.change_action_state ("volume", this.volume_control.get_volume () / this.max_volume); + } + } + const ActionEntry[] action_entries = { { "root", null, null, "@a{sv} {}", null }, { "scroll", activate_scroll_action, "i", null, null }, @@ -87,6 +107,7 @@ public class IndicatorSound.Service { uint player_action_update_id; Notify.Notification notification; bool syncing_preferred_players = false; + double max_volume = 1.0; const double volume_step_percentage = 0.06; @@ -94,7 +115,7 @@ public class IndicatorSound.Service { int delta = param.get_int32(); /* positive for up, negative for down */ double v = this.volume_control.get_volume () + volume_step_percentage * delta; - this.volume_control.set_volume (v.clamp (0.0, 1.0)); + this.volume_control.set_volume (v.clamp (0.0, this.max_volume)); if (this.notification != null) { string icon; @@ -201,22 +222,32 @@ public class IndicatorSound.Service { void volume_changed (double volume) { var volume_action = this.actions.lookup_action ("volume") as SimpleAction; - volume_action.set_state (new Variant.double (volume)); + volume_action.set_state (new Variant.double (volume / this.max_volume)); this.update_root_icon (); } Action create_volume_action () { - var volume_action = new SimpleAction.stateful ("volume", VariantType.INT32, new Variant.double (this.volume_control.get_volume ())); + /* The action's state is between be in [0.0, 1.0] instead of [0.0, + * max_volume], so that we don't need to update the slider menu item + * every time allow-amplified-volume is changed. Convert between the + * two here, so that we always pass the full range into + * volume_control.set_volume(). + */ + + double volume = this.volume_control.get_volume () / this.max_volume; + + var volume_action = new SimpleAction.stateful ("volume", VariantType.INT32, new Variant.double (volume)); volume_action.change_state.connect ( (action, val) => { - volume_control.set_volume (val.get_double ()); + volume_control.set_volume (val.get_double () * this.max_volume); }); /* activating this action changes the volume by the amount given in the parameter */ volume_action.activate.connect ( (action, param) => { - double v = volume_control.get_volume () + volume_step_percentage * param.get_int32 (); - volume_control.set_volume (v.clamp (0.0, 1.0)); + int delta = param.get_int32 (); + double v = volume_control.get_volume () + volume_step_percentage * delta; + volume_control.set_volume (v.clamp (0.0, this.max_volume)); }); this.volume_control.volume_changed.connect (volume_changed); -- cgit v1.2.3 From 474b7ff95f176c0d1a12df3107c1b21b129b138d Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 20 Feb 2014 18:22:01 +0100 Subject: Clamp volume when in the action's change_state handler --- src/service.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service.vala b/src/service.vala index 3a64cb2..87e8b8b 100644 --- a/src/service.vala +++ b/src/service.vala @@ -240,7 +240,8 @@ public class IndicatorSound.Service: Object { var volume_action = new SimpleAction.stateful ("volume", VariantType.INT32, new Variant.double (volume)); volume_action.change_state.connect ( (action, val) => { - volume_control.set_volume (val.get_double () * this.max_volume); + double v = val.get_double () * this.max_volume; + volume_control.set_volume (v.clamp (0.0, this.max_volume)); }); /* activating this action changes the volume by the amount given in the parameter */ -- cgit v1.2.3 From bbecb29d344887879e900319eb96cf19d44bde27 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 20 Feb 2014 18:32:14 +0100 Subject: Add comments explaining max_volume a bit better --- src/service.vala | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/service.vala b/src/service.vala index 87e8b8b..b1b5ba9 100644 --- a/src/service.vala +++ b/src/service.vala @@ -87,6 +87,7 @@ public class IndicatorSound.Service: Object { this.max_volume = 1.0; } + /* Normalize volume, because the volume action's state is [0.0, 1.0], see create_volume_action() */ this.actions.change_action_state ("volume", this.volume_control.get_volume () / this.max_volume); } } @@ -107,6 +108,10 @@ public class IndicatorSound.Service: Object { uint player_action_update_id; Notify.Notification notification; bool syncing_preferred_players = false; + + /* Maximum volume as a scaling factor between the volume action's state and the value in + * this.volume_control. See create_volume_action(). + */ double max_volume = 1.0; const double volume_step_percentage = 0.06; @@ -222,6 +227,8 @@ public class IndicatorSound.Service: Object { void volume_changed (double volume) { var volume_action = this.actions.lookup_action ("volume") as SimpleAction; + + /* Normalize volume, because the volume action's state is [0.0, 1.0], see create_volume_action() */ volume_action.set_state (new Variant.double (volume / this.max_volume)); this.update_root_icon (); -- cgit v1.2.3 From b5b262fd799c98abb59bf9dfde51e6d5ac6fe7fd Mon Sep 17 00:00:00 2001 From: CI bot Date: Thu, 20 Feb 2014 18:13:43 +0000 Subject: Releasing 12.10.2+14.04.20140220-0ubuntu1 --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4a4263f..675a350 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +indicator-sound (12.10.2+14.04.20140220-0ubuntu1) trusty; urgency=low + + [ Lars Uebernickel ] + * Add support for amplified volumes Add a settings key "allow- + amplified-volume" which controls whether the volume slider stops at + 100% or PA_VOLUME_UI_MAX. unity-control-center will provide a ui for + this key. + + -- Ubuntu daily release Thu, 20 Feb 2014 18:13:42 +0000 + indicator-sound (12.10.2+14.04.20140207-0ubuntu1) trusty; urgency=low [ Unit193 ] -- cgit v1.2.3 From 44a6d9c161b3c8e24187790110a5b3c040bff522 Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Mon, 24 Feb 2014 12:57:51 +0100 Subject: Remove the new added allow-applified key, it's moved to shared schemas, that way the other desktop components don't need to depends on indicator-sound only to read that settings --- data/com.canonical.indicator.sound.gschema.xml | 4 ---- debian/control | 1 + src/service.vala | 4 +++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/data/com.canonical.indicator.sound.gschema.xml b/data/com.canonical.indicator.sound.gschema.xml index be759fa..102a1db 100644 --- a/data/com.canonical.indicator.sound.gschema.xml +++ b/data/com.canonical.indicator.sound.gschema.xml @@ -48,9 +48,5 @@ Whether or not to show the sound indicator in the menu bar. - - false - Whether the volume slider allows setting the volume above 100% - diff --git a/debian/control b/debian/control index ef7d463..c7b3ed8 100644 --- a/debian/control +++ b/debian/control @@ -31,6 +31,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, pulseaudio, + gsettings-ubuntu-schemas (>= 0.0.1+14.04.20140224), Recommends: unity-control-center | gnome-control-center | ubuntu-system-settings | pavucontrol, Description: System sound indicator. System sound indicator which provides easy control of the PulseAudio sound diff --git a/src/service.vala b/src/service.vala index b1b5ba9..22e5f1c 100644 --- a/src/service.vala +++ b/src/service.vala @@ -20,6 +20,7 @@ public class IndicatorSound.Service: Object { public Service () { this.settings = new Settings ("com.canonical.indicator.sound"); + this.sharedsettings = new Settings ("com.ubuntu.sound"); this.volume_control = new VolumeControl (); @@ -55,7 +56,7 @@ public class IndicatorSound.Service: Object { } } - settings.bind ("allow-amplified-volume", this, "allow-amplified-volume", SettingsBindFlags.GET); + sharedsettings.bind ("allow-amplified-volume", this, "allow-amplified-volume", SettingsBindFlags.GET); } public int run () { @@ -103,6 +104,7 @@ public class IndicatorSound.Service: Object { SimpleActionGroup actions; HashTable menus; Settings settings; + Settings sharedsettings; VolumeControl volume_control; MediaPlayerList players; uint player_action_update_id; -- cgit v1.2.3 From 1bbfa7f3988d67f1086eb79368a47fb44ce998a9 Mon Sep 17 00:00:00 2001 From: CI bot Date: Mon, 24 Feb 2014 14:33:08 +0000 Subject: Releasing 12.10.2+14.04.20140224-0ubuntu1 --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index 675a350..818a735 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +indicator-sound (12.10.2+14.04.20140224-0ubuntu1) trusty; urgency=low + + [ Sebastien Bacher ] + * Remove the new added allow-applified key, it's moved to shared + schemas, that way the other desktop components don't need to depends + on indicator-sound only to read that settings + + -- Ubuntu daily release Mon, 24 Feb 2014 14:33:07 +0000 + indicator-sound (12.10.2+14.04.20140220-0ubuntu1) trusty; urgency=low [ Lars Uebernickel ] -- cgit v1.2.3