aboutsummaryrefslogtreecommitdiff
path: root/src/MTools/Widget/MRadioBouton.pm
diff options
context:
space:
mode:
authorcaramel2007-09-14 13:59:23 +0000
committercaramel2007-09-14 13:59:23 +0000
commita7bd2b66c38b625a50ab8bf85e8d8ea0be78ac8f (patch)
treeaeb31b885aafb9b377e4b183e4c81cb809f45b0d /src/MTools/Widget/MRadioBouton.pm
parent6f366f03ad459a1823bc951cf7f2fc4709bc3361 (diff)
downloadmtc-a7bd2b66c38b625a50ab8bf85e8d8ea0be78ac8f.zip
mtc-a7bd2b66c38b625a50ab8bf85e8d8ea0be78ac8f.tar.gz
mtc-a7bd2b66c38b625a50ab8bf85e8d8ea0be78ac8f.tar.bz2
mtc-a7bd2b66c38b625a50ab8bf85e8d8ea0be78ac8f.tar.xz
Modifications sur le MToggleBouton (methode changeCurrentState) + MRadioButton (bugs dus au svg occasionnant des boucles infinies
Diffstat (limited to 'src/MTools/Widget/MRadioBouton.pm')
-rw-r--r--src/MTools/Widget/MRadioBouton.pm26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/MTools/Widget/MRadioBouton.pm b/src/MTools/Widget/MRadioBouton.pm
index 768a00d..3491235 100644
--- a/src/MTools/Widget/MRadioBouton.pm
+++ b/src/MTools/Widget/MRadioBouton.pm
@@ -59,9 +59,15 @@ sub new {
plink ([$self, 'text'], [$txt, '-text']);
}
$self -> mconfigure (-atomic => 1);
+
+ my $timer = new MTools::MTimer (5, 1);
+ my @gon_tmp = @gon;
+ push (@gon_tmp, $timer);
+
my $sw = new MTools::MSwitch (
$self,
on => \@gon,
+ on_tmp => \@gon_tmp,
over => \@gover,
off => \@goff,
);
@@ -73,20 +79,38 @@ sub new {
press => [$self, '<Button-1>'],
press2 => [$self, 'PRESS'],
release => [$self, 'RELEASE'],
+ timeout => [$timer, 'TIME_OUT'],
},
transitions => {
on => {
enter => {
to => 'over',
},
+ press => {
+ to => 'off',
+ notify => 'PRESSED',
+ },
+ press2 => {
+ to => 'off',
+ notify => 'PRESSED',
+ },
+ },
+ on_tmp => {
+ press => {
+ to => 'off',
+ notify => 'PRESSED',
+ },
press2 => {
to => 'off',
notify => 'PRESSED',
},
+ timeout => {
+ to => 'on',
+ },
},
over => {
leave => {
- to => 'on',
+ to => 'on_tmp',
},
press => {
to => 'off',