evas xpm loader - add more rgb.txt file locations...

2 more. /etc/X11/rgb.txt /usr/share/vim/vim80/rgb.txt  ...what i do notice
is that this file seems to have vanished from modern systems... so we'll have
lots of un-fun loading old xpm's with colornames if we cant figure out what
color names map to what colors...
This commit is contained in:
Carsten Haitzler 2017-06-08 12:11:43 +09:00
parent d3420cd35c
commit cc0e17d32b
1 changed files with 3 additions and 1 deletions

View File

@ -707,10 +707,12 @@ module_open(Evas_Module *em)
}
/* Shouldn't we make that PATH configurable ? */
rgb_txt = eina_file_open("/usr/lib/X11/rgb.txt", 0);
rgb_txt = eina_file_open("/etc/X11/rgb.txt", 0);
if (!rgb_txt) rgb_txt = eina_file_open("/usr/lib/X11/rgb.txt", 0);
if (!rgb_txt) rgb_txt = eina_file_open("/usr/X11/lib/X11/rgb.txt", 0);
if (!rgb_txt) rgb_txt = eina_file_open("/usr/X11R6/lib/X11/rgb.txt", 0);
if (!rgb_txt) rgb_txt = eina_file_open("/usr/openwin/lib/X11/rgb.txt", 0);
if (!rgb_txt) rgb_txt = eina_file_open("/usr/share/vim/vim80/rgb.txt", 0);
if (rgb_txt)
rgb_txt_map = eina_file_map_all(rgb_txt, EINA_FILE_WILLNEED);
em->functions = (void *)(&evas_image_load_xpm_func);