Re: radioitem
- From: Beast <beast i6x org>
- To: gtk-perl-list gnome org
- Subject: Re: radioitem
- Date: Wed, 20 Jul 2005 15:14:38 +0700
muppet wrote:
probably belongs in the FAQ:
http://mail.gnome.org/archives/gtk-perl-list/2003-September/msg00081.html
http://mail.gnome.org/archives/gtk-perl-list/2004-April/msg00115.html
http://mail.gnome.org/archives/gtk-perl-list/2005-March/msg00039.html
Thanks, but I still have a problem. It trigger action twice on every
event, what could be the reason?
use Gtk2::SimpleMenu;
...
children => [
'Radio One' => {
callback => sub { $self->radio_callback},
item_type => '<RadioItem>',
groupid => 1
},
'Radio Two' => {
callback => sub { $self->radio_callback},,
item_type => '<RadioItem>',
groupid => 1
},
...
sub radio_callback {
my $self = shift;
if ($self->{menu}->get_widget('/Radio/Radio One')->get_active) {
print "Radio One active\n";
}
}
When I select Radio One, it prints:
Radio One active
Radio One active
--
--beast
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]