From 4c22253e18abdf74ac63631828c1fb37d067f71b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 21 Apr 2013 00:33:35 +0000 Subject: only enable "quit confirm" popup dialog when asked (mga#8476) (when clicking "X") --- perl-install/mygtk2.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'perl-install/mygtk2.pm') diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index 3cd9e59f2..779e77e8f 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -1212,8 +1212,15 @@ sub mygtk2::MagicWindow::AUTOLOAD { $w->{$s1}->$meth(@args); } +my $enable_quit_popup; +sub enable_quit_popup { + my ($bool) = @_; + $enable_quit_popup = $bool; +} + state $in_callback; sub quit_popup() { + return if !$enable_quit_popup; if (!$in_callback) { $in_callback = 1; my $_guard = before_leaving { undef $in_callback }; -- cgit v1.2.1