From: H.G.Muller Date: Sat, 11 Oct 2014 17:26:23 +0000 (+0200) Subject: Try also /home//.logo.pgn for user logo X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=b8ca804f407704168722e066ca850ee945a13f3a;hp=d9ca4909e480dc6c976da2f5509870868546d0d8;p=xboard.git Try also /home//.logo.pgn for user logo The user logo now also has a cascade, first looking in the user's home folder for a file .logo.png, and then in the -logoDir for .png. --- diff --git a/gtk/xboard.c b/gtk/xboard.c index 20b55c5..81fc8d6 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -226,6 +226,7 @@ void DisplayMove P((int moveNumber)); void update_ics_width P(()); int CopyMemoProc P(()); static gboolean EventProc P((GtkWidget *widget, GdkEvent *event, gpointer g)); +static int FindLogo P((char *place, char *name, char *buf)); #ifdef TODO_GTK #if ENABLE_NLS @@ -1201,8 +1202,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); }