ports/65434: Maintainer-update: x11-wm/treewm, fixes bug with non-lowercase menu names

Rudolf Polzer freebsd-dr at durchnull.de
Sun Apr 11 12:20:27 UTC 2004


>Number:         65434
>Category:       ports
>Synopsis:       Maintainer-update: x11-wm/treewm, fixes bug with non-lowercase menu names
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 11 05:20:26 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Rudolf Polzer
>Release:        FreeBSD 5.2.1-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD katsuragi.durchnull.ath.cx 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #10: Tue Mar 23 17:11:34 CET 2004 root at katsuragi.durchnull.ath.cx:/usr/src/sys/i386/compile/DIV0_KERNEL i386

>Description:
According to the documentation, menu names are handled case insensitively.
Unfortunately, I sent in a patch fixing another bug (which lowercased all
external commands, making menu items for programs like Eterm impossible) which
caused this bug because some other code in treewm relied upon the menu actions
being lowercased. So only menus with lowercased names worked fine after my
patch. This patch fixes the problem and leaves the other problem fixed, so now
both submenus are handled correctly case-insensitively and external commands are
left as is.

>How-To-Repeat:
Use this menu structure:

  [menu]
  test=$Submenu

  [menu Submenu]
  xterm=!xterm

The submenu will not open. Changing the second line to

  test=$submenu

and leaving the rest as is helps. But this is against treewm's documentation,
hence the fix.

>Fix:
Apply this patch to /usr/ports/x11-wm/treewm:

diff -Nru /usr/ports/x11-wm/treewm/Makefile ./Makefile
--- /usr/ports/x11-wm/treewm/Makefile	Tue Mar  9 00:18:15 2004
+++ ./Makefile	Sat Apr 10 21:11:32 2004
@@ -7,7 +7,7 @@
 
 PORTNAME=	treewm
 PORTVERSION=	0.4.5
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	x11-wm
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
diff -Nru /usr/ports/x11-wm/treewm/files/patch-resmanager.cc ./files/patch-resmanager.cc
--- /usr/ports/x11-wm/treewm/files/patch-resmanager.cc	Thu Jan  1 01:00:00 1970
+++ ./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 -Nru /usr/ports/x11-wm/treewm/files/patch-uehandler.cc ./files/patch-uehandler.cc
--- /usr/ports/x11-wm/treewm/files/patch-uehandler.cc	Thu Jan  1 01:00:00 1970
+++ ./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;
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list