static void _toggle_active_cb (MxToggle *toggle, GParamSpec *pspec, DawatiBtShell *shell) { DawatiBtShellPrivate *priv = GET_PRIVATE (shell); gboolean active; active = mx_toggle_get_active (MX_TOGGLE (toggle)); if (!priv->available || (active && priv->enabled) || (!active && !priv->enabled)) { return; } carrick_connman_manager_set_technology_state (priv->cm, "bluetooth", active); }
static void on_switch_toggled (MxToggle *toggle, GParamSpec *property, ToggledData *data) { MpdComputerTilePrivate *priv = data->tile->priv; gboolean active; active = mx_toggle_get_active (toggle); if (data->row == OFFLINE_MODE) { carrick_connman_manager_set_offline_mode (priv->cm, active); } else { carrick_connman_manager_set_technology_state ( priv->cm, radio_tech_to_connman_tech (data->row), active); } }