aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-09-05 16:10:40 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-09-05 16:10:40 +0000
commit5c2d2a0f0d58cc44629033b73c441d177534d1d9 (patch)
treedef6f50b55f6a42b3e37ecd8f99ef9bd48728025 /rpmdrake.pm
parent01fc8ba199b1f6c1bfa85ce6ab9e2b31c7c60ccd (diff)
downloadrpmdrake-5c2d2a0f0d58cc44629033b73c441d177534d1d9.tar
rpmdrake-5c2d2a0f0d58cc44629033b73c441d177534d1d9.tar.gz
rpmdrake-5c2d2a0f0d58cc44629033b73c441d177534d1d9.tar.bz2
rpmdrake-5c2d2a0f0d58cc44629033b73c441d177534d1d9.tar.xz
rpmdrake-5c2d2a0f0d58cc44629033b73c441d177534d1d9.zip
have an expert right-click menu on the left treeview, for asking
to reset the selection, reload lists and update sources
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r--rpmdrake.pm24
1 files changed, 24 insertions, 0 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index ff7160ce..112bb1c1 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -287,3 +287,27 @@ by Mandrake Linux Official Updates.")), return '';
$w->{rwindow}->show_all;
$w->main && member($w->{retval}{sel}, map { $_->{url} } @mirrors) and $w->{retval}{sel};
}
+
+sub update_sources {
+ my ($urpm) = @_;
+ my $w = my_gtk->new(_("Update source(s)"));
+ gtkadd($w->{window},
+ gtkpack__(new Gtk::VBox(0,5),
+ new Gtk::Label(_("Select the source(s) you wish to update:")),
+ (my @buttons = map { new Gtk::CheckButton($_->{name}) } @{$urpm->{media}}),
+ new Gtk::HSeparator,
+ gtkpack(create_hbox(),
+ gtksignal_connect(new Gtk::Button(_("Update")), clicked => sub { $w->{retval} = 1; Gtk->main_quit }),
+ gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { $w->{retval} = 0; Gtk->main_quit }))));
+ $w->{rwindow}->set_position('center');
+ if ($w->main && grep { $_->get_active } @buttons) {
+ each_index { $_->get_active and $urpm->select_media($urpm->{media}[$::i]{name}) } @buttons;
+ foreach (@{$urpm->{media}}) { #- force ignored media to be returned alive (forked from urpmi.updatemedia...)
+ $_->{modified} and delete $_->{ignore};
+ }
+ slow_func(_("Please wait, updating media..."),
+ sub { $urpm->update_media(noclean => 1) });
+ return 1;
+ }
+ return 0;
+}