diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-10-01 11:32:37 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-10-01 11:32:37 +0000 |
commit | 3c11932412535dbbcca0a8acf76ce1034e78693b (patch) | |
tree | 36d5cf6c50cf1bf51a2dc8486f630388ac800ad7 /Rpmdrake/gui.pm | |
parent | f0c6b087e508d61a8f6ae7ae9d434622966edaf1 (diff) | |
download | rpmdrake-3c11932412535dbbcca0a8acf76ce1034e78693b.tar rpmdrake-3c11932412535dbbcca0a8acf76ce1034e78693b.tar.gz rpmdrake-3c11932412535dbbcca0a8acf76ce1034e78693b.tar.bz2 rpmdrake-3c11932412535dbbcca0a8acf76ce1034e78693b.tar.xz rpmdrake-3c11932412535dbbcca0a8acf76ce1034e78693b.zip |
(real_quit) warn on exit if some packages are selected (#45404)
Diffstat (limited to 'Rpmdrake/gui.pm')
-rw-r--r-- | Rpmdrake/gui.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 9b63ddb8..05240dd1 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -65,6 +65,7 @@ our @EXPORT = qw( is_locale_available node_state pkgs_provider + real_quit reset_search set_node_state sort_callback @@ -803,6 +804,13 @@ sub is_there_selected_packages() { int(grep { $pkgs->{$_}{selected} } keys %$pkgs) } +sub real_quit() { + if (is_there_selected_packages()) { + interactive_msg(N("Some packages are selected."), N("Some packages are selected.") . "\n" . N("Do you really want to quit?"), yesno => 1) or return; + } + Gtk2->main_quit; +} + sub do_action__real { my ($options, $callback_action, $o_info) = @_; require urpm::sys; |