Hello Michelle,
You can also edit the SetEditor.py file. The file is in the
'/usr/lib/python2.3/site-packages/pmg_tk' directory on linux and add the
feature. It can be done by adding to small portion of add-on code to the
file. If you do so:
Keep a copy of the original file in a safe place !
Here is a part of the modified file:
#######################################
class SetEditor:
def __init__(self,app):
self.app = app
self.list = []
for a in pymol.setting.get_index_list():
self.list.append("%-30s %s"%(pymol.setting._get_name(a),
cmd.get_setting_text(a,'',-1)))
self.index = {}
c = 0
for a in pymol.setting.get_name_list():
self.index[a] = c
c = c + 1
self.dialog = Pmw.SelectionDialog(self.app.root,title="Settings",
buttons = ('Edit', 'Done'),
defaultbutton='Edit',
scrolledlist_labelpos=N,
label_text='Double click to edit',
scrolledlist_items = self.list,
command = self.command)
self.dialog.geometry("500x400")
# start of the add-on
interior = self.dialog.interior()
self.filter = Pmw.EntryField(interior,
labelpos = 'w',
label_text= 'Filter:',
validate = None,
command = self.filter_list)
self.filter.pack()
# end of the add-on
self.listbox = self.dialog.component('scrolledlist')
self.listbox.component('listbox').configure(font=app.my_fw_font)
self.dialog.protocol('WM_DELETE_WINDOW',self.cancel)
app.my_show(self.dialog)
# start of the add-on
def filter_list(self):
self.list = []
for a in pymol.setting.get_index_list():
if self.filter.getvalue() in pymol.setting._get_name(a):
self.list.append("%-30s %s"%(pymol.setting._get_name(a),
cmd.get_setting_text(a,'',-1)))
self.dialog.setlist(self.list)
self.dialog.update()
# end of the add-on
def cancel(self,event=None):
self.command(result='Done')
#######################################
This code works fine on my linux box. If you have some problem, don't hesitate
to ask me !
Cheers,
Jerome Pansanel
Le Mardi 18 Avril 2006 18:02, Michelle Gill a écrit :
> While we're discussing ways to make our favorite program a little
> better, I had an idea I thought I'd throw out there...
>
> While making some figures the other day, I found myself scrolling
> endlessly through the edit settings menu (under Setting --> Edit All) a
> number of times, mostly to locate a relatively small number of settings
> related to ray tracing. This got me thinking about a way to improve
> access to the many wonderful features that have been added to PyMOL.
>
> The solution I came up with is a filter line which could be placed
> directly above the window listing all the settings. Users could then
> type a word, say "ray" or "cartoon", and only the settings containing
> this word would be shown.
>
> The best example of a program containing this feature is the
> "about:config" window in Firefox. When you open a browser and type
> "about:config" instead of an address, a window containing hundreds of
> settings appears. At the top is a filter bar which you can use to pare
> down the number of settings listed below.
>
> I think this would be a great addition to PyMOL and would help users
> familiarize themselves with the many new settings which have been (and
> will be) implemented. :)
>
> Perhaps others have even better solutions to this problem. The use of a
> filter is just the first idea which came to my mind. I think it would be
> relatively easy to implement, although my python programming skills are
> somewhat limited.
>
> Thanks,
> Michelle Gill
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live
> webcast and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> PyMOL-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pymol-users