From 7de60c339a2e7e9a85618081e06d6eff66810377 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Thu, 18 Feb 2010 14:30:43 +0000 Subject: Dont listen to key events once the state is muted --- src/indicator-sound.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/indicator-sound.c') diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 9c73df4..8e79db6 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -326,6 +326,7 @@ static void update_state(const gint state) static void determine_state_from_volume(gdouble volume_percent) { /* g_debug("determine_state_from_volume - previous_state = %i", previous_state);*/ + gint state = previous_state; if (volume_percent < 30.0 && volume_percent > 0){ state = STATE_LOW; @@ -431,6 +432,8 @@ key_press_cb: **/ static gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer data) { + if (current_state == STATE_MUTED) + return FALSE; GtkWidget* slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)volume_slider); GtkRange* range = (GtkRange*)slider; -- cgit v1.2.3