Logo Search packages:      
Sourcecode: zope-cmfactionicons version File versions

def CMFActionIcons::ActionIconsTool::ActionIconsTool::updateActionIcon (   self,
  category,
  action_id,
  icon_expr,
  title = None,
  priority = 0 
)

Update the icon for the given action.

o Raise KeyError if an icon has not already been defined.

Definition at line 296 of file ActionIconsTool.py.

                         :

        """ Update the icon for the given action.

        o Raise KeyError if an icon has not already been defined.
        """
        if self.queryActionIcon( category, action_id ) is None:
            raise KeyError, 'No such definition!'

        icons = list( self._icons )
        for ai in icons:
            if ( ai.getCategory() == category
             and ai.getActionId() == action_id
               ):
                ai.updateIconExpression( icon_expr )
                ai._title = title
                ai._priority = priority
                break
        else:
            raise KeyError, ( category, action_id )
        self._icons = tuple( icons )

    security.declareProtected( ManageSite, 'removeActionIcon' )
    def removeActionIcon( self, category, action_id ):


Generated by  Doxygen 1.6.0   Back to index