diff -Nru indicator-sound-12.10.2+13.10.20131004/debian/changelog indicator-sound-12.10.2+13.10.20131011/debian/changelog --- indicator-sound-12.10.2+13.10.20131004/debian/changelog 2013-10-11 10:47:16.000000000 +0000 +++ indicator-sound-12.10.2+13.10.20131011/debian/changelog 2013-10-11 10:47:16.000000000 +0000 @@ -1,3 +1,14 @@ +indicator-sound (12.10.2+13.10.20131011-0ubuntu1) saucy; urgency=low + + [ Lars Uebernickel ] + * Allow activating the 'volume' action It does the same as the + 'scroll' action except showing a notification. (LP: #1236292) + + [ Ubuntu daily release ] + * Automatic snapshot from revision 389 + + -- Ubuntu daily release Fri, 11 Oct 2013 04:27:50 +0000 + indicator-sound (12.10.2+13.10.20131004-0ubuntu1) saucy; urgency=low [ Pete Woods ] diff -Nru indicator-sound-12.10.2+13.10.20131004/src/service.vala indicator-sound-12.10.2+13.10.20131011/src/service.vala --- indicator-sound-12.10.2+13.10.20131004/src/service.vala 2013-10-04 02:29:26.000000000 +0000 +++ indicator-sound-12.10.2+13.10.20131011/src/service.vala 2013-10-11 04:27:36.000000000 +0000 @@ -87,8 +87,9 @@ uint player_action_update_id; Notify.Notification notification; + const double volume_step_percentage = 0.06; + void activate_scroll_action (SimpleAction action, Variant? param) { - const double volume_step_percentage = 0.06; int delta = param.get_int32(); /* positive for up, negative for down */ double v = this.volume_control.get_volume () + volume_step_percentage * delta; @@ -202,12 +203,18 @@ } Action create_volume_action () { - var volume_action = new SimpleAction.stateful ("volume", null, this.volume_control.get_volume ()); + var volume_action = new SimpleAction.stateful ("volume", VariantType.INT32, this.volume_control.get_volume ()); volume_action.change_state.connect ( (action, val) => { volume_control.set_volume (val.get_double ()); }); + /* 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)); + }); + this.volume_control.volume_changed.connect (volume_changed); this.volume_control.bind_property ("ready", volume_action, "enabled", BindingFlags.SYNC_CREATE); diff -Nru indicator-sound-12.10.2+13.10.20131004/src/sound-menu.vala indicator-sound-12.10.2+13.10.20131011/src/sound-menu.vala --- indicator-sound-12.10.2+13.10.20131004/src/sound-menu.vala 2013-10-04 02:29:26.000000000 +0000 +++ indicator-sound-12.10.2+13.10.20131011/src/sound-menu.vala 2013-10-11 04:27:36.000000000 +0000 @@ -31,7 +31,7 @@ this.volume_section = new Menu (); if (show_mute) volume_section.append (_("Mute"), "indicator.mute"); - volume_section.append_item (this.create_slider_menu_item ("indicator.volume", 0.0, 1.0, 0.01, + volume_section.append_item (this.create_slider_menu_item ("indicator.volume(0)", 0.0, 1.0, 0.01, "audio-volume-low-zero-panel", "audio-volume-high-panel"));