Merge lp:~cjcurran/indicator-sound/bugfix_522765 into lp:indicator-sound/0.1

Proposed by Conor Curran
Status: Merged
Merged at revision: not available
Proposed branch: lp:~cjcurran/indicator-sound/bugfix_522765
Merge into: lp:indicator-sound/0.1
Diff against target: 33 lines (+4/-1)
2 files modified
src/indicator-sound.c (+3/-0)
src/pulse-manager.c (+1/-1)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/bugfix_522765
Reviewer Review Type Date Requested Status
David Barth Approve
Matthew Paul Thomas design option Pending
Review via email: mp+19610@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Conor Curran (cjcurran) wrote :

Bug fix which disables slider when in mute state. More tricky than first anticipated.

Revision history for this message
David Barth (dbarth) wrote :

Looks good.

So the behavior here is that when trying to change the volume while the sound is muted, the sound is kept muted. Inviting design to sign off on this one.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/indicator-sound.c'
2--- src/indicator-sound.c 2010-02-18 11:11:38 +0000
3+++ src/indicator-sound.c 2010-02-18 14:34:13 +0000
4@@ -326,6 +326,7 @@
5 static void determine_state_from_volume(gdouble volume_percent)
6 {
7 /* g_debug("determine_state_from_volume - previous_state = %i", previous_state);*/
8+
9 gint state = previous_state;
10 if (volume_percent < 30.0 && volume_percent > 0){
11 state = STATE_LOW;
12@@ -431,6 +432,8 @@
13 **/
14 static gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer data)
15 {
16+ if (current_state == STATE_MUTED)
17+ return FALSE;
18
19 GtkWidget* slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)volume_slider);
20 GtkRange* range = (GtkRange*)slider;
21
22=== modified file 'src/pulse-manager.c'
23--- src/pulse-manager.c 2010-02-18 11:11:38 +0000
24+++ src/pulse-manager.c 2010-02-18 14:34:13 +0000
25@@ -342,7 +342,7 @@
26 if(DEFAULT_SINK_INDEX == s->index)
27 {
28 //update the UI
29- if (volume_changed == TRUE)
30+ if (volume_changed == TRUE && s->mute == FALSE)
31 {
32 pa_volume_t vol = pa_cvolume_avg(&s->volume);
33 gdouble volume_percent = ((gdouble) vol * 100) / PA_VOLUME_NORM;

Subscribers

People subscribed via source and target branches