wmaker: Allow WMRootMenu to reference menu files in proplist format.
commitb07075aed33e11266b86d8704082ab608734f47c
authorDoug Torrance <dtorrance@piedmont.edu>
Sun, 13 Aug 2017 02:12:29 +0000 (12 22:12 -0400)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 13 Aug 2017 09:34:46 +0000 (13 10:34 +0100)
treec6a1e0ca9f0b40d1bfe818f9d7eae77a0bb9704d
parentad4545b1d8115befed643f3dd3f771af9c20d3a7
wmaker: Allow WMRootMenu to reference menu files in proplist format.

Previously, WMRootMenu could either be a menu file in proplist format
itself, or it could reference another menu file in the old style format.

If WMRootMenu referenced another menu file in proplist format, this file
was parsed assuming it was in the old style format and thus failed, as
observed by Andreas Metzler [1].

In this patch, we first attempt to parse a referenced menu file as if
it were in proplist format.  If this fails, then we fall back on the old
style format.  This has the disadvantage of spamming the terminal with
various parsing errors if the menu file is in the old style format.

[1] https://www.mail-archive.com/wmaker-dev@lists.windowmaker.org/msg07097.html
src/rootmenu.c