summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-12-13 15:21:28 +0000
committerThierry Vignaud <tv@mageia.org>2012-12-13 15:21:28 +0000
commit0833944b0b78527132d7dd14db26f2db8ecf1473 (patch)
tree3a0c5930ddc3b82a8c7cae1ae9a02369b5fea00b /perl-install/mygtk2.pm
parentc9435159e22983c638b2b5e01c8b91ea90e079b2 (diff)
downloaddrakx-0833944b0b78527132d7dd14db26f2db8ecf1473.tar
drakx-0833944b0b78527132d7dd14db26f2db8ecf1473.tar.gz
drakx-0833944b0b78527132d7dd14db26f2db8ecf1473.tar.bz2
drakx-0833944b0b78527132d7dd14db26f2db8ecf1473.tar.xz
drakx-0833944b0b78527132d7dd14db26f2db8ecf1473.zip
(quit_popup) popup a dialog confirming to quit when clicking "X" (mga#1812)
to be manually called from delete_event callback in pure gtk+ cases (eg: mcc)
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r--perl-install/mygtk2.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index 89bcf33f0..1f97b02d6 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -1212,9 +1212,23 @@ sub mygtk2::MagicWindow::AUTOLOAD {
$w->{$s1}->$meth(@args);
}
+state $in_callback;
+sub quit_popup() {
+ if (!$in_callback) {
+ $in_callback = 1;
+ my $_guard = before_leaving { undef $in_callback };
+ require ugtk2;
+ my $w = ugtk2->new(N("Confirmation"), grab => 1);
+ ugtk2::_ask_okcancel($w, N("Are you sure you want to quit?"), N("Quit"), N("Cancel"));
+ my $ret = ugtk2::main($w);
+ return 1 if !$ret;
+ }
+}
+
sub quit_callback {
my ($w) = @_;
-
+
+ return 1 if quit_popup();
if ($::isWizard) {
$w->destroy;
die 'wizcancel';
ss='del'>-'allow_remote_root_login' => N("Allow/Forbid remote root login."),
+'allow_remote_root_login' => N("Allow remote root login."),
-'allow_root_login' => N("Allow/Forbid direct root login."),
+'allow_root_login' => N("Allow direct root login."),
-'allow_user_list' => N("Allow/Forbid the list of users on the system on display managers (kdm and gdm)."),
+'allow_user_list' => N("Allow the list of users on the system on display managers (kdm and gdm)."),
-'allow_xauth_from_root' => N("Allow/forbid to export display when
+'allow_xauth_from_root' => N("Allow to export display when
passing from the root account to the other users.
See pam_xauth(8) for more details.'"),
-'allow_x_connections' => N("Allow/Forbid X connections:
+'allow_x_connections' => N("Allow X connections:
-- ALL (all connections are allowed),
+- All (all connections are allowed),
-- LOCAL (only connection from local machine),
+- Local (only connection from local machine),
-- NONE (no connection)."),
+- None (no connection)."),
'allow_xserver_to_listen' => N("The argument specifies if clients are authorized to connect
to the X server from the network on the tcp port 6000 or not."),
'authorize_services' =>
- #-PO: here "ALL", "LOCAL" and "NONE" are values in a pull-down menu; translate them the same as they're
+ #-PO: here "ALL", "Local" and "None" are values in a pull-down menu; translate them the same as they're
N("Authorize:
- all services controlled by tcp_wrappers (see hosts.deny(5) man page) if set to \"ALL\",
-- only local ones if set to \"LOCAL\"
+- only local ones if set to \"Local\"
-- none if set to \"NONE\".
+- none if set to \"None\".
To authorize the services you need, use /etc/hosts.allow (see hosts.allow(5))."),
@@ -69,33 +69,33 @@ The /etc/security/msec/server is used by chkconfig --add to decide to
add a service if it is present in the file during the installation of
packages."),
-'enable_at_crontab' => N("Enable/Disable crontab and at for users.
+'enable_at_crontab' => N("Enable crontab and at for users.
Put allowed users in /etc/cron.allow and /etc/at.allow (see man at(1)
and crontab(1))."),
-'enable_console_log' => N("Enable/Disable syslog reports to console 12"),
+'enable_console_log' => N("Enable syslog reports to console 12"),
-'enable_dns_spoofing_protection' => N("Enable/Disable name resolution spoofing protection. If
+'enable_dns_spoofing_protection' => N("Enable name resolution spoofing protection. If
\"%s\" is true, also reports to syslog.", N("Security Alerts:")),
-'enable_ip_spoofing_protection' => N("Enable/Disable IP spoofing protection."),
+'enable_ip_spoofing_protection' => N("Enable IP spoofing protection."),
-'enable_libsafe' => N("Enable/Disable libsafe if libsafe is found on the system."),
+'enable_libsafe' => N("Enable libsafe if libsafe is found on the system."),
-'enable_log_strange_packets' => N("Enable/Disable the logging of IPv4 strange packets."),
+'enable_log_strange_packets' => N("Enable the logging of IPv4 strange packets."),
-'enable_msec_cron' => N("Enable/Disable msec hourly security check."),
+'enable_msec_cron' => N("Enable msec hourly security check."),
'enable_pam_wheel_for_su' => N("Enable su only from members of the wheel group. If set to no, allows su from any user."),
'enable_password' => N("Use password to authenticate users."),
-'enable_promisc_check' => N("Activate/Disable ethernet cards promiscuity check."),
+'enable_promisc_check' => N("Activate ethernet cards promiscuity check."),
-'enable_security_check' => N("Activate/Disable daily security check."),
+'enable_security_check' => N("Activate daily security check."),
-'enable_sulogin' => N("Enable/Disable sulogin(8) in single user level."),
+'enable_sulogin' => N("Enable sulogin(8) in single user level."),
'no_password_aging_for' => N("Add the name as an exception to the handling of password aging by msec."),