WPrefs: Fetch default menu from system path
commit6ae01b9d9045a4f8489ecd0dc4ee3bd847b6e736
authorRodolfo Garc??a Pe??as (kix) <kix@kix.es>
Thu, 12 Jan 2012 18:07:05 +0000 (12 19:07 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 12 Jan 2012 22:07:01 +0000 (12 22:07 +0000)
tree5fad4e10bf1ac29721ed5497a4afbfec3e3bdbe1
parent7013467da4341de8344c04833566f11e884b91f7
WPrefs: Fetch default menu from system path

If you delete the file ~GNUStep/Defaults/WMRootMenu and run WMPrefs
and go to the Menu Edit tab, it will show a dialog about keeping the menu or
discarding it. If you discard it then WPrefs shows an error:

"Could not open default menu from
'/home/user/GNUStep/Library/WindowMaker/plmenu"

The problem is at WPrefs.app/Menu.c:1424, and it happens because it tries
to load the default menu from the user's GNUstep home, but plmenu is not
copied there during the installation.

Of course, the file doesn't need to be copied to the users home, so
WPrefs should try to read it from /usr/share/WindowMaker/plmenu (Debian)
or /usr/local/share/WindowMaker/plmenu (upstream).
WPrefs.app/Makefile.am
WPrefs.app/Menu.c