summaryrefslogtreecommitdiffstats
path: root/gurpmi2
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-21 15:47:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-21 15:47:35 +0000
commitb7bc4c01b429c6e39908ad38314bd32875fa2a92 (patch)
treebad38f5042869643c56dc2e88255c70ed2f83b06 /gurpmi2
parent0b0438d738cf6c4ada1dccb3a919d6e49ed0f1f5 (diff)
downloadurpmi-b7bc4c01b429c6e39908ad38314bd32875fa2a92.tar
urpmi-b7bc4c01b429c6e39908ad38314bd32875fa2a92.tar.gz
urpmi-b7bc4c01b429c6e39908ad38314bd32875fa2a92.tar.bz2
urpmi-b7bc4c01b429c6e39908ad38314bd32875fa2a92.tar.xz
urpmi-b7bc4c01b429c6e39908ad38314bd32875fa2a92.zip
move ask_yes_or_no callback code into new function ask_yes_or_no()
Diffstat (limited to 'gurpmi2')
-rwxr-xr-xgurpmi217
1 files changed, 10 insertions, 7 deletions
diff --git a/gurpmi2 b/gurpmi2
index 18abe6ec..67c972c7 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -346,13 +346,8 @@ sub do_install_3 () {
}
sync();
},
- ask_yes_or_no => sub {
- my ($title, $msg) = @_;
- my $w = Gtk2::MessageDialog->new($mainw, [qw(modal destroy-with-parent)], 'warning', 'yes-no', $msg);
- my $response = $w->run;
- $w->destroy;
- return $response eq 'ok';
- },
+ ask_yes_or_no => \&ask_yes_or_no,
+
completed => sub {
$urpmi_lock->unlock;
$rpm_lock->unlock;
@@ -404,6 +399,14 @@ sub do_install_3 () {
exit $exit_code;
}
+sub ask_yes_or_no {
+ my ($title, $msg) = @_;
+ my $w = Gtk2::MessageDialog->new($mainw, [qw(modal destroy-with-parent)], 'warning', 'yes-no', $msg);
+ my $response = $w->run;
+ $w->destroy;
+ $response eq 'ok';
+}
+
sub gtk_new_Label_Left {
my ($text) = @_;
my $w = Gtk2::Label->new($text);