aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-17 03:15:45 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-17 03:15:45 +0000
commit3e9f710b084d71370123e7e5fa19ba22ca15e234 (patch)
tree6214e11abbc8071622e8a7e72c6c469c5d8e3735
parent83e4bbc3b4c2bbcb1b8b0d8de08ddb47c4f3c850 (diff)
downloadrpmdrake-3e9f710b084d71370123e7e5fa19ba22ca15e234.tar
rpmdrake-3e9f710b084d71370123e7e5fa19ba22ca15e234.tar.gz
rpmdrake-3e9f710b084d71370123e7e5fa19ba22ca15e234.tar.bz2
rpmdrake-3e9f710b084d71370123e7e5fa19ba22ca15e234.tar.xz
rpmdrake-3e9f710b084d71370123e7e5fa19ba22ca15e234.zip
Add an "update" checkbox in the software media manager to mark newly added
media as "updates"
-rwxr-xr-xedit-urpm-sources.pl14
1 files changed, 11 insertions, 3 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl
index 9e1c9cfb..5b93e826 100755
--- a/edit-urpm-sources.pl
+++ b/edit-urpm-sources.pl
@@ -199,7 +199,14 @@ sub add_callback {
},
)
) ];
- }->()
+ }->(),
+ sub {
+ [ gtkpack_(
+ Gtk2::HBox->new(0, 0),
+ 1, Gtk2::Label->new,
+ 0, ($info->{update_check} = Gtk2::CheckButton->new(N("Search this media for updates"))),
+ ) ];
+ }->(),
)
);
$book->show;
@@ -241,6 +248,7 @@ really want to replace it?"), yesno => 1) or return 0;
url => $info->{url_entry}->get_text,
hdlist => $info->{hdlist_entry}->get_text,
distrib => $info->{distrib_check} ? $info->{distrib_check}->get_active : 0,
+ update => $info->{update_check}->get_active ? 1 : undef,
);
%make_url = (local => "file:/$i{url}", http => $i{url}, removable => "removable:/$i{url}");
$i{url} =~ s|^ftp://||;
@@ -263,7 +271,7 @@ really want to replace it?"), yesno => 1) or return 0;
add_medium_and_check(
$urpm,
{ nolock => 1, distrib => 1 },
- $i{name}, $make_url{$type}, probe_with => 'synthesis',
+ $i{name}, $make_url{$type}, probe_with => 'synthesis', update => $i{update},
);
} else {
if (member($i{name}, map { $_->{name} } @{$urpm->{media}})) {
@@ -274,7 +282,7 @@ really want to replace it?"), yesno => 1) or return 0;
add_medium_and_check(
$urpm,
{ probe_with => $probe, nolock => 1 },
- $i{name}, $make_url{$type}, $i{hdlist},
+ $i{name}, $make_url{$type}, $i{hdlist}, update => $i{update},
);
}
return 1;