summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-05-13 15:02:33 +0000
committerThierry Vignaud <tv@mandriva.org>2008-05-13 15:02:33 +0000
commit5cb4d8f0463c688eec1644ce05f6c6ca326a8574 (patch)
treeeb3450091fce9fb7bc3719b96524913f03dda4ef
parenta182f456402796860442dc32c9b0d8ea5ae00464 (diff)
downloaddrakx-5cb4d8f0463c688eec1644ce05f6c6ca326a8574.tar
drakx-5cb4d8f0463c688eec1644ce05f6c6ca326a8574.tar.gz
drakx-5cb4d8f0463c688eec1644ce05f6c6ca326a8574.tar.bz2
drakx-5cb4d8f0463c688eec1644ce05f6c6ca326a8574.tar.xz
drakx-5cb4d8f0463c688eec1644ce05f6c6ca326a8574.zip
(switch) advise to log out if PA is enabled/disabled
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/harddrake/sound.pm6
2 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index b0cb569c7..e01a90830 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,4 +1,5 @@
- draksound:
+ o advise to log out if PA is enabled/disabled
o disable PA routing when PA is disabled (#40219)
o grey PA routing & 5.1 sound if PA is disabled
o make sure that switch alsa-plugins-pulseaudio is installed when
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index 63d2def3c..885e48d1f 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -323,6 +323,8 @@ sub switch {
my $is_5_1_in_pulseaudio_enabled = is_5_1_in_pulseaudio_enabled();
my $is_user_switching = is_user_switching_enabled();
+ my $old_value = $is_pulseaudio_enabled;
+
my $write_config = sub {
set_pulseaudio($is_pulseaudio_enabled);
set_pulseaudio_routing($is_pulseaudio_enabled && $is_pulseaudio_routing_enabled);
@@ -332,6 +334,10 @@ sub switch {
$in->do_pkgs->ensure_is_installed('alsa-plugins-pulseaudio', '/usr/' . (arch() =~ /x86_64/ ? 'lib64' : 'lib')
.'/alsa-lib/libasound_module_pcm_pulse.so');
}
+ if ($old_value ne $is_pulseaudio_enabled) {
+ require any;
+ any::ask_for_X_restart($in);
+ }
};
my @common = (