aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-01 11:32:37 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-01 11:32:37 +0000
commit3c11932412535dbbcca0a8acf76ce1034e78693b (patch)
tree36d5cf6c50cf1bf51a2dc8486f630388ac800ad7 /Rpmdrake
parentf0c6b087e508d61a8f6ae7ae9d434622966edaf1 (diff)
downloadrpmdrake-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')
-rw-r--r--Rpmdrake/gui.pm8
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;