diff --git a/src/bin/clapper-app/clapper-app-application.c b/src/bin/clapper-app/clapper-app-application.c
index 703d8dec..0e5ab8ba 100644
--- a/src/bin/clapper-app/clapper-app-application.c
+++ b/src/bin/clapper-app/clapper-app-application.c
@@ -333,6 +333,23 @@ add_uri (GSimpleAction *action, GVariant *param, gpointer user_data)
clapper_app_uri_dialog_open_uri (gtk_app);
}
+static void
+clear_queue (GSimpleAction *action, GVariant *param, gpointer user_data)
+{
+ GtkApplication *gtk_app = GTK_APPLICATION (user_data);
+ GtkWindow *window = gtk_application_get_active_window (gtk_app);
+ ClapperPlayer *player;
+ ClapperQueue *queue;
+
+ while (window && !CLAPPER_APP_IS_WINDOW (window))
+ window = gtk_window_get_transient_for (window);
+
+ player = clapper_app_window_get_player (CLAPPER_APP_WINDOW (window));
+ queue = clapper_player_get_queue (player);
+
+ clapper_queue_clear (queue);
+}
+
static void
new_window (GSimpleAction *action, GVariant *param, gpointer user_data)
{
@@ -692,6 +709,7 @@ clapper_app_application_constructed (GObject *object)
static const GActionEntry app_actions[] = {
{ "add-files", add_files, NULL, NULL, NULL },
{ "add-uri", add_uri, NULL, NULL, NULL },
+ { "clear-queue", clear_queue, NULL, NULL, NULL },
{ "new-window", new_window, NULL, NULL, NULL },
{ "info", show_info, NULL, NULL, NULL },
{ "preferences", show_preferences, NULL, NULL, NULL },
diff --git a/src/bin/clapper-app/ui/clapper-app-queue-list.ui b/src/bin/clapper-app/ui/clapper-app-queue-list.ui
index 20b9f7db..577adad4 100644
--- a/src/bin/clapper-app/ui/clapper-app-queue-list.ui
+++ b/src/bin/clapper-app/ui/clapper-app-queue-list.ui
@@ -183,5 +183,11 @@
app.add-uri
+
+ -
+ Clear Queue
+ app.clear-queue
+
+