diff options
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | src/indicator-sound.c | 15 |
2 files changed, 15 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index f1c5e0a..dade942 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +indicator-sound (0.1.1-0ubuntu2) lucid; urgency=low + + * Backporting trunk commit to fix keyboard controls (lp: #521088) + + -- Sebastien Bacher <seb128@ubuntu.com> Thu, 18 Feb 2010 19:13:03 +0100 + indicator-sound (0.1.1-0ubuntu1) lucid; urgency=low * New upstream version diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 8e79db6..acacddc 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -432,8 +432,7 @@ key_press_cb: **/ static gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer data) { - if (current_state == STATE_MUTED) - return FALSE; + gboolean digested = FALSE; GtkWidget* slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)volume_slider); GtkRange* range = (GtkRange*)slider; @@ -444,6 +443,7 @@ static gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer dat switch(event->keyval) { case GDK_Right: + digested = TRUE; if(event->state & GDK_CONTROL_MASK) { new_value = 100; @@ -454,6 +454,7 @@ static gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer dat } break; case GDK_Left: + digested = TRUE; if(event->state & GDK_CONTROL_MASK) { new_value = 0; @@ -464,22 +465,24 @@ static gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer dat } break; case GDK_plus: - new_value = current_value + five_percent; + digested = TRUE; + new_value = current_value + five_percent; break; case GDK_minus: - new_value = current_value - five_percent; + digested = TRUE; + new_value = current_value - five_percent; break; default: break; } new_value = CLAMP(new_value, 0, 100); - if(new_value != current_value) + if(new_value != current_value && current_state != STATE_MUTED) { g_debug("Attempting to set the range from the key listener to %f", new_value); gtk_range_set_value(range, new_value); } - return FALSE; + return digested; } /** |