diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-03-10 10:53:23 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-03-10 10:53:23 +0000 |
commit | 16021586200c0e7746ce787e43a8721dfe23ae48 (patch) | |
tree | c8eff2bb05d74e33902fe0d185e603c627a14109 /src/indicator-sound.c | |
parent | ea8064d34d73a1b242cc571fbfd9f0f39128178a (diff) | |
download | ayatana-indicator-sound-16021586200c0e7746ce787e43a8721dfe23ae48.tar.gz ayatana-indicator-sound-16021586200c0e7746ce787e43a8721dfe23ae48.tar.bz2 ayatana-indicator-sound-16021586200c0e7746ce787e43a8721dfe23ae48.zip |
fixed that annoying startup in mute state allowing slider to move - race conditions on start up are pretty hairy
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r-- | src/indicator-sound.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 5fd68b2..1876e69 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -235,6 +235,9 @@ static gboolean new_slider_item(DbusmenuMenuitem * newitem, DbusmenuMenuitem * p gtk_image_set_from_icon_name(GTK_IMAGE(primary_image), g_hash_table_lookup(volume_states, GINT_TO_POINTER(STATE_ZERO)), DESIGN_TEAM_SIZE); GtkWidget* secondary_image = ido_scale_menu_item_get_secondary_image((IdoScaleMenuItem*)volume_slider); gtk_image_set_from_icon_name(GTK_IMAGE(secondary_image), g_hash_table_lookup(volume_states, GINT_TO_POINTER(STATE_HIGH)), DESIGN_TEAM_SIZE); + + // the race conditions at start up are like a west waterford greyhound dart. god knows who wins, who breaks a leg. + gtk_widget_set_sensitive(volume_slider, !initial_mute); gtk_widget_show_all(volume_slider); @@ -412,9 +415,6 @@ static void fetch_mute_value_from_dbus() initial_mute = *mute_input; if (initial_mute == TRUE) update_state(STATE_MUTED); -// TODO bug down below - VIRTUALLY IMPOSSIBLE TO SETUP SLIDER WITH ANY ALTERNATIVE STARTUP STATE -/* GtkWidget* slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)volume_slider);*/ -/* gtk_widget_set_sensitive(slider, !initial_mute);*/ g_free(mute_input); g_debug("at the indicator start up and the MUTE returned from dbus method is %i", initial_mute); } |