Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_action_set_sensitive ( SPAction action,
unsigned int  sensitive 
)

Change sensitivity in all actions that can be taken with the action.

Definition at line 184 of file action.cpp.

References SPAction::sensitive, SPActionEventVector::set_sensitive, and SP_IS_ACTION.

Referenced by Inkscape::Verb::get_action().

{
      nr_return_if_fail (action != NULL);
      nr_return_if_fail (SP_IS_ACTION (action));

      if (sensitive != action->sensitive) {
            NRActiveObject *aobject;
            action->sensitive = sensitive;
            aobject = (NRActiveObject *) action;
            if (aobject->callbacks) {
                  unsigned int i;
                  for (i = 0; i < aobject->callbacks->length; i++) {
                        NRObjectListener *listener;
                        SPActionEventVector *avector;
                        listener = aobject->callbacks->listeners + i;
                        avector = (SPActionEventVector *) listener->vector;
                        if ((listener->size >= sizeof (SPActionEventVector)) && avector->set_sensitive) {
                              avector->set_sensitive (action, sensitive, listener->data);
                        }
                  }
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index