static void FileOpenCB(Widget w, void *udata, void *cdata);
static void FileQuitCB(Widget w, void *udata, void *cdata);
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 ViewFullscreenCB(Widget w, void *udata, void *cdata);
static void WindowRealized(MainWindow *win);
createMenuItem(fileMenu, "fileQuit", "Exit", 'E', "Ctrl<Key>Q", "Ctrl+Q", FileQuitCB, NULL);
// play menu
- createToggleMenuItem(playMenu, "playRepeatTrack", "Repeat", 'R', False, NULL, NULL, PlayRepeatCB, win);
+ 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->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);
// view menu
createMenuItem(viewMenu, "viewFullscreen", "Fullscreen", 'F', "<Key>F", "F", ViewFullscreenCB, NULL);
static void PlayRepeatCB(Widget w, void *udata, void *cdata) {
MainWindow *win = udata;
win->repeatTrack = XmToggleButtonGadgetGetState(w);
+ win->repeatList = 0;
+ win->autoplayFolder = 0;
+ XtVaSetValues(win->playRepeatListButton, XmNset, 0, NULL);
+ XtVaSetValues(win->playAutoPlayButton, XmNset, 0, NULL);
+}
+
+static void PlayRepeatListCB(Widget w, void *udata, void *cdata) {
+ MainWindow *win = udata;
+ win->repeatList = XmToggleButtonGadgetGetState(w);
+ win->repeatTrack = 0;
+ win->autoplayFolder = 0;
+ XtVaSetValues(win->playRepeatTrackButton, XmNset, 0, NULL);
+ XtVaSetValues(win->playAutoPlayButton, XmNset, 0, NULL);
+}
+
+static void PlayAutoPlayCB(Widget w, void *udata, void *cdata) {
+ MainWindow *win = udata;
+ win->autoplayFolder = XmToggleButtonGadgetGetState(w);
+ win->repeatTrack = 0;
+ win->repeatList = 0;
+ XtVaSetValues(win->playRepeatTrackButton, XmNset, 0, NULL);
+ XtVaSetValues(win->playRepeatListButton, XmNset, 0, NULL);
}
static void ViewFullscreenCB(Widget w, void *udata, void *cdata) {