aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-sound.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-04-22 17:58:50 +0100
committerConor Curran <conor.curran@canonical.com>2010-04-22 17:58:50 +0100
commit5b74cf4b47b34fc53b89cc98fab413c603e2c80a (patch)
tree2bc3388c9db597c40173da394e48724103dc8d2d /src/indicator-sound.c
parent132bf8d107161102b63bf254056624bc00b8d01f (diff)
downloadayatana-indicator-sound-5b74cf4b47b34fc53b89cc98fab413c603e2c80a.tar.gz
ayatana-indicator-sound-5b74cf4b47b34fc53b89cc98fab413c603e2c80a.tar.bz2
ayatana-indicator-sound-5b74cf4b47b34fc53b89cc98fab413c603e2c80a.zip
panning now honoured at all times, more feedback loop noise removed also from the indicator side
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r--src/indicator-sound.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 7f1f1d6..96b151a 100644
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -117,10 +117,11 @@ static GtkImage *speaker_image = NULL;
static gint current_state = 0;
static gint previous_state = 0;
-static gdouble initial_volume_percent = 0;
+static gdouble initial_volume_percent;
static gboolean initial_mute ;
static gboolean device_available;
-static gboolean slider_in_direct_use = FALSE;
+static gboolean slider_in_direct_use;
+static gdouble exterior_vol_update;
static GtkIconSize design_team_size;
static gint blocked_id;
@@ -163,6 +164,7 @@ static void indicator_sound_init (IndicatorSound *self)
initial_mute = FALSE;
device_available = TRUE;
slider_in_direct_use = FALSE;
+ exterior_vol_update = 0;
g_signal_connect(G_OBJECT(self->service), INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, G_CALLBACK(connection_changed), self);
return;
@@ -551,6 +553,7 @@ static void catch_signal_sink_volume_update(DBusGProxy *proxy, gdouble volume_pe
// DEBUG
gdouble current_value = gtk_range_get_value(range);
g_debug("SIGNAL- update sink volume - current_value : %f and new value : %f", current_value, volume_percent);
+ exterior_vol_update = volume_percent;
gtk_range_set_value(range, volume_percent);
determine_state_from_volume(volume_percent);
}
@@ -597,6 +600,10 @@ This callback will get triggered irregardless of whether its a user change or a
static gboolean value_changed_event_cb(GtkRange *range, gpointer user_data)
{
gdouble current_value = CLAMP(gtk_range_get_value(range), 0, 100);
+ if(current_value == exterior_vol_update){
+ g_debug("ignore the value changed event - its come from the outside");
+ return FALSE;
+ }
DbusmenuMenuitem *item = (DbusmenuMenuitem*)user_data;
GValue value = {0};
g_value_init(&value, G_TYPE_DOUBLE);
@@ -623,7 +630,6 @@ static void slider_released (GtkWidget *widget, gpointer user_data)
}
-
/**
key_press_cb:
**/