return 0;
}
+static Boolean clearPlaylist = TRUE;
+
static Boolean cmd_open(XtPointer data) {
MainWindow *win = GetMainWindow();
char *file = data;
printf("open %s\n", file);
- PlayListClear(win);
+ if(clearPlaylist) {
+ PlayListClear(win);
+ clearPlaylist = FALSE;
+ }
PlayListAddFile(win, file);
PlayListPlayTrack(win, win->playlist.tracks->size-1);
break;
}
printf("accept instance connection\n");
+ clearPlaylist = TRUE; // the first open command will clear the playlist
msgbuf.pos = 0;
msgbuf.size = 0;