summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-02-02 15:59:01 +0000
committerThierry Vignaud <tv@mandriva.org>2010-02-02 15:59:01 +0000
commitb83435c2f16380994fcdae7f0bc0b21f95b99ed6 (patch)
treed87abd596795c2136e8c1e63e03befd72556e814
parentf9a3154fb9e22dd74b8095236e132b941ed033ba (diff)
downloadmgaonline-b83435c2f16380994fcdae7f0bc0b21f95b99ed6.tar
mgaonline-b83435c2f16380994fcdae7f0bc0b21f95b99ed6.tar.gz
mgaonline-b83435c2f16380994fcdae7f0bc0b21f95b99ed6.tar.bz2
mgaonline-b83435c2f16380994fcdae7f0bc0b21f95b99ed6.tar.xz
mgaonline-b83435c2f16380994fcdae7f0bc0b21f95b99ed6.zip
(confirm_upgrade) use (cdt ? foobar : ()) instead of if_() since the
latter will still create the widget even if not used whereas 'active_ref' option is missing on 2008.0
-rwxr-xr-xmdkapplet7
1 files changed, 4 insertions, 3 deletions
diff --git a/mdkapplet b/mdkapplet
index d99537ec..7594c7b1 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -441,8 +441,9 @@ sub confirm_upgrade() {
gtknew('Label_Left', text => N("Do you want to upgrade to the '\%s' distribution?",
$new_distro->{name} || $new_distro->{version}), @common),
gtknew('CheckButton', text => N("Do not ask me next time"), active_ref => \$warn_me),
- if_(is_download_all_enabled(),
- gtknew('CheckButton', text => N("Download all packages at once") . "\n" .
+ # active_ref option is missing on 2008.0:
+ (is_download_all_enabled() ?
+ (gtknew('CheckButton', text => N("Download all packages at once") . "\n" .
N("(Warning: You will need quite a lot of free space)"),
active_ref => \$download_all, sensitive_ref => \$browse,
toggled => sub { $box and $box->set_sensitive($download_all) },
@@ -452,7 +453,7 @@ sub confirm_upgrade() {
0, gtknew('Label_Left', text => N("Where to download packages:")),
1 , $browse,
]),
- ),
+ ) : ()),
create_okcancel($w, N("Next"), N("Cancel")),
]);