Ticket #42860: apbs_tkinter.patch

File apbs_tkinter.patch, 10.4 KB (added by mtiberti (Matteo Tiberti), 11 years ago)
  • modules/pmg_tk/startup/apbs_tools.py

    old new  
    612612        # Set up the Main page
    613613        page = self.notebook.add('Main')
    614614        group = Pmw.Group(page,tag_text='Main options')
    615         group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     615        #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     616        group.grid(padx = 10, pady = 5, sticky=(N, S, E, W))
    616617        self.selection = Pmw.EntryField(group.interior(),
    617618                                        labelpos='w',
    618619                                        label_text='Selection to use: ',
     
    658659        page = self.notebook.add('Configuration')
    659660
    660661        group = Pmw.Group(page,tag_text='Dielectric Constants')
    661         group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     662        #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     663        group.grid(padx = 4, pady = 5, sticky=(N, S, E, W))
    662664        group.grid(column=0, row=0)
    663665        self.interior_dielectric = Pmw.EntryField(group.interior(),labelpos='w',
    664666                                   label_text = 'Protein Dielectric:',
     
    677679            #entry.pack(side='left',fill='both',expand=1,padx=4) # side-by-side
    678680            entry.pack(fill='x',expand=1,padx=4,pady=1) # vertical
    679681        group = Pmw.Group(page,tag_text='Other')
    680         group.pack(fill='both',expand=1, padx=4, pady=5)
     682        #group.pack(fill='both',expand=1, padx=4, pady=5)
     683        group.grid(padx=4, pady=5, sticky=(N, S, E, W))
    681684        group.grid(column=1, row=1,columnspan=4)
    682685        self.max_mem_allowed = Pmw.EntryField(group.interior(),labelpos='w',
    683686                                              label_text = 'Maximum Memory Allowed (MB):',
     
    735738
    736739
    737740        group = Pmw.Group(page,tag_text='Ions')
    738         group.pack(fill='both',expand=1, padx=4, pady=5)
     741        #group.pack(fill='both',expand=1, padx=4, pady=5)
     742        group.grid(padx=4, pady=5, sticky=(N, S, E, W))
    739743        group.grid(column=0, row=1, )
    740744        self.ion_plus_one_conc = Pmw.EntryField(group.interior(),
    741745                                                labelpos='w',
     
    794798            entry.pack(fill='x',expand=1,padx=4)
    795799
    796800        group = Pmw.Group(page,tag_text = 'Coarse Mesh Length')
    797         group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     801        #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     802        group.grid(padx = 4, pady = 5, sticky=(N, S, E, W))
    798803        group.grid(column = 1, row = 0)
    799804        for coord in 'x y z'.split():
    800805            setattr(self,'grid_coarse_%s'%coord,Pmw.EntryField(group.interior(),
     
    809814
    810815
    811816        group = Pmw.Group(page,tag_text = 'Fine Mesh Length')
    812         group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     817        #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     818        group.grid(padx = 4, pady = 5, sticky=(N, S, E, W))
    813819        group.grid(column = 2, row = 0)
    814820        for coord in 'x y z'.split():
    815821            setattr(self,'grid_fine_%s'%coord,Pmw.EntryField(group.interior(),
     
    824830
    825831
    826832        group = Pmw.Group(page,tag_text = 'Grid Center')
    827         group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     833        #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     834        group.grid(padx = 4, pady = 5, sticky=(N, S, E, W))
    828835        group.grid(column = 3, row = 0)
    829836        for coord in 'x y z'.split():
    830837            setattr(self,'grid_center_%s'%coord,Pmw.EntryField(group.interior(),
     
    838845            getattr(self,'grid_center_%s'%coord).pack(fill='x', expand=1, padx=4, pady=1)
    839846
    840847        group = Pmw.Group(page,tag_text = 'Grid Points')
    841         group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     848        #group.pack(fill = 'both', expand = 1, padx = 4, pady = 5)
     849        group.grid(padx = 4, pady = 5, sticky=(N, S, E, W))
    842850        group.grid(column = 4, row = 0)
    843851        for coord in 'x y z'.split():
    844852            setattr(self,'grid_points_%s'%coord,Pmw.EntryField(group.interior(),
     
    856864        page.grid_columnconfigure(5,weight=1)
    857865        page = self.notebook.add('Program Locations')
    858866        group = Pmw.Group(page,tag_text='Locations')
    859         group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     867        #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     868        group.grid(padx = 10, pady = 5, sticky=(N, S, E, W))
    860869        def quickFileValidation(s):
    861870            if s == '': return Pmw.PARTIAL
    862871            elif os.path.isfile(s): return Pmw.OK
     
    955964       
    956965        page = self.notebook.add('Temp File Locations')
    957966        group = Pmw.Group(page,tag_text='Locations')
    958         group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     967        #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     968        group.grid(padx = 10, pady = 5, sticky=(N, S, E, W))
    959969        self.pymol_generated_pqr_filename = Pmw.EntryField(group.interior(),
    960970                                                           labelpos = 'w',
    961971                                                           label_pyclass = FileDialogButtonClassFactory.get(self.setPymolGeneratedPqrFilename),
     
    10031013        page = self.notebook.add('Visualization (1)')
    10041014        group = VisualizationGroup(page,tag_text='Visualization',visgroup_num=1)
    10051015        self.visualization_group_1 = group
    1006         group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     1016        #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     1017        group.grid(padx = 10, pady = 5, sticky=(N, S, E, W))
    10071018
    10081019        page = self.notebook.add('Visualization (2)')
    10091020        group = VisualizationGroup(page,tag_text='Visualization',visgroup_num=2)
    10101021        self.visualization_group_2 = group
    1011         group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     1022        #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     1023        group.grid(padx = 10, pady = 5, sticky=(N, S, E, W))
    10121024
    10131025        # Create a couple of other empty pages
    10141026        page = self.notebook.add('About')
    10151027        group = Pmw.Group(page, tag_text='About PyMOL APBS Tools')
    1016         group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     1028        #group.pack(fill = 'both', expand = 1, padx = 10, pady = 5)
     1029        group.grid(padx = 10, pady = 5, sticky=(N, S, E, W))
    10171030        text = """This plugin integrates PyMOL (http://PyMOL.org/) with APBS (http://www.poissonboltzmann.org/apbs/).
    10181031
    10191032Documentation may be found at
     
    22712284            self.update_buttonbox = Pmw.ButtonBox(self.mm_group.interior(), padx=0)
    22722285            self.update_buttonbox.pack(side=LEFT)
    22732286            self.update_buttonbox.add('Update',command=self.refresh)
    2274             self.mm_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP)
     2287            #self.mm_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP)
     2288            self.mm_group.grid(padx = 4, pady = 5, sticky=(N, S, E, W))
    22752289
    22762290            self.ms_group = Pmw.Group(self.interior(),tag_text='Molecular Surface')
    22772291            self.ms_buttonbox = Pmw.ButtonBox(self.ms_group.interior(), padx=0)
     
    23212335                                            )
    23222336            bars = (self.mol_surf_low,self.mol_surf_middle,self.mol_surf_high)
    23232337            Pmw.alignlabels(bars)
    2324             for bar in bars: bar.pack(side=LEFT)
    2325             self.ms_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT)
     2338            for bar in bars: bar.pack(expand = 1, side=LEFT)
     2339            #self.ms_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT)
     2340            self.ms_group.grid(column=0, row=1, padx = 4, pady = 5, rowspan = 2, sticky=(N, S, E, W))
    23262341
    23272342            self.fl_group = Pmw.Group(self.interior(),tag_text='Field Lines')
    23282343            self.fl_buttonbox = Pmw.ButtonBox(self.fl_group.interior(), padx=0)
     
    23372352                                  text = """Follows same coloring as surface.""",
    23382353                                  )
    23392354            label.pack()
    2340             self.fl_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP)
     2355            #self.fl_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=TOP)
     2356            self.fl_group.grid(column = 1, row=0, padx = 4, pady = 5)
    23412357
    23422358            self.pi_group = Pmw.Group(self.interior(),tag_text='Positive Isosurface')
    23432359            self.pi_buttonbox = Pmw.ButtonBox(self.pi_group.interior(), padx=0)
    2344             self.pi_buttonbox.pack()
     2360            #self.pi_buttonbox.pack()
     2361            self.pi_buttonbox.grid()
    23452362            self.pi_buttonbox.add('Show',command=self.showPosSurface)
    23462363            self.pi_buttonbox.add('Hide',command=self.hidePosSurface)
    23472364            self.pi_buttonbox.add('Update',command=self.updatePosSurface)
     
    23552368                                            datatype = 'real',
    23562369                                            entryfield_validate = {'validator' : 'real', 'min':0}
    23572370                                            )
    2358             self.pos_surf_val.pack(side=LEFT)
    2359             self.pi_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT)
     2371            #self.pos_surf_val.pack(side=LEFT)
     2372            self.pos_surf_val.grid()
     2373            #self.pi_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT)
     2374            self.pi_group.grid(column = 1, row = 1, padx = 4, pady = 5, sticky=(N, S, E, W))
    23602375
    23612376            self.ni_group = Pmw.Group(self.interior(),tag_text='Negative Isosurface')
    23622377            self.ni_buttonbox = Pmw.ButtonBox(self.ni_group.interior(), padx=0)
    2363             self.ni_buttonbox.pack()
     2378            #self.ni_buttonbox.pack()
     2379            self.ni_buttonbox.grid()
    23642380            self.ni_buttonbox.add('Show',command=self.showNegSurface)
    23652381            self.ni_buttonbox.add('Hide',command=self.hideNegSurface)
    23662382            self.ni_buttonbox.add('Update',command=self.updateNegSurface)
     
    23742394                                            datatype = 'real',
    23752395                                            entryfield_validate = {'validator' : 'real', 'max':0}
    23762396                                            )
    2377             self.neg_surf_val.pack(side=LEFT)
    2378             self.ni_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT)
     2397            #self.neg_surf_val.pack(side=LEFT)
     2398            self.neg_surf_val.grid()
     2399            #self.ni_group.pack(fill = 'both', expand = 1, padx = 4, pady = 5, side=LEFT)
     2400            self.ni_group.grid(column = 1, row=2, padx = 4, pady = 5, sticky=(N, S, E, W))
    23792401
    23802402
    23812403