aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatteo Pasotti <matteo.pasotti@gmail.com>2015-01-13 19:41:13 +0100
committerMatteo Pasotti <matteo.pasotti@gmail.com>2015-01-13 19:41:13 +0100
commitf0e683167b1ef3d967bb3e6513da8d1191d4378e (patch)
treea97c3c1fa2123abd90ce84a364432967d94c88af /lib
parent81c055bcfd51fe47568d973f48688ec2ca7af39a (diff)
downloadmanatools-f0e683167b1ef3d967bb3e6513da8d1191d4378e.tar
manatools-f0e683167b1ef3d967bb3e6513da8d1191d4378e.tar.gz
manatools-f0e683167b1ef3d967bb3e6513da8d1191d4378e.tar.bz2
manatools-f0e683167b1ef3d967bb3e6513da8d1191d4378e.tar.xz
manatools-f0e683167b1ef3d967bb3e6513da8d1191d4378e.zip
fixed return value for ask_(Allowed|Watched)Services causing bad behaviours
Diffstat (limited to 'lib')
-rw-r--r--lib/AdminPanel/Module/Firewall.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/AdminPanel/Module/Firewall.pm b/lib/AdminPanel/Module/Firewall.pm
index 26eb9e83..e91297b6 100644
--- a/lib/AdminPanel/Module/Firewall.pm
+++ b/lib/AdminPanel/Module/Firewall.pm
@@ -616,7 +616,7 @@ sub ask_WatchedServices {
my $cancelButton = $factory->createPushButton($vbox_foot_right,$self->loc->N("Cancel"));
my $okButton = $factory->createPushButton($vbox_foot_right,$self->loc->N("OK"));
- my $retval = 1;
+ my $retval = 0;
# main loop
while(1) {
@@ -660,7 +660,6 @@ sub ask_WatchedServices {
}
}
if ($widget == $cancelButton) {
- $retval = 0;
last;
}elsif ($widget == $aboutButton) {
my $abtdlg = $self->aboutDialog();
@@ -669,6 +668,7 @@ sub ask_WatchedServices {
$self->sh_gui->AboutDialog($abtdlg
);
}elsif ($widget == $okButton) {
+ $retval = 1;
last;
}
}
@@ -827,7 +827,7 @@ sub ask_AllowedServices {
my $cancelButton = $factory->createPushButton($vbox_foot_right,$self->loc->N("Cancel"));
my $okButton = $factory->createPushButton($vbox_foot_right,$self->loc->N("OK"));
- my $retval = 1;
+ my $retval = 0;
# main loop
while(1) {
@@ -847,12 +847,11 @@ sub ask_AllowedServices {
{
if($widget == ${$server->{widget}})
{
- ${$server->{value}} = !${$server->{value}};
+ ${$server->{value}} = !${$server->{value}};
}
}
if ($widget == $cancelButton) {
- $retval = 0;
last;
}elsif ($widget == $aboutButton) {
my $abtdlg = $self->aboutDialog();
@@ -860,6 +859,7 @@ sub ask_AllowedServices {
$abtdlg->{description} = $self->loc->N("Graphical manager for firewall rules");
$self->sh_gui->AboutDialog($abtdlg);
}elsif ($widget == $okButton) {
+ $retval = 1;
last;
}
}