[Bashburn-info] New menu subsystem.
Brought to you by:
bashburn
|
From: Steven W. O. <st...@sy...> - 2008-08-22 02:38:20
|
As I mentioned the other day, I really hate the way we currently draw
menus. I wrote a module (bbmenu.sh) which takes an array of descriptors as
an argument and then just runs with it. All of the menu code is just
duped everywhere for every menu, so this just seemed like a no brainer. It
will reduce the size of bb quite significantly.
Here's my plan: I can't do this all in one day, and since we don't
currently have a devel branch seperate from a main trunk, it's really not
going to be possible to check in all of the changes atomically without
making extra work. Therefore, if I promise to get it all done by the end
of the weekend, will that be ok with everyone? All this means is that the
tree *may* be broken until I finish. I will check in bbmenu.sh tonight
(which won't hurt anything since it's not yet referenced. It will need to
be tweaked further, but you'll be able to see what I'm doing.
For taste, in BashBurn.sh where the MAIN menu is posted, it will
eventually end up with this:
bbmenu=( \
"$bb_menu_1:audio_menu" \
"$bb_menu_2:data_menu" \
"$bb_menu_3:iso" \
"$bb_menu_4:bincue" \
"$bb_menu_5:multi" \
"$bb_menu_6:configure_menu" \
"$bb_menu_7:check_path" \
"$bb_menu_8:datadefine" \
"$bb_menu_9:bbexit" )
and the whole menu will happen by simply saying:
menu MAIN "${bbmenu[@]}"
--
Time flies like the wind. Fruit flies like a banana. Stranger things have .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
|