aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-08-02 14:21:04 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-08-02 14:21:04 +0000
commit523eb41c0cfa724ec2737cecbd0ec2d3ed337718 (patch)
tree44e9038896530d6a71c83688f35eb30599376133 /rpmdrake.pm
parentcd0be8913f2aaae67452ae27a3f989d884e9c510 (diff)
downloadrpmdrake-523eb41c0cfa724ec2737cecbd0ec2d3ed337718.tar
rpmdrake-523eb41c0cfa724ec2737cecbd0ec2d3ed337718.tar.gz
rpmdrake-523eb41c0cfa724ec2737cecbd0ec2d3ed337718.tar.bz2
rpmdrake-523eb41c0cfa724ec2737cecbd0ec2d3ed337718.tar.xz
rpmdrake-523eb41c0cfa724ec2737cecbd0ec2d3ed337718.zip
allow user to cancel on medium changes
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r--rpmdrake.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 1bf4d172..189e5ebf 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -61,14 +61,16 @@ sub writeconf {
}
sub interactive_msg {
- my ($title, $contents, $yesno) = @_;
+ my ($title, $contents, $options) = @_;
my $d = my_gtk->new($title);
gtkadd($d->{window},
gtkpack_(new Gtk::VBox(0,5),
1, new Gtk::Label($contents),
0, gtkpack(create_hbox(),
- $yesno ? (gtksignal_connect(new Gtk::Button(_("Yes")), clicked => sub { $d->{retval} = 1; Gtk->main_quit }),
- gtksignal_connect(new Gtk::Button(_("No")), clicked => sub { $d->{retval} = 0; Gtk->main_quit }))
+ $options->{yesno} ? (gtksignal_connect(new Gtk::Button($options->{text}{yes} || _("Yes")),
+ clicked => sub { $d->{retval} = 1; Gtk->main_quit }),
+ gtksignal_connect(new Gtk::Button($options->{test}{no} || _("No")), clicked =>
+ sub { $d->{retval} = 0; Gtk->main_quit }))
: gtksignal_connect(new Gtk::Button(_("Ok")), clicked => sub { Gtk->main_quit })
)));
$d->main;
@@ -215,7 +217,7 @@ sub choose_mirror {
_("I need to contact MandrakeSoft website to get the mirrors list.
Please check that your network is currently running.
-Is it ok to continue?"), 1) or return '';
+Is it ok to continue?"), { yesno => 1 }) or return '';
my $wait = wait_msg(_("Please wait, downloading mirrors addresses from MandrakeSoft website."));
my @mirrors;
eval { @mirrors = mirrors('/var/cache/urpmi', 'updates') };