ocarina: Set volume button to current audio levels

When the button is created, it should be set to the current volume of
the gstreamer pipeline.  If I don't do this, the icon will default to a
"muted" status.
This commit is contained in:
Bryan Schumaker 2011-09-03 10:25:53 -04:00
parent ceddd240ca
commit 7cdd6b1664
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,8 @@ static void changed(GtkWidget *button, gdouble value, gpointer data)
GtkWidget *make_volume_button()
{
GtkWidget *volume = gtk_volume_button_new();
gtk_scale_button_set_value(GTK_SCALE_BUTTON(volume),
libsaria_get()->get_volume());
gtk_widget_show(volume);
set_increment(volume, 0.05);
resize(volume);