Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 129262 - fluxbox-generate_menu generating empty submenus
Summary: fluxbox-generate_menu generating empty submenus
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor
Assignee: Jim Ramsay (lack) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-08 10:31 UTC by Tudor Vaida
Modified: 2007-05-28 16:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed patch (fluxbox-generate_menu.0.9.14.and.patch,9.55 KB, patch)
2006-04-08 10:35 UTC, Tudor Vaida
Details | Diff
The && patch (and.patch,14.75 KB, patch)
2006-07-24 08:11 UTC, Tudor Vaida
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tudor Vaida 2006-04-08 10:31:20 UTC
installed package:  x11-wm/fluxbox-0.9.14-r1

After using the script with different options, I got always the same results -> empty submenus.

Looked a little bit through the code and I believe constructions like:

<code>find_it xlock append "[exec] (${LOCKSCREEN}) {xlock}"</code>

should actually be:

<code>find_it xlock && append .. </code>

I propose the attached patch.
Comment 1 Tudor Vaida 2006-04-08 10:35:12 UTC
Created attachment 84214 [details, diff]
proposed patch
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-06-21 19:03:59 UTC
Yikes, can you use diff -u for the patch? Unified diffs are preferred, otherwise the patch is a lot harder to read ;)
Comment 3 Tudor Vaida 2006-07-24 08:07:06 UTC
Well you could perform the following regular expressions in turn on the current version and you would get what I meant.

s/\(find_it \+[^ ;]*\)/\1 \&\&/g
s/&& *;/;/g
s/&& &&/\&\&/g
Comment 4 Tudor Vaida 2006-07-24 08:11:19 UTC
Created attachment 92617 [details, diff]
The && patch
Comment 5 Joseph Booker 2006-10-08 12:15:27 UTC
notice in the find_it function:
    find_it() {
        which $1 > /dev/null 2>&1 && shift && "$@"
    }

(for the simplier of the two)

that 'shift && "$@" ' part evaluates the arguments after the first one


The '-r' switch does wat your saying, so does having REMOVE=no in your ~/.fluxbox/menuconfig
Comment 6 Jim Ramsay (lack) (RETIRED) gentoo-dev 2007-05-14 21:58:26 UTC
Please try the latest version that comes with 1.0_rc3 - I find that it removes all empty submenus fairly well.

To test properly, run once as:
  fluxbox-generate_menu -r
Which will not remove any empty submenus, you can then check what *should* be removed.

Then run it again without the '-r' switch, and ensure that it's actually doing the proper thing... All the empty submenus should be gone at this point.

At least in my tests here, it seems to remove every empty submenu.
Comment 7 Jim Ramsay (lack) (RETIRED) gentoo-dev 2007-05-28 16:54:40 UTC
Please reopen if this still occurrs with fluxbox-1.0_rc3