diff options
author | Sebastien Bacher <seb128@ubuntu.com> | 2010-02-18 19:13:28 +0100 |
---|---|---|
committer | Sebastien Bacher <seb128@ubuntu.com> | 2010-02-18 19:13:28 +0100 |
commit | 31de84542b37eec39e8f871b0c61d2e3e683f28b (patch) | |
tree | f1220152233c53c3098bf1e9a80b0fbc4f5449d1 /src | |
parent | e25f723756c2804f230df85d176e122f30cf0830 (diff) | |
parent | 191f8934b194f2728e175b228f1931f28c1ab8fa (diff) | |
download | ayatana-indicator-sound-31de84542b37eec39e8f871b0c61d2e3e683f28b.tar.gz ayatana-indicator-sound-31de84542b37eec39e8f871b0c61d2e3e683f28b.tar.bz2 ayatana-indicator-sound-31de84542b37eec39e8f871b0c61d2e3e683f28b.zip |
releasing version 0.1.1-0ubuntu2
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-sound.c | 15 |
1 files changed, 9 insertions, 6 deletions
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; } /** |