Changeset 1149

Show
Ignore:
Timestamp:
06/29/08 20:34:04
Author:
deo
Message:

Moved the controlpanel registration to the GenericSetup? profile.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneComments/branches/plone-3.0/Extensions/Install.py

    r1139 r1149  
    11from StringIO import StringIO 
    22from Products.CMFCore.utils import getToolByName 
    3 from Products.CMFCore.permissions import ManagePortal, ReplyToItem 
     3from Products.CMFCore.permissions import ReplyToItem 
    44 
    55from Products.qPloneComments.config import * 
     
    1414    # Tern on Anonymous commenting 
    1515    self.manage_permission(ReplyToItem, ['Anonymous','Manager','Member'], 1) 
    16  
    17     # Add Configlet. Delete old version before adding, if exist one. 
    18     controlpanel_tool = getToolByName(self, 'portal_controlpanel') 
    19     controlpanel_tool.unregisterConfiglet(CONFIGLET_ID) 
    20     controlpanel_tool.registerConfiglet(id=CONFIGLET_ID, name=CONFIGLET_NAME, category='Products', 
    21                                         action='string:${portal_url}/%s' % CONFIGLET_ID, 
    22                                         appId=PROJECTNAME, permission=ManagePortal, imageUrl='group.gif') 
    2316 
    2417    uf = getToolByName(self, 'acl_users') 
     
    4740 
    4841def uninstall(self): 
     42    out = StringIO() 
    4943 
    50     # Remove configlet 
     44    # Remove configlet, as there's currently no support to do it via GS 
    5145    controlpanel_tool = getToolByName(self, 'portal_controlpanel') 
    52     controlpanel_tool.unregisterConfiglet(CONFIGLET_ID) 
     46    controlpanel_tool.unregisterConfiglet('prefs_comments_setup_form') 
     47    out.write('Removed the product configlet.\n') 
     48    return out.getvalue()