From: Olaf Wintermann Date: Mon, 5 Sep 2022 13:46:34 +0000 (+0200) Subject: move random play item to radio group X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=83d9f3aaf8206aa081ead0ff630a1c33ed670d71;p=uwplayer.git move random play item to radio group --- diff --git a/application/window.c b/application/window.c index 7f1158c..621ada7 100644 --- a/application/window.c +++ b/application/window.c @@ -486,14 +486,12 @@ 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->playAutoPlayButton = createToggleMenuItem(playMenu, "playAutoNext", "Autoplay Folder", 'A', False, NULL, NULL, PlayAutoPlayCB, 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); - - createMenuSeparator(playMenu); - - win->playRandom = createToggleMenuItem(playMenu, "playRandom", "Random Playback", 'P', False, NULL, NULL, PlayRandomCB, win); + XtVaSetValues(win->playRandom, XmNindicatorType, XmONE_OF_MANY, NULL); // view menu @@ -625,8 +623,10 @@ static void PlayRepeatCB(Widget w, void *udata, void *cdata) { win->playlist.repeatTrack = XmToggleButtonGadgetGetState(w); win->playlist.repeatList = 0; win->playlist.autoplayFolder = 0; + win->playlist.random = 0; XtVaSetValues(win->playRepeatListButton, XmNset, 0, NULL); XtVaSetValues(win->playAutoPlayButton, XmNset, 0, NULL); + XtVaSetValues(win->playRandom, XmNset, 0, NULL); } static void PlayRepeatListCB(Widget w, void *udata, void *cdata) { @@ -634,8 +634,10 @@ static void PlayRepeatListCB(Widget w, void *udata, void *cdata) { win->playlist.repeatList = XmToggleButtonGadgetGetState(w); win->playlist.repeatTrack = 0; win->playlist.autoplayFolder = 0; + win->playlist.random = 0; XtVaSetValues(win->playRepeatTrackButton, XmNset, 0, NULL); XtVaSetValues(win->playAutoPlayButton, XmNset, 0, NULL); + XtVaSetValues(win->playRandom, XmNset, 0, NULL); } static void PlayAutoPlayCB(Widget w, void *udata, void *cdata) { @@ -643,13 +645,21 @@ static void PlayAutoPlayCB(Widget w, void *udata, void *cdata) { win->playlist.autoplayFolder = XmToggleButtonGadgetGetState(w); win->playlist.repeatTrack = 0; win->playlist.repeatList = 0; + win->playlist.random = 0; XtVaSetValues(win->playRepeatTrackButton, XmNset, 0, NULL); XtVaSetValues(win->playRepeatListButton, XmNset, 0, NULL); + XtVaSetValues(win->playRandom, XmNset, 0, NULL); } static void PlayRandomCB(Widget w, void *udata, void *cdata) { MainWindow *win = udata; win->playlist.random = XmToggleButtonGadgetGetState(w); + win->playlist.repeatTrack = 0; + win->playlist.repeatList = 0; + win->playlist.autoplayFolder = 0; + XtVaSetValues(win->playRepeatTrackButton, XmNset, 0, NULL); + XtVaSetValues(win->playRepeatListButton, XmNset, 0, NULL); + XtVaSetValues(win->playAutoPlayButton, XmNset, 0, NULL); } static void ViewFullscreenCB(Widget w, void *udata, void *cdata) {