summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-08-19 15:24:27 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-08-19 15:24:27 +0000
commitc939ac2320cc5bb6981c82dd6df3afa2d369cfcc (patch)
treec52db7a2b414357268396ca078b3b6869d5f9b03
parent6baa3fd970daa8d2eb993ca8d48ebb5d0db619d6 (diff)
downloadurpmi-c939ac2320cc5bb6981c82dd6df3afa2d369cfcc.tar
urpmi-c939ac2320cc5bb6981c82dd6df3afa2d369cfcc.tar.gz
urpmi-c939ac2320cc5bb6981c82dd6df3afa2d369cfcc.tar.bz2
urpmi-c939ac2320cc5bb6981c82dd6df3afa2d369cfcc.tar.xz
urpmi-c939ac2320cc5bb6981c82dd6df3afa2d369cfcc.zip
Allow to cancel when gurpmi asks to insert a new media
-rwxr-xr-xgurpmi25
1 files changed, 3 insertions, 2 deletions
diff --git a/gurpmi2 b/gurpmi2
index f781e832..045c6705 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -196,11 +196,12 @@ sub do_install_3 () {
$urpm->copy_packages_of_removable_media($list, \%sources,
force_local => 1,
ask_for_medium => sub {
- my $w = Gtk2::MessageDialog->new($mainw, [qw(modal destroy-with-parent)], 'warning', 'ok',
+ my $w = Gtk2::MessageDialog->new($mainw, [qw(modal destroy-with-parent)], 'warning', 'ok-cancel',
N("Please insert the medium named \"%s\" on device [%s]", $_[0], $_[1])
);
- $w->run;
+ my $response = $w->run;
$w->destroy;
+ exit 0 if $response eq 'cancel';
1;
}
);