I would like to add a couple of buttons to the tool bar (it has open
coordinates, reset view, display manager by default).
The buttons I want is not available in the list when you select 'manage
buttons'.

Currently there is only a limited no of 'pre-programmed' buttons available in the 'Toolbar Buttons Manager'. I can add more on request or you can add them yourself (see below).

Specifically, I want to add 'Auto open MTZ' and 'Save coordinates'. Can
someone please suggest how to do it?

At the moment it is not trivial to add the two functions you suggest (*), but here are a few ways how in general to add buttons to the toolbar:

- add you favourite function to the list 'list_of_toolbar_functions' in python/coot_toolbuttons.py and the use the Toolbar Manager

- use 'Add a user-defined Button' and specify your favourite function

- use the function coot_toolbar_button in e.g. $HOME/.coot/.py to add your favourite function [e.g. coot_toolbar_button("Sphere Refine", "sphere_refine()", "reset-view.svg") # note: all strings, icon -last arg- is optional)

Note: you have to define your favourite function somewhere too (use Run Script, .coot.py, .coot-preference, or COOT_PYTHON_EXTRAS_DIR ... for this)!!!

Any more questions, keep asking,

B


P.S. We are working on an extended documentation for this and other scripting issues...

(*) neither is currently available directly with scripting [Note to 'us': maybe they should], so you would have to write them yourself in a script. Tool for that are available (e.g. file_chooser_entry)


--
***************************************************

Dr. Bernhard Lohkamp
Assistant Professor
Div. Molecular Structural Biology
Dept. of Medical Biochemistry and Biophysics (MBB)
Karolinska Institutet
S-17177 Stockholm
Sweden

phone: (+46) 08-52487651
fax:   (+46) 08-327626
email: [email protected]

Reply via email to