The "toggled" signal is emitted when the toggled() method is called. This is called internally when the GtkCheckMenuItem's "activate" signal is emitted - that is, when a user clicks on the menu item or presses the Enter or Space key while the item is selected. The signal is also emitted when calling the set_active() method.
Note that the state-switching triggered by activation is not directly related to the "toggled" signal.
Callback function