File:  [Repository] / VSyncer / __init__.py
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Wed Jan 2 19:01:35 2008 UTC (16 years, 5 months ago) by casties
Branches: MAIN
CVS tags: HEAD
first checking of modified SourceSyncer

    1: import VSyncer
    2: from ImageFile import ImageFile
    3: 
    4: def initialize(context): 
    5:     context.registerClass(VSyncer.VSSyncer, constructors = (VSyncer.manage_addVSServerForm, VSyncer.manage_addVSServer), icon='www/icon.gif')
    6:     context.registerHelp()
    7: 
    8: misc_ = {'stop.gif':ImageFile('www/stop.gif',globals()),
    9:          'checkedbox.gif':ImageFile('www/checkbox.gif',globals())
   10:         }
   11: # ok rummage through all the items to 
   12: # import, Folder.manage_options is one, but
   13: # if you have custom folderish objects add them here 
   14: from OFS.Folder import Folder
   15: from Globals import DTMLFile
   16: 
   17: Folder.vsync=DTMLFile('dtml/VSyncFolder', globals())
   18: m = list(Folder.manage_options)
   19: not_found = 1
   20: 
   21: # does the manage_options thing
   22: # already have this label? if not
   23: # add it. This aint perfect, since Sync
   24: # is not a unique name, but hey it works
   25: # for this
   26: for opt in m:
   27:     if opt.get('label', '') == 'ZSync':
   28:         not_found = 0
   29: 
   30: # so its not found, add it an
   31: # add to the options
   32: # security? thats an issue
   33: if not_found :
   34:     m.append({'label':'ZSync', 'action':'zsync'},)
   35:     Folder.manage_options = tuple(m)
   36: 
   37: 
   38:     
   39:     
   40: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>