In the following code, when I select the second radio button, both the
‘activate’ callbacks are executed. I don’t want both to be executed,
only the selected menu should have its callback executed. Any ideas?
In the following code, when I select the second radio button, both the
‘activate’ callbacks are executed. I don’t want both to be executed,
only the selected menu should have its callback executed. Any ideas?
In the following code, when I select the second radio button, both the
‘activate’ callbacks are executed. I don’t want both to be executed,
only the selected menu should have its callback executed. Any ideas?
Use Gtk::RadioMenuItem#active? method.
Ah, thanks.
The following does what I want:
first.signal_connect(“activate”) { puts “First activated” if
first.active? }
second.signal_connect(“activate”) { puts “Second activated” if
second.active? }