Tiny Core Extensions > TCE Q&A Forum

Creating submenus in TC2.0RC4

(1/4) > >>

bmarkus:
I have two applications, xwota and xdx, both for Ham Radio use. I wanted to add them to the JWM Menu in a common submenu called HAM Radio. How to do that? If I define the HAM Radio submenu as below and install both packages there are two submenus with the same title containing one of the programs each:


--- Quote ---<JWM>
<Menu label="HAM Radio">
<Program label="xwota">/usr/local/bin/xwota</Program>
</Menu>
</JWM>
--- End quote ---


--- Quote ---<JWM>
<Menu label="HAM Radio">
<Program label="xdx">/usr/local/bin/xdx</Program>
</Menu>
</JWM>
--- End quote ---

Is there a tool to add <Program label... item on the fly to a Menu which can be called during the installation to get this below or any other way?


--- Quote ---<JWM>
<Menu label="HAM Radio">
<Program label="xwota">/usr/local/bin/xwota</Program>
<Program label="xdx">/usr/local/bin/xdx</Program>
</Menu>
</JWM>
--- End quote ---

Béla

robc:
you could write a startup script for the extensions that look in the menu file to see if the Ham Radio submenu is present.

Though, I think this could be very useful if supported on a more universal level in TC. Having the ability to create submenus within the desktop menu only makes sense with our growing extension repository. The word processing and other office tools could go into one submenu, games in their submenu, file managers in a different submenu, etc.

bmarkus:
OK, I'm just writing a shell script to dynamically create the submenu definition file and can add items when extension installed.

roberts:
If not for personal use then a public submittal would need to support the other window manages currently supported.

robc:

--- Quote ---If not for personal use then a public submittal would need to support the other window manages currently supported.
--- End quote ---
that is true, not everyone will be using jwm.
I do like the idea of keeping similar applications together. perhaps restructuring the layout of the extension menu files to something a bit more universal and simpler, kinda similar to the extension icon files. for example:
--- Code: ---submenu: Office Utils
name: beaver
exec: /usr/local/bin/beaver
--- End code ---
for TC 2.X each window manager should have the interface files to use this info for the menu system. This way it would be up to the owner of the window manger extension to create the interface files correctly. It is looking more and more like microcore is going to be the base system and jwm and the Xlibs will just be extensions. So why not treat the jwm extension like any other window manager extension?

Navigation

[0] Message Index

[#] Next page

Go to full version