/** * gtk_action_activate: * @action: the action object * * Emits the "activate" signal on the specified action, if it isn't * insensitive. This gets called by the proxy widgets when they get * activated. * * It can also be used to manually activate an action. * * Since: 2.4 */ void gtk_action_activate (GtkAction *action) { g_return_if_fail (GTK_IS_ACTION (action)); if (action->private_data->activate_blocked) return; if (gtk_action_is_sensitive (action)) _gtk_action_emit_activate (action); }
/** * gtk_toggle_action_set_active: * @action: the action object * @is_active: whether the action should be checked or not * * Sets the checked state on the toggle action. * * Since: 2.4 * * Deprecated: 3.10 */ void gtk_toggle_action_set_active (GtkToggleAction *action, gboolean is_active) { g_return_if_fail (GTK_IS_TOGGLE_ACTION (action)); is_active = is_active != FALSE; if (action->private_data->active != is_active) _gtk_action_emit_activate (GTK_ACTION (action)); }
static void closure_accel_activate (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data) { if (gtk_action_is_sensitive (GTK_ACTION (closure->data))) { _gtk_action_emit_activate (GTK_ACTION (closure->data)); /* we handled the accelerator */ g_value_set_boolean (return_value, TRUE); } }