removed trailing whitespace
[xboard.git] / ngamelist.c
index f3ef1d9..d43920b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ngamelist.c -- Game list window, Xt-independent front-end code for XBoard
  *
- * Copyright 1995, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ * Copyright 1995, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
  * ------------------------------------------------------------------------
  *
  * GNU XBoard is free software: you can redistribute it and/or modify
@@ -82,7 +82,7 @@ static void GameListReplace P((int page));
 static void GL_Button P((int n));
 
 static Option gamesOptions[] = {
-{ 200,  LR|TB,     400, NULL, (void*) list,       "", NULL, ListBox, "" },
+{ 200,  LR|TB,     400, NULL, (void*) list,       NULL, NULL, ListBox, "" },
 {   0,  0,         100, NULL, (void*) &filterPtr, "", NULL, TextBox, "" },
 {   4,  SAME_ROW,    0, NULL, (void*) &GL_Button, NULL, NULL, Button, N_("find position") },
 {   2,  SAME_ROW,    0, NULL, (void*) &GL_Button, NULL, NULL, Button, N_("narrow") }, // buttons referred to by ID in value (=first) field!
@@ -152,8 +152,8 @@ GameListCreate (char *name)
 {
     int new;
     if(new = GenericPopUp(gamesOptions, name, GameListDlg, BoardWindow, NONMODAL, 1))
-       AddHandler(&gamesOptions[1], 4),
-       AddHandler(&gamesOptions[0], 5);
+       AddHandler(&gamesOptions[1], GameListDlg, 4),
+       AddHandler(&gamesOptions[0], GameListDlg, 5);
     FocusOnWidget(&gamesOptions[0], GameListDlg);
     return new;
 }
@@ -214,7 +214,7 @@ GameListReplace (int page)
   if(page + 1000 <= listLength) *st++ = _("next page");
   *st = NULL;
 
-  LoadListBox(&gamesOptions[0], _("no games matched your request"));
+  LoadListBox(&gamesOptions[0], _("no games matched your request"), -1, -1);
   HighlightWithScroll(&gamesOptions[0], listEnd > 1000, listEnd);
   snprintf(buf, MSG_SIZ, _("%s - %d/%d games (%d-%d-%d)"), glc->filename, listLength, ((ListGame *) gameList.tailPred)->number, wins, losses, draws);
   SetDialogTitle(GameListDlg, buf);
@@ -244,6 +244,12 @@ GameListPopUp (FILE *fp, char *filename)
     MarkMenu("View.GameList", GameListDlg);
 }
 
+FILE *
+GameFile ()
+{
+  return glc ? glc->fp : NULL;
+}
+
 void
 GameListDestroy ()
 {
@@ -352,7 +358,7 @@ SaveGameListAsText (FILE *f)
 
     /* Copy the list into the global memory block */
     if( f != NULL ) {
+
         lg = (ListGame *) gameList.head;
 
         for (nItem = 0; nItem < ((ListGame *) gameList.tailPred)->number; nItem++){
@@ -369,4 +375,3 @@ SaveGameListAsText (FILE *f)
     }
     return False;
 }
-