diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-27 08:35:57 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-27 08:35:57 +0000 |
commit | 4ad2c911de72f059fcbf0c75c874f966e20fd16d (patch) | |
tree | 24ce317821e452e7a43ffe27a5edf0bc86305ecc | |
parent | bd60e7f4369d56a1fc4ad396d32b0e63094c36d7 (diff) | |
download | control-center-4ad2c911de72f059fcbf0c75c874f966e20fd16d.tar control-center-4ad2c911de72f059fcbf0c75c874f966e20fd16d.tar.gz control-center-4ad2c911de72f059fcbf0c75c874f966e20fd16d.tar.bz2 control-center-4ad2c911de72f059fcbf0c75c874f966e20fd16d.tar.xz control-center-4ad2c911de72f059fcbf0c75c874f966e20fd16d.zip |
clean theme changing:
- kill all embedded app (tools *AND* logdrake)
- introduce kill_logdrake() for the latter
(consolided code from quit_global())
- make it human readable
-rwxr-xr-x | control-center | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/control-center b/control-center index 39d523d8..e5f34ecf 100755 --- a/control-center +++ b/control-center @@ -299,8 +299,15 @@ my ($menu, $factory) = create_factory_menu($window_global, { path => N("/_Themes") . "/" . ($name eq $theme ? " O " : " ") . "_$_", callback => sub { return if $theme eq $name; - !$pending_app || splash_warning(N("This action will restart the control center.\nAny change not applied will be lost."), 1) and sig_usr1(), exec "$0 --theme $name"; - } }; + !$pending_app || splash_warning(N("This action will restart the control center.\nAny change not applied will be lost."), 1) and do { + # embedded app must be killed + kill_children(); + kill_logdrake(); + sig_usr1(); + exec "$0 --theme $name"; + }; + } + } } grep { -d "$themes_dir/$_" } all($themes_dir)), { path => N("/_Themes").N("/_More themes"), callback => \&more_themes } ), @@ -743,9 +750,13 @@ sub kill_children { @pid_launched = (); } +sub kill_logdrake { + map { if__($_, kill 'TERM', $_) } @pid_exp; +} + sub quit_global { &kill_children(); - map { if__($_, kill 'TERM', $_) } @pid_exp; + &kill_logdrake(); setVarsInSh($conffile, { EMBEDDED => bool2text($embedded), LOGS => bool2text($show_logs), |