Set disabled=True if we have billed all we need to

        Will only have an effect on one-off costs.
346613
def disable_if_done(self, commit=True):
        
        if self._is_billing_complete() and not self.disabled:
            self.disabled = True

            if commit:
                self.save()
242111
def disabled(name):
    '''
    
    '''
    ret = {'name': name,
           'result': True,
           'changes': {},
           'comment': ''}

    stat = __salt__['rdp.status']()

    if stat:
        if __opts__['test']:
            ret['result'] = None
            ret['comment'] = 'RDP will be disabled'
            return ret

        ret['result'] = __salt__['rdp.disable']()
        ret['changes'] = {'RDP was disabled': True}
        return ret

    ret['comment'] = 'RDP is disabled'
    return ret
558718
public void setEnabled(boolean enabled) {
		super.setEnabled(enabled);
		comboBox.setEnabled(enabled);

		if (spinner != null) {
			spinner.setEnabled(enabled);
		}
	}
1265882
@SuppressWarnings("unused")
    public void setDisabledDays(Calendar[] disabledDays) {
        mDefaultLimiter.setDisabledDays(disabledDays);
        if (mDayPickerView != null) mDayPickerView.onChange();
    }
401349
function() {
			var self = this;
			self.$input.prop('disabled', false);
			self.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex);
			self.isDisabled = false;
			self.unlock();
		}
1139107
public static function isEnabled()
      {
          $ini = eZINI::instance( 'squid.ini' );

          if ( $ini->hasSection( 'Squid' )
                && $ini->hasVariable( 'Squid', 'PurgeCacheOnPublish' )
                    && $ini->variable( 'Squid', 'PurgeCacheOnPublish' ) == 'enabled' )
          {
              return true;
          }
          else
          {
              return false;
          }
      }
179307
public void setEnabledValue(boolean e) {
		if (enablement) {
			enabled.setSelected(e);
		}
		minSpinner.setEnabled(enabled.isSelected() || !enablement);
		maxSpinner.setEnabled(enabled.isSelected() || !enablement);
	}
1262691
private Billing generateDefaultReservation() {
        Billing billing = new Billing();
        Billing.Reservation reservation = new Billing.Reservation();
        billing.setReservation(reservation);
        reservation.setReservationLength(1);
        return billing;
    }
22635
def get_disabled(self):
        
        installed = set(self.get_installed())
        enabled = set(self.get_enabled())
        return sorted(installed - enabled)
565765
public boolean markFree() {
		if (isEmpty()) {
			state = TaskSlotState.FREE;
			this.jobId = null;
			this.allocationId = null;

			return true;
		} else {
			return false;
		}
	}
877951
public function isRegistrationEnabled()
    {
        foreach ($this->appbox->get_databoxes() as $databox) {
            foreach ($databox->get_collections() as $collection) {
                if ($collection->isRegistrationEnabled()) {
                    return true;
                }
            }
        }

        return false;
    }
1096371
private boolean isEnabled() {

        try {
            if ((m_engineState == CmsPublishEngineState.ENGINE_STOPPED)
                || (m_engineState == CmsPublishEngineState.ENGINE_STARTED)) {
                OpenCms.getLoginManager().checkLoginAllowed();
                return true;
            } else {
                return false;
            }
        } catch (CmsAuthentificationException e) {
            return false;
        }
    }
838148
public void setDisabled(boolean disabled) {
		this.disabled = disabled;
		if (disabled) {
			handlerManager.fireEvent(new ToolbarActionDisabledEvent());
		} else {
			handlerManager.fireEvent(new ToolbarActionEnabledEvent());
		}
	}
559330
public void setEnabled(boolean enabled) {
		super.setEnabled(enabled);
		for (Iterator members = getMemberList().iterator(); members.hasNext();)
		{
		    GroupMember groupMember = (GroupMember)members.next();
		    groupMember.setEnabled(enabled);
		}
	}
515740
public function isGuestAllowed()
    {
        if (null === $user = $this['repo.users']->findByLogin(User::USER_GUEST)) {
            return false;
        }

        return count($this->getAclForUser($user)->get_granted_base()) > 0;
    }
369220
protected function initDisability(&$options)
    {
        if ($this->disabled && !isset($options['disabled'])) {
            $options['disabled'] = true;
        }
        if ($this->readonly && !isset($options['readonly'])) {
            $options['readonly'] = true;
        }
    }
408679
public void setDisabled(boolean disabled) {

        m_disabled = disabled;
        if (m_disabled) {
            getListItemWidget().addStyleName(I_CmsSitemapLayoutBundle.INSTANCE.sitemapItemCss().hiddenNavEntry());
        } else {
            getListItemWidget().removeStyleName(I_CmsSitemapLayoutBundle.INSTANCE.sitemapItemCss().hiddenNavEntry());
        }
    }