From b8ca804f407704168722e066ca850ee945a13f3a Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 11 Oct 2014 19:26:23 +0200 Subject: [PATCH] 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. --- gtk/xboard.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) 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); } -- 1.7.0.4