ports/63904: Maintainer update: x11-wm/treewm - fixes "menu item commands are lower-cased"
Rudolf Polzer
freebsd-dr at durchnull.de
Sun Mar 7 23:50:16 UTC 2004
The following reply was made to PR ports/63904; it has been noted by GNATS.
From: Rudolf Polzer <freebsd-dr at durchnull.de>
To: freebsd-gnats-submit at 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;
More information about the freebsd-ports-bugs
mailing list