summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-06 11:36:08 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-06 11:36:08 +0000
commit8498ace40699214c2187f61726f8259f17597d9a (patch)
treebb2a6531f715aa0f14833eb61da3465c6aa0d83d
parent3922f1174590a14623cb9a636b43395ff188ff63 (diff)
downloadmgaonline-8498ace40699214c2187f61726f8259f17597d9a.tar
mgaonline-8498ace40699214c2187f61726f8259f17597d9a.tar.gz
mgaonline-8498ace40699214c2187f61726f8259f17597d9a.tar.bz2
mgaonline-8498ace40699214c2187f61726f8259f17597d9a.tar.xz
mgaonline-8498ace40699214c2187f61726f8259f17597d9a.zip
(confirm_upgrade) display a URL link button
-rw-r--r--NEWS1
-rwxr-xr-xmdkapplet11
2 files changed, 11 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 5134be48..e3b2971b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
- mdkapplet
o "Distro Upgrade" confirmation dialog:
* display a banner
+ * display an URL link button
Version 2.49 - 3 October 2008
diff --git a/mdkapplet b/mdkapplet
index fdb43497..71d53ae0 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -236,7 +236,7 @@ foreach my $opt (@ARGV) {
my $root = Rpmdrake::open_db::fast_open_urpmi_db()->{root};
-my $new_distro_version;
+my ($new_distro_version, $new_distro_url);
my $product_id = common::parse_LDAP_namespace_structure(cat_("$root/etc/product.id"));
shouldStart() or die "$localfile should be set to TRUE: please use --force or -f option to launch applet\n";
@@ -306,6 +306,7 @@ sub is_there_a_new_distributions() {
if ($new_distro && $new_distro->{version} ne $product_id->{version}) {
$new_distro_version = $new_distro->{version};
+ $new_distro_url = $new_distro->{url};
log::explanations(sprintf("new '%s' distribution was released on %s", $new_distro_version, $new_distro->{release_date}));
return 1;
}
@@ -367,11 +368,19 @@ sub confirm_upgrade() {
N("Distribution Upgrade")
),
N("A new stable distribution has been released."),
+ gtknew('HButtonBox', layout => 'start', children_tight => [
+ my $link = Gtk2::LinkButton->new($new_distro_url, N("More info about this new version")),
+ ]),
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")),
]),
);
+ $link->set_uri_hook(sub {
+ my (undef, $url) = @_;
+ run_program::raw({ detach => 1, setuid => get_parent_uid() }, 'www-browser', $url);
+ });
+
$w->{ok}->grab_focus;
my $res = $w->main;
setVar('DO_NOT_ASK_FOR_DISTRO_UPGRADE', bool2text($warn_me));