diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-10-21 15:47:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-10-21 15:47:35 +0000 |
commit | b7bc4c01b429c6e39908ad38314bd32875fa2a92 (patch) | |
tree | bad38f5042869643c56dc2e88255c70ed2f83b06 /gurpmi2 | |
parent | 0b0438d738cf6c4ada1dccb3a919d6e49ed0f1f5 (diff) | |
download | urpmi-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-x | gurpmi2 | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -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); |