[chimera-dev] modify the menu bar

Tom Goddard goddard at sonic.net
Fri Jan 21 09:20:03 PST 2011


  Hi Elisabeth,

   There is some code in Chimera that makes a new top-level menu called 
Volume that is a copy of the Tools / Volume Data submenu.  That Volume 
menu is displayed using menu entry Tools / Volume Data / Volume Menu on 
Menubar and if you show it it is remembered in the Chimera preferences 
file so it will appear every time you run Chimera.  This is a more 
complex than you need.  But the main routine that would be useful to 
study is called create_toplevel_volume_menu() in file

     chimera / share / VolumeMenu / __init__.py

in your Chimera distribution.  It would be easy to make a similar 
Chimera extension that made a toplevel Scripts menu and simply read all 
the files in one of your directories and made menu entries which caused 
the file to be opened in Chimera.  If you need more help with writing it 
ask.

     Tom


> Dear Chimera Dev Team,
>
>
> I'm trying to put other option in the menu bar (File, Select, Actions, 
> ... , myOption, Help) to store my own scripts. I'm doing a deep search 
> on your python and C++ codes but I don't find which is the code that I 
> have to modify.
> I know that is easy to store my scripts in the Tools menu, but I 
> prefer to put my scripts in a new option of the menu bar.
>
>
> Thanks a lot for taking the time to reply.
>
>
>
> Elisabeth Ortega
> Autonomous University of Barcelona (UAB)




More information about the Chimera-dev mailing list