From: handa Date: Mon, 19 Dec 2005 12:55:08 +0000 (+0000) Subject: (minput_get_title_icon): If LANGUAGE is Mt, try also a X-Git-Tag: REL-1-3-0~11 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=58f26dfbe6c340a6118b297e41ca6516f5c4510d;p=m17n%2Fm17n-lib.git (minput_get_title_icon): If LANGUAGE is Mt, try also a file name sans language. --- 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)