aboutsummaryrefslogtreecommitdiffstats
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
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)
-rwxr-xr-xMandrivaUpdate2
-rw-r--r--NEWS1
-rw-r--r--Rpmdrake/gui.pm8
-rwxr-xr-xrpmdrake2
4 files changed, 11 insertions, 2 deletions
diff --git a/MandrivaUpdate b/MandrivaUpdate
index 21678716..7c3d55e3 100755
--- a/MandrivaUpdate
+++ b/MandrivaUpdate
@@ -128,7 +128,7 @@ $::main_window = $w->{real_window};
sub quit() {
($mandrivaupdate_width->[0], $mandrivaupdate_height->[0]) = $::w->{real_window}->get_size;
- Gtk2->main_quit;
+ real_quit();
}
sub run_treeview_dialog {
diff --git a/NEWS b/NEWS
index 5f4af8b7..5b61eef5 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@
* enable to search in full or short package names (#46473)
* fix searching for summary on startup (#49293)
* rerun search after reloading package list (#49834)
+ o warn on exit if some packages are selected (#45404)
Version 5.17 - 1 June 2009, Thierry Vignaud
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;
diff --git a/rpmdrake b/rpmdrake
index 6eb5669c..8c767da8 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -226,7 +226,7 @@ sub do_search($$$$$$$) {
sub quit() {
($rpmdrake_width->[0], $rpmdrake_height->[0]) = $::w->{real_window}->get_size();
- Gtk2->main_quit;
+ real_quit();
}
sub run_treeview_dialog {