The new StrConcatDot function can be used now in usermenu.c
---
 src/usermenu.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/usermenu.c b/src/usermenu.c
index e0acc57..b43b258 100644
--- a/src/usermenu.c
+++ b/src/usermenu.c
@@ -334,14 +334,15 @@ static WMenu *readUserMenuFile(WScreen * scr, char 
*file_name)
 WMenu *wUserMenuGet(WScreen * scr, WWindow * wwin)
 {
        WMenu *menu = NULL;
-       char buffer[100];
-       char *path = NULL;
-       char *tmp;
+       char *tmp, *tmp1, *path = NULL;
+
        if (wwin->wm_instance && wwin->wm_class) {
-               int len = strlen(wwin->wm_instance) + strlen(wwin->wm_class) + 
7;
+               tmp1 = StrConcatDot(wwin->wm_instance, wwin->wm_class, True);
+               int len = strlen(tmp1) + 6;
                tmp = wmalloc(len);
-               snprintf(tmp, len, "%s.%s.menu", wwin->wm_instance, 
wwin->wm_class);
+               snprintf(tmp, len, "%s.menu", tmp1);
                path = wfindfile(DEF_USER_MENU_PATHS, tmp);
+               wfree(tmp1);
                wfree(tmp);
 
                if (!path)
-- 
1.7.9.1

>From 43294ce4a4187abba63a02b99b293750f25d462a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Sat, 14 Apr 2012 11:23:46 +0200
Subject: [PATCH 06/16] WindowMaker: usermenu uses now StrConcatDot

The new StrConcatDot function can be used now in usermenu.c
---
 src/usermenu.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/usermenu.c b/src/usermenu.c
index e0acc57..b43b258 100644
--- a/src/usermenu.c
+++ b/src/usermenu.c
@@ -334,14 +334,15 @@ static WMenu *readUserMenuFile(WScreen * scr, char *file_name)
 WMenu *wUserMenuGet(WScreen * scr, WWindow * wwin)
 {
 	WMenu *menu = NULL;
-	char buffer[100];
-	char *path = NULL;
-	char *tmp;
+	char *tmp, *tmp1, *path = NULL;
+
 	if (wwin->wm_instance && wwin->wm_class) {
-		int len = strlen(wwin->wm_instance) + strlen(wwin->wm_class) + 7;
+		tmp1 = StrConcatDot(wwin->wm_instance, wwin->wm_class, True);
+		int len = strlen(tmp1) + 6;
 		tmp = wmalloc(len);
-		snprintf(tmp, len, "%s.%s.menu", wwin->wm_instance, wwin->wm_class);
+		snprintf(tmp, len, "%s.menu", tmp1);
 		path = wfindfile(DEF_USER_MENU_PATHS, tmp);
+		wfree(tmp1);
 		wfree(tmp);
 
 		if (!path)
-- 
1.7.9.1

Reply via email to