From d7d4b4a8cf917e6e1010025e4c60d836c097021a Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Sat, 20 Sep 2025 11:00:57 +0200 Subject: [PATCH] add Playback Next menu item --- application/window.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/application/window.c b/application/window.c index b72539f..b350920 100644 --- a/application/window.c +++ b/application/window.c @@ -44,6 +44,8 @@ static void PlayRepeatCB(Widget w, void *udata, void *cdata); static void PlayRepeatListCB(Widget w, void *udata, void *cdata); static void PlayAutoPlayCB(Widget w, void *udata, void *cdata); static void PlayRandomCB(Widget w, void *udata, void *cdata); +static void PlayPreviousCB(Widget w, void *udata, void *cdata); +static void PlayNextCB(Widget w, void *udata, void *cdata); static void ViewFullscreenCB(Widget w, void *udata, void *cdata); static void ViewSidebarCB(Widget w, void *udata, void *cdata); static void ViewAdjustWindowSizeCB(Widget w, void *udata, void *cdata); @@ -501,8 +503,11 @@ static void WindowCreateMenu(MainWindow *win, Widget parent, Arg *mbargs, int nm // play menu win->playRepeatTrackButton = createToggleMenuItem(playMenu, "playRepeatTrack", "Repeat", 'R', False, NULL, NULL, PlayRepeatCB, win); win->playRepeatListButton = createToggleMenuItem(playMenu, "playRepeatList", "Repeat List", 'L', False, NULL, NULL, PlayRepeatListCB, win); - win->playRandom = createToggleMenuItem(playMenu, "playRandom", "Random Playback", 'P', False, NULL, NULL, PlayRandomCB, win); + win->playRandom = createToggleMenuItem(playMenu, "playRandom", "Random Playback", 'a', False, NULL, NULL, PlayRandomCB, win); win->playAutoPlayButton = createToggleMenuItem(playMenu, "playAutoNext", "Autoplay Folder", 'A', False, NULL, NULL, PlayAutoPlayCB, win); + createMenuSeparator(playMenu); + //createMenuItem(playMenu, "playPrev", "Previous", 'P', NULL, NULL, PlayPreviousCB, win); + createMenuItem(playMenu, "playPrev", "Next", 'N', NULL, NULL, PlayNextCB, win); XtVaSetValues(win->playRepeatTrackButton, XmNindicatorType, XmONE_OF_MANY, NULL); XtVaSetValues(win->playRepeatListButton, XmNindicatorType, XmONE_OF_MANY, NULL); XtVaSetValues(win->playAutoPlayButton, XmNindicatorType, XmONE_OF_MANY, NULL); @@ -668,6 +673,15 @@ static void PlayRandomCB(Widget w, void *udata, void *cdata) { XtVaSetValues(win->playAutoPlayButton, XmNset, 0, NULL); } +static void PlayPreviousCB(Widget w, void *udata, void *cdata) { + +} + +static void PlayNextCB(Widget w, void *udata, void *cdata) { + MainWindow *win = udata; + PlayListPlayNext(win, true); +} + static void ViewFullscreenCB(Widget w, void *udata, void *cdata) { if(main_window->fullscreen) { WindowFullscreen(main_window, FALSE); -- 2.47.3