[PATCH 3/3] WPrefs: Inform user which menu file is being edited.

Doug Torrance <[email protected]> Sat, 19 Aug 2017 10:48:44 -0400
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
---
 WPrefs.app/Menu.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index 3caf4975..54e53faa 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -1483,7 +1483,7 @@ static WMPropList *getDefaultMenu(_Panel * panel)
 static void showData(_Panel * panel)
 {
 	const char *gspath;
-	char *menuPath;
+	char *menuPath, *labelText;
 	char buf[1024];
 	WMPropList *pmenu;
 
@@ -1554,6 +1554,14 @@ static void showData(_Panel * panel)
 
 	panel->menuPath = menuPath;
 
+	snprintf(buf, 1024,
+		 _("\n\nWhen saved, the menu will be written to the file\n\"%s\"."),
+		 menuPath);
+	labelText = WMGetLabelText(panel->sections[NoInfo][0]);
+	labelText = wstrconcat(labelText, buf);
+	WMSetLabelText(panel->sections[NoInfo][0], labelText);
+	wfree(labelText);
+
 	buildMenuFromPL(panel, pmenu);
 
 	WMReleasePropList(pmenu);
-- 
2.11.0


-- 
To unsubscribe, send mail to [email protected].