Package: gtk

Function gtk-action-group-add-radio-actions

Lambda List

gtk-action-group-add-radio-actions (group entries value on-change)

Arguments

group -- a gtk-action-group object
entries -- a list of radio action descriptions
value -- an integer with the value of the action to activate initially, or -1 if no action should be activated
on-change -- a callback function to connect to the changed signal

Details

This is a convenience function to create a group of radio actions and add them to the action group. The "changed" signal of the first radio action is connected to the callback function on-change and the accel paths of the actions are set to <Actions>/group-name/action-name.

Example

(let ((group (gtk-action-group-new "AppWindowActions"))
      (actions (list
                 (list "Red" nil                      ; name, stock id
                       "_Red" "<control>R"            ; label, accelerator
                       "Blood" 0)                     ; tooltip, value
                 (list "Green" nil                    ; name, stock id
                       "_Green" "<control>G"          ; label, accelerator
                       "Grass" 1)                     ; tooltip, value
                 (list "Blue" nil                     ; name, stock id
                       "_Blue" "<control>B"           ; label, accelerator
                       "Sky" 2))))
    (gtk-action-group-add-radio-actions group actions 0 nil)
    ... )    

Warning

The gtk-action-group-add-radio-actions function has been deprecated since version 3.10 and should not be used in newly written code.
 

See also

*2021-12-18