From 5c90ed9d2de575acb3e4272cf6e34c9fdca75cb9 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 8 Aug 2021 09:36:12 +0200 Subject: [PATCH] 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. --- WPrefs.app/Menu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c index 8a04b517..ccf27366 100644 --- a/WPrefs.app/Menu.c +++ b/WPrefs.app/Menu.c @@ -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);