X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xaw%2Fxboard.c;h=8792a772b73c9e2e48db0fbb521ad750e1c99e86;hb=4011e8678d85310eedf19fd00aa5d96a9a60770a;hp=ca3c380fdc03c0108689a7484bab1be4e57af8c4;hpb=6d626a70206cc3ad3f5ea665299c762e1013042e;p=xboard.git diff --git a/xaw/xboard.c b/xaw/xboard.c index ca3c380..8792a77 100644 --- a/xaw/xboard.c +++ b/xaw/xboard.c @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -256,6 +256,7 @@ void ManInner P((Widget w, XEvent *event, String *prms, Cardinal *nprms)); void DisplayMove P((int moveNumber)); void update_ics_width P(()); int CopyMemoProc P(()); +static int FindLogo P((char *place, char *name, char *buf)); /* * XBoard depends on Xt R4 or higher @@ -1292,8 +1293,10 @@ main (int argc, char **argv) if(appData.logoSize) { // locate and read user logo - char buf[MSG_SIZ]; - snprintf(buf, MSG_SIZ, "%s/%s.png", appData.logoDir, UserName()); + char buf[MSG_SIZ], name[MSG_SIZ]; + snprintf(name, MSG_SIZ, "/home/%s", UserName()); + if(!FindLogo(name, ".logo", buf)) + FindLogo(appData.logoDir, name + 6, buf); ASSIGN(userLogo, buf); } @@ -2120,6 +2123,15 @@ ManProc () } void +InfoProc () +{ + char buf[MSG_SIZ]; + snprintf(buf, sizeof(buf), "xterm -e info --directory %s --directory . -f %s &", + INFODIR, INFOFILE); + system(buf); +} + +void SetWindowTitle (char *text, char *title, char *icon) { Arg args[16]; @@ -2514,11 +2526,10 @@ LoadLogo (ChessProgramState *cps, int n, Boolean ics) } else if(appData.autoLogo) { if(ics) { // [HGM] logo: in ICS mode second can be used for ICS sprintf(buf, "%s/%s.png", appData.logoDir, appData.icsHost); - } else if(appData.logoDir && appData.logoDir[0]) { } else { // engine; cascade if(!FindLogo(appData.logoDir, cps->tidy, buf) && // first try user log folder !FindLogo(appData.directory[n], "logo", buf) && // then engine directory - !FindLogo("/usr/localshare/games/plugins/logos", cps->tidy, buf) ) // then system folders + !FindLogo("/usr/local/share/games/plugins/logos", cps->tidy, buf) ) // then system folders FindLogo("/usr/share/games/plugins/logos", cps->tidy, buf); } }