X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=293f7818cf837dc1719209146f107318d7f92df4;hb=434e83abf93ec88caffddb95ad15d03df27b984b;hp=538d55edb60d75d851637af0ac157e6c3b392361;hpb=86932d68dc115d304fddb290947fd04323d62cbd;p=xboard.git diff --git a/xboard.c b/xboard.c index 538d55e..293f781 100644 --- a/xboard.c +++ b/xboard.c @@ -1410,6 +1410,7 @@ XBoard square size (hint): %d\n\ XtSetArg(args[1], XtNforeground, &buttonForegroundPixel); XtGetValues(optList[18].handle, args, 2); } + AppendEnginesToMenu(appData.recentEngineList); xBoardWindow = XtWindow(boardWidget); @@ -2330,6 +2331,12 @@ MenuEngineSelect (Widget w, caddr_t addr, caddr_t index) } void +AppendMenuItem (char *msg, int n) +{ + CreateMenuItem((Widget) optList[6].textValue, msg, (XtCallbackProc) MenuEngineSelect, n); +} + +void SetupDropMenu () { int i, j, count; @@ -2900,24 +2907,6 @@ ModeHighlight () /* * Button/menu procedures */ -int -LoadGamePopUp (FILE *f, int gameNumber, char *title) -{ - cmailMsgLoaded = FALSE; - if (gameNumber == 0) { - int error = GameListBuild(f); - if (error) { - DisplayError(_("Cannot build game list"), error); - } else if (!ListEmpty(&gameList) && - ((ListGame *) gameList.tailPred)->number > 1) { - GameListPopUp(f, title); - return TRUE; - } - GameListDestroy(); - gameNumber = 1; - } - return LoadGame(f, gameNumber, title, FALSE); -} /* this variable is shared between CopyPositionProc and SendPositionSelection */ char *selected_fen_position=NULL; @@ -3171,41 +3160,6 @@ ManInner (Widget w, XEvent *event, String *prms, Cardinal *nprms) } void -DisplayMessage (char *message, char *extMessage) -{ - /* display a message in the message widget */ - - char buf[MSG_SIZ]; - Arg arg; - - if (extMessage) - { - if (*message) - { - snprintf(buf, sizeof(buf), "%s %s", message, extMessage); - message = buf; - } - else - { - message = extMessage; - }; - }; - - safeStrCpy(lastMsg, message, MSG_SIZ); // [HGM] make available - - /* need to test if messageWidget already exists, since this function - can also be called during the startup, if for example a Xresource - is not set up correctly */ - if(optList && optList[14].handle) - { - XtSetArg(arg, XtNlabel, message); - XtSetValues(optList[14].handle, &arg, 1); - }; - - return; -} - -void SetWindowTitle (char *text, char *title, char *icon) { Arg args[16];