aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/indicator-sound.c3
-rw-r--r--src/pulse-manager.c2
2 files changed, 4 insertions, 1 deletions
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;
diff --git a/src/pulse-manager.c b/src/pulse-manager.c
index 52f9cba..9b9d7cd 100644
--- a/src/pulse-manager.c
+++ b/src/pulse-manager.c
@@ -342,7 +342,7 @@ static void update_sink_info(pa_context *c, const pa_sink_info *info, int eol, v
if(DEFAULT_SINK_INDEX == s->index)
{
//update the UI
- if (volume_changed == TRUE)
+ if (volume_changed == TRUE && s->mute == FALSE)
{
pa_volume_t vol = pa_cvolume_avg(&s->volume);
gdouble volume_percent = ((gdouble) vol * 100) / PA_VOLUME_NORM;