LOGIN / SIGN UP
No such file with id "$"

#21 Dynamic menu entries become unselectable after first visit

Reported by: Lassi Pölönen (lpolonen) Assigned to: Claes Nästén (pekdon)
Phase: release-0.1.5 Component:
Type: bug Status: closed
Priority: 3: Medium
Watchers:

Attachments

Description

Dynamic menu entries are sectable only on first visit.

example:

menu:


- Entry = "Testmenu" { Actions = "Dynamic /tmp/getmenu.sh" }


-

/tmp/getmenu.sh:


------------

  1. !/bin/sh

cat /tmp/dmenu.txt

/tmp/dmenu.txt: Dynamic {

  Submenu = "Applications" {
    Submenu =  "Accessories" {
      Entry = "Archive Manager" { Actions = "Exec file-roller &" }
      Entry = "Calculator" { Actions = "Exec gcalctool &" }
      Entry = "Character Map" { Actions = "Exec gucharmap &" }
      Entry = "KWrite" { Actions = "Exec kwrite &" }
      Entry = "Text Editor" { Actions = "Exec gedit &" }
    }
    Submenu =  "Graphics" {
      Entry = "F-Spot Photo Manager" { Actions = "Exec f-spot &" }
      Entry = "GNU Image Manipulation Program" { Actions = "Exec gimp-2.4 &" }
      Entry = "gThumb Image Viewer" { Actions = "Exec gthumb &" }
    }
    Submenu =  "Internet" {
      Entry = "Firefox Web Browser" { Actions = "Exec firefox &" }
      Entry = "Internet Messenger" { Actions = "Exec pidgin &" }
    }
  }

}


------------

Now when Submenu "Applications" is accessed the items are selectable as usual. Change submenu to "Graphics" and items in there are selectable too. But when changing back to "Accessories" the menu items are not selectable anymore even though the sub menu gets the focus.

I noticed it with 0.1.5 but it seems to be broken in GIT too. Theme didn't have any effect nor did menu enter between "Motion" and "ButtonPress".

2008-08-05

11:18:02 changed from new to closed
11:17:52

Closing this one, fixed in GIT head by ioerror.

2008-08-04

23:35:17

An updated version of the hack is applied to current GIT. However, dynamic menus still have issues if you do:

 Entry = "Testmenu" { Actions = "Dynamic /tmp/getmenu.sh" }
 Separator {}
 Entry = "Testmenu" { Actions = "Dynamic /tmp/getmenu.sh" }

Entering the menu the second time it only displays Testmenu once instead of twice.

2008-08-03

21:02:02

The attached patch fixes the issue on my system but please test it and report any problems or regressions.

Thanks!

21:01:03 attached experimental-hack.patch