From: Enlightenment C. <no...@cv...> - 2006-03-30 21:07:33
|
Enlightenment CVS committal Author : kwo Project : e16 Module : e Dir : e16/e/src Modified Files: menus-misc.c Log Message: Allow omitting menus/ in menu path. May make migration from <16.8 less painful. =================================================================== RCS file: /cvs/e/e16/e/src/menus-misc.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- menus-misc.c 18 Feb 2006 08:30:08 -0000 1.30 +++ menus-misc.c 30 Mar 2006 21:07:10 -0000 1.31 @@ -402,7 +402,7 @@ const char *file) { Menu *m = NULL; - char *ff; + char *ff, buf[4096]; static int calls = 0; if (calls > 32) @@ -411,7 +411,15 @@ ff = FindFile(file, NULL, 0); if (!ff) - goto done; + { + if (isabspath(file)) + goto done; + /* Check also menus subdir */ + Esnprintf(buf, sizeof(buf), "menus/%s", file); + ff = FindFile(buf, NULL, 0); + if (!ff) + goto done; + } m = MenuCreate(name, NULL, parent, ms); MenuSetData(m, ff); |