diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-10-03 14:42:43 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-10-03 14:42:43 +0000 |
commit | 9e9db899368826f8bedf7247b6d3549d7e0874fb (patch) | |
tree | d4627003d3782571942584e0207428e051659d8f /mdkapplet | |
parent | b071640da5f36d566c5db68d93ea7906e49516bf (diff) | |
download | mgaonline-9e9db899368826f8bedf7247b6d3549d7e0874fb.tar mgaonline-9e9db899368826f8bedf7247b6d3549d7e0874fb.tar.gz mgaonline-9e9db899368826f8bedf7247b6d3549d7e0874fb.tar.bz2 mgaonline-9e9db899368826f8bedf7247b6d3549d7e0874fb.tar.xz mgaonline-9e9db899368826f8bedf7247b6d3549d7e0874fb.zip |
(confirm_upgrade,is_there_a_new_distributions) enable to not check again for new distro
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -260,6 +260,8 @@ ugtk2::exit(0); sub is_there_a_new_distributions() { + return if $local_config{DO_NOT_ASK_FOR_DISTRO_UPGRADE} =~ /^TRUE$/i; + #- contact the following URL to retrieve the list of released distributions. my $type = lc($product_id->{type}); $type =~ s/\s//g; my $list = "http://api.mandriva.com/distributions/$type.$product_id->{arch}.list?product=$product_id->{product}"; @@ -352,11 +354,20 @@ sub restart_applet() { } sub confirm_upgrade() { - my $bool = ugtk2::ask_yesorno(N("A new stable distribution has been released"), - N("A new stable distribution has been released."), - N("Do you want to upgrade to the '\%s' distribution?", $new_distro_version), - ); - $bool; + my $w = ugtk2->new(N("A new stable distribution has been released")); + my $warn_me = text2bool($local_config{DO_NOT_ASK_FOR_DISTRO_UPGRADE}); + gtkadd($w->{window}, + gtknew('VBox', children_tight => [ + N("A new stable distribution has been released."), + N("Do you want to upgrade to the '\%s' distribution?", $new_distro_version), + gtknew('CheckButton', text => N("Do not ask me next time"), active_ref => \$warn_me), + create_okcancel($w, N("Yes"), N("No")), + ]), + ); + $w->{ok}->grab_focus; + my $res = $w->main; + setVar('DO_NOT_ASK_FOR_DISTRO_UPGRADE', bool2text($warn_me)); + $res; } sub upgrade() { |