diff --git a/gui/audio.c b/gui/audio.c index 3bc961e7..c76031af 100644 --- a/gui/audio.c +++ b/gui/audio.c @@ -71,6 +71,11 @@ void __audio_seek(GtkRange *range, GtkScrollType type, double value, gpointer da audio_seek(value * GST_SECOND); } +void __audio_volume_changed(GtkScaleButton *button, gdouble value, gpointer data) +{ + audio_set_volume((unsigned int)value); +} + void __audio_favorite(GtkToggleButton *toggle, gpointer data) { if (gtk_toggle_button_get_active(toggle)) @@ -117,7 +122,10 @@ struct audio_ops audio_ops = { void gui_audio_init() { + GtkScaleButton *volume = GTK_SCALE_BUTTON(gui_builder_widget("o_volume")); g_timeout_add(500, __audio_timeout, gui_builder_object("o_progress")); + gtk_scale_button_set_value(volume, audio_get_volume()); + gtk_button_set_relief(GTK_BUTTON(volume), GTK_RELIEF_NORMAL); } #ifdef CONFIG_TESTING diff --git a/share/ocarina/ocarina6.glade b/share/ocarina/ocarina6.glade index 2bd36206..f815f04c 100644 --- a/share/ocarina/ocarina6.glade +++ b/share/ocarina/ocarina6.glade @@ -2,6 +2,12 @@ + + 100 + 100 + 1 + 10 + True False @@ -459,6 +465,49 @@ True + + + True + True + False + True + center + center + vertical + button + adjustment1 + audio-volume-muted +audio-volume-high +audio-volume-low +audio-volume-medium + False + + + + True + True + center + center + none + + + + + True + True + center + center + none + + + + + False + False + 2 + True + + 3