From 58f26dfbe6c340a6118b297e41ca6516f5c4510d Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 19 Dec 2005 12:55:08 +0000 Subject: [PATCH] (minput_get_title_icon): If LANGUAGE is Mt, try also a file name sans language. --- src/input.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/input.c b/src/input.c index e548519..9db75df 100644 --- a/src/input.c +++ b/src/input.c @@ -3819,10 +3819,17 @@ minput_get_title_icon (MSymbol language, MSymbol name) else if (language != Mnil && name != Mnil) { - file = alloca (MSYMBOL_NAMELEN (language) + MSYMBOL_NAMELEN (name) + 12); - sprintf (file, "icon/%s-%s.png", (char *) MSYMBOL_NAME (language), + char *buf = alloca (MSYMBOL_NAMELEN (language) + MSYMBOL_NAMELEN (name) + + 12); + + sprintf (buf, "icons/%s-%s.png", (char *) MSYMBOL_NAME (language), (char *) MSYMBOL_NAME (name)); - file = mdatabase__find_file (file); + file = mdatabase__find_file (buf); + if (! file && language == Mt) + { + sprintf (buf, "icons/%s.png", (char *) MSYMBOL_NAME (name)); + file = mdatabase__find_file (buf); + } } if (file) -- 1.7.10.4