gui/audio: Define seek controls completely in glade
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
50a7c83d61
commit
e5e2c87a86
|
@ -8,8 +8,6 @@
|
|||
#include <gui/builder.h>
|
||||
|
||||
|
||||
static GtkScale *o_seek;
|
||||
|
||||
static GtkSpinButton *o_count;
|
||||
static GtkToggleButton *o_enabled;
|
||||
static GtkAdjustment *o_progress;
|
||||
|
@ -77,10 +75,9 @@ struct audio_ops audio_ops = {
|
|||
};
|
||||
|
||||
|
||||
static bool on_seek(GtkScrollType type, double value)
|
||||
void __audio_seek(GtkScrollType type, double value)
|
||||
{
|
||||
audio_seek(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void on_pause_count()
|
||||
|
@ -107,14 +104,10 @@ static int on_timeout(gpointer data)
|
|||
|
||||
void gui_audio_init()
|
||||
{
|
||||
o_seek = GTK_SCALE(gui_builder_widget("o_seek"));
|
||||
|
||||
o_count = GTK_SPIN_BUTTON(gui_builder_widget("o_pause_count"));
|
||||
o_enabled = GTK_TOGGLE_BUTTON(gui_builder_widget("o_pause_enabled"));
|
||||
o_progress = GTK_ADJUSTMENT(gui_builder_object("o_progress"));
|
||||
|
||||
g_signal_connect(o_seek, "change-value", G_CALLBACK(on_seek), NULL);
|
||||
|
||||
g_signal_connect(o_count, "changed", G_CALLBACK(on_pause_count), NULL);
|
||||
g_signal_connect(o_enabled, "toggled", G_CALLBACK(on_pause_enabled), NULL);
|
||||
|
||||
|
|
|
@ -506,6 +506,7 @@ Manager</property>
|
|||
<property name="round_digits">1</property>
|
||||
<property name="draw_value">False</property>
|
||||
<property name="value_pos">left</property>
|
||||
<signal name="change-value" handler="__audio_seek" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
|
Loading…
Reference in New Issue