diff --git a/include/ocarina/button.h b/include/ocarina/button.h index 74f79888..93623406 100644 --- a/include/ocarina/button.h +++ b/include/ocarina/button.h @@ -21,6 +21,7 @@ GtkWidget *make_pause_button(); GtkWidget *make_stop_button(); GtkWidget *make_rewind_button(); GtkWidget *make_forward_button(); +GtkWidget *make_next_button(); GtkWidget *make_open_button(); GtkWidget *make_volume_button(); diff --git a/ocarina/buttons/controls.cpp b/ocarina/buttons/controls.cpp index 20217903..5e1d8d7b 100644 --- a/ocarina/buttons/controls.cpp +++ b/ocarina/buttons/controls.cpp @@ -3,6 +3,7 @@ using namespace std; #include +#include #include static list play_buttons; @@ -97,3 +98,15 @@ GtkWidget *make_forward_button() on_click_forward, true); } + +static void on_click_next(GtkWidget *b, GdkEvent *e, gpointer d) +{ + libsaria::next(); +} + +GtkWidget *make_next_button() +{ + return make_button(GTK_STOCK_MEDIA_NEXT, + on_click_next, + true); +} diff --git a/ocarina/footer/controls.cpp b/ocarina/footer/controls.cpp index 6a27ed1c..cec485d6 100644 --- a/ocarina/footer/controls.cpp +++ b/ocarina/footer/controls.cpp @@ -11,6 +11,7 @@ static GtkWidget *make_buttons() gtk_widget_show(buttons); box_pack_end(buttons, make_volume_button(), FALSE, FALSE, 0); + box_pack_end(buttons, make_next_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_stop_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_pause_button(), FALSE, FALSE, 0); box_pack_end(buttons, make_play_button(), FALSE, FALSE, 0);