Date: Sun, 7 Mar 2004 15:50:04 -0800 (PST) From: Rudolf Polzer <freebsd-dr@durchnull.de> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/63904: Maintainer update: x11-wm/treewm - fixes "menu item commands are lower-cased" Message-ID: <200403072350.i27No4kW014703@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/63904; it has been noted by GNATS. From: Rudolf Polzer <freebsd-dr@durchnull.de> To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: ports/63904: Maintainer update: x11-wm/treewm - fixes "menu item commands are lower-cased" Date: Mon, 8 Mar 2004 00:49:11 +0100 Fixing this problem made another small problem appear: menu names of submenus aren't correctly handled case insensitively any more when this is fixed. To reproduce, do the following: [menu] test2 = $XYZ test3 = $xyz [menu XYZ] 6x9 = !xmessage "42" If handled correctly, both menu items would show the submenu. But only the latter does (while in correct case sensitive handling, only the former would do). To get correct case insensitive handling of menu items (that's what the author wanted anyway), the handling of the $ must lower case the names. The following patch fixes the menu handling; sorry for the inconvenience of a second patch: diff -Ndru /usr/ports/x11-wm/treewm/files/patch-resmanager.cc /tmp/treewm/files/patch-resmanager.cc --- /usr/ports/x11-wm/treewm/files/patch-resmanager.cc Thu Jan 1 01:00:00 1970 +++ /tmp/treewm/files/patch-resmanager.cc Mon Mar 8 00:40:51 2004 @@ -0,0 +1,10 @@ +--- ../treewm-0.4.5.orig/src/resmanager.cc Mon Mar 8 00:20:42 2004 ++++ src/resmanager.cc Mon Mar 8 00:40:02 2004 +@@ -127,6 +127,7 @@ + for (int j=0; j!=mi->n; ++j) { + MenuItem &mitem = mi->menu[j]; + if (mitem.key[0] == '$') { ++ lower(mitem.key); + MenuInfo *mi2 = (MenuInfo *)rman->GetInfo(SE_MENUINFO,mitem.key+1); + if (mi2) { + mitem.submenu = new SubMenuInfo; diff -Ndru /usr/ports/x11-wm/treewm/files/patch-uehandler.cc /tmp/treewm/files/patch-uehandler.cc --- /usr/ports/x11-wm/treewm/files/patch-uehandler.cc Thu Jan 1 01:00:00 1970 +++ /tmp/treewm/files/patch-uehandler.cc Mon Mar 8 00:43:01 2004 @@ -0,0 +1,10 @@ +--- ../treewm-0.4.5.orig/src/uehandler.cc Mon Mar 8 00:20:42 2004 ++++ src/uehandler.cc Mon Mar 8 00:42:26 2004 +@@ -955,6 +955,7 @@ + if (!ExecAll) + return false; + { ++ lower(str); + MenuInfo *mi = ((MenuInfo *)rman->GetInfo(SE_MENUINFO,str+1)); + if (mi) { + int x,y;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403072350.i27No4kW014703>