static void
GL_Button (int n)
{
- int index, j;
+ int index;
n = gamesOptions[n].value; // use marker in option rather than n itself, for more easy adding/deletng of buttons
if (n == 6) { // close
PopDown(GameListDlg);
GameListReplace (int page)
{
// filter: put in separate routine, to make callable from call-back
- char buf[MSG_SIZ], *p, **st=list;
+ char buf[MSG_SIZ], **st=list;
int i;
if(page) *st++ = _("previous page"); else if(listLength > 1000) *st++ = "";
void
GameListPopUp (FILE *fp, char *filename)
{
- char **st;
-
if (glc == NULL) {
glc = (GameListClosure *) calloc(1, sizeof(GameListClosure));
glc->x = glc->y = -1;
void
ShowGameListProc ()
{
- Arg args[16];
- int j;
-
if (glc == NULL) {
DisplayError(_("There is no game list"), 0);
return;
{
int index;
- if (glc == NULL || listLength == 0) return 0;
+ if (glc == NULL || listLength == 0) return 1;
if(direction == 100) { FocusOnWidget(&gamesOptions[0], GameListDlg); return 1; }
index = SelectedListBoxItem(&gamesOptions[0]);
- if (index < 0) return;
+ if (index < 0) return 1;
if(page && (index == 0 && direction < 1 || direction == -4)) {
page -= 1000;
if(page < 0) page = 0; // safety
index += direction;
if(direction < -1) index = 0;
if(direction > 1) index = listEnd-1;
- if(index < 0 || index >= listEnd) return;
+ if(index < 0 || index >= listEnd) return 1;
HighlightWithScroll(&gamesOptions[0], index, listEnd);
if(!doLoad) return 1;
}