mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
WPrefs: Use wdefaultspathfordomain() to build path to the root menu file
For the Menu edition tab, when building the path to the file that contains the menu data, rely on wdefaultspathfordomain instead of constructing the path with many hard-coded names.
This commit is contained in:
committed by
Carlos R. Mafra
parent
735651df55
commit
5c90ed9d2d
@@ -1493,16 +1493,11 @@ static WMPropList *getDefaultMenu(_Panel * panel)
|
||||
|
||||
static void showData(_Panel * panel)
|
||||
{
|
||||
const char *gspath;
|
||||
char *menuPath, *labelText;
|
||||
char buf[1024];
|
||||
WMPropList *pmenu;
|
||||
|
||||
gspath = wusergnusteppath();
|
||||
|
||||
menuPath = wmalloc(strlen(gspath) + 32);
|
||||
strcpy(menuPath, gspath);
|
||||
strcat(menuPath, "/Defaults/WMRootMenu");
|
||||
menuPath = wdefaultspathfordomain("WMRootMenu");
|
||||
|
||||
pmenu = WMReadPropListFromFile(menuPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user