void update_undo_sensitivity (void) { /* Unfortunately, this does not change the state of undo button in app menu :( */ gboolean enable = UndoVisible (); gboolean result = g_action_group_query_action (G_ACTION_GROUP (application), "Undo", &enable, NULL, NULL, NULL, NULL); }
static gboolean gtk_application_window_query_action (GActionGroup *group, const gchar *action_name, gboolean *enabled, const GVariantType **parameter_type, const GVariantType **state_type, GVariant **state_hint, GVariant **state) { GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (group); return g_action_group_query_action (G_ACTION_GROUP (window->priv->actions), action_name, enabled, parameter_type, state_type, state_hint, state); }