code: function() {
          var deactivated = false;
          if(this.map) {
              if(OpenLayers.Control.prototype.deactivate.apply(this)) {
                  for(var type in this.listeners) {
                      this.map.events.unregister(
                          type, this, this.listeners[type]
                      );
                  }
                  if(this.clearOnDeactivate) {
                      this.clear();
                  }
                  deactivated = true;
              }
          }
          return deactivated;
      }
docs: APIMethod: deactivate
  Deactivate the control.  This unregisters any listeners.
  
  Returns:
  {Boolean} Control successfully deactivated.