summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-11-19 16:57:35 +0000
committerThierry Vignaud <tv@mandriva.org>2009-11-19 16:57:35 +0000
commitfa105f3274aa954b2e7d8fd0deabcfe213843569 (patch)
treee7b0f2b407190aa85d7a7dc8341f7137613c37a2
parentc2b15c3e67b952cb34deb10a582ef852108c8f93 (diff)
downloadmgaonline-fa105f3274aa954b2e7d8fd0deabcfe213843569.tar
mgaonline-fa105f3274aa954b2e7d8fd0deabcfe213843569.tar.gz
mgaonline-fa105f3274aa954b2e7d8fd0deabcfe213843569.tar.bz2
mgaonline-fa105f3274aa954b2e7d8fd0deabcfe213843569.tar.xz
mgaonline-fa105f3274aa954b2e7d8fd0deabcfe213843569.zip
(confirm_upgrade,is_download_all_enabled) only enable 'download all
packages at once' on 2010.1 and further
-rw-r--r--NEWS1
-rwxr-xr-xmdkapplet28
2 files changed, 19 insertions, 10 deletions
diff --git a/NEWS b/NEWS
index 9761cef6..a7ab0c56 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
- mdkapplet
o add mdkonline version to distribution list requests
o log crashes of mdkapplet checker process
+ o only enable 'download all packages at once' on 2010.1 and further
o prevent checker process from crashing on 2008.1 and 2009.0
Version 2.77.9 - 10 November 2009, Thierry Vignaud
diff --git a/mdkapplet b/mdkapplet
index 9a417d61..efad95aa 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -421,6 +421,12 @@ sub harvester {
sub configNetwork() { log::explanations(N_("Launching drakconnect\n")); fork_exec("/usr/sbin/drakconnect") }
+# only enable 'download all packages at once' on 2010.1 and further:
+sub is_download_all_enabled {
+ # prevent crashing on 2008.1 and 2009.0:
+ eval { is_it_a_devel_distro() } || !member($product_id->{version}, qw(2008.1 2009.0 2009.1));
+}
+
sub confirm_upgrade() {
local $mygtk2::left_padding = 0;
my $warn_me = text2bool($local_config{DO_NOT_ASK_FOR_DISTRO_UPGRADE});
@@ -445,16 +451,18 @@ 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),
- 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) },
- ),
- $box = gtknew('HBox', sensitive => $download_all,
- children => [
- 0, gtknew('Label_Left', text => N("Where to download packages:")),
- 1 , $browse,
- ]),
+ if_(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) },
+ ),
+ $box = gtknew('HBox', sensitive => $download_all,
+ children => [
+ 0, gtknew('Label_Left', text => N("Where to download packages:")),
+ 1 , $browse,
+ ]),
+ ),
create_okcancel($w, N("Next"), N("Cancel")),
]);