aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-02-23 12:39:47 +0000
committerThierry Vignaud <tv@mandriva.org>2007-02-23 12:39:47 +0000
commit6645fc3fa696eaf98c34b41731f8013f5f77429d (patch)
tree583282b863722ef25813485e05c8f538c50ba83d
parent09fa58a5f166913442c8f3dcbb534be92fb5a4af (diff)
downloadrpmdrake-6645fc3fa696eaf98c34b41731f8013f5f77429d.tar
rpmdrake-6645fc3fa696eaf98c34b41731f8013f5f77429d.tar.gz
rpmdrake-6645fc3fa696eaf98c34b41731f8013f5f77429d.tar.bz2
rpmdrake-6645fc3fa696eaf98c34b41731f8013f5f77429d.tar.xz
rpmdrake-6645fc3fa696eaf98c34b41731f8013f5f77429d.zip
add missing round brackets around ternary expressions
-rw-r--r--Rpmdrake/gui.pm14
-rwxr-xr-xRpmdrake/pkg.pm4
2 files changed, 8 insertions, 10 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index e10c8d46..03037714 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -452,8 +452,8 @@ sub callback_choices {
}
my $callback = sub { interactive_msg(N("More information on package..."), get_info($_[0]), scroll => 1) };
$choices = [ sort { $a->name cmp $b->name } @$choices ];
- my @choices = interactive_list_(N("Please choose"), scalar(@$choices) == 1 ?
- N("The following package is needed:") : N("One of the following packages is needed:"),
+ my @choices = interactive_list_(N("Please choose"), (scalar(@$choices) == 1 ?
+ N("The following package is needed:") : N("One of the following packages is needed:")),
[ map { urpm_name($_) } @$choices ], $callback);
$choices->[$choices[0]];
}
@@ -570,12 +570,10 @@ sub toggle_nodes {
} @cant;
my $count = @reasons;
interactive_msg(
- $count == 1 ?
- N("One package cannot be installed")
- : N("Some packages can't be installed"),
- $count == 1 ?
- N("Sorry, the following package cannot be selected:\n\n%s", join("\n", @reasons))
- : N("Sorry, the following packages can't be selected:\n\n%s", join("\n", @reasons)),
+ ($count == 1 ? N("One package cannot be installed") : N("Some packages can't be installed")),
+ ($count == 1 ?
+ N("Sorry, the following package cannot be selected:\n\n%s", join("\n", @reasons))
+ : N("Sorry, the following packages can't be selected:\n\n%s", join("\n", @reasons))),
scroll => 1,
);
foreach (@cant) {
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 857eb7a5..84153091 100755
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -488,9 +488,9 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
interactive_msg(($to_install ? N("Confirmation") : N("Some packages need to be removed")),
($r ?
(!$to_install ? join("\n\n", P("Remove %d package?", "Remove %d packages?", $remove_count, $remove_count), $r) :
- $remove_count == 1 ?
+ ($remove_count == 1 ?
N("The following package has to be removed for others to be upgraded:")
- : N("The following packages have to be removed for others to be upgraded:") . join("\n\n", $r, if_($to_install, $to_install)) . N("Is it ok to continue?"))
+ : N("The following packages have to be removed for others to be upgraded:")) . join("\n\n", $r, if_($to_install, $to_install)) . N("Is it ok to continue?"))
: $to_install),
scroll => 1,
yesno => 1) or do {