Skip to content
Commits on Source (15)
mate-accessibility (1.2) stretch; urgency=medium
[ Alex ARNAUD ]
* mate-accessibility-common: simplify python script to call install()
function to install the package and upgrade() function to upgrade the
package instead of install_v0_11 for example that need to be updated
for each new releases.
* mate-accessibility-common: common_install.py: fit the new
architecture and cleaning
* mate-accessibility-compiz: compiz_install.py: fit the new
architecture and cleaning
* mate-accessibility-orca: remove orca_install.py as it is no longer
useful
* mate-accessibility-mbrola: mbrola_install.py: fit the new
architecture and cleaning
* speech_dispatcher_in_french_install.py: common_install.py: fit the
new architecture and cleaning
* mate-accessibility-compiz: play_sound_restore_volume.sh: rewrite it
completely to avoid sound reduction with PulseAudio. Previously, when
the sound was inferior to the default one, the sound of other
clients (eg. speech-dispatcher) was reduced each time the bell was
played. With this new implementation, the bell sound is played at the
volume level to avoid impact on the PulseAudio sound.
* mate-accessibility-orca: rewrite the 91enforceSoundUp Xsession
script to avoid setting the volume to 70% at startup. Henceforth we
want to set the volume to 30% only if it is lower than 30%,
otherwise we considar we have to keep the user volume.
* mate-accessibility-spd-french: debian/control: add Replaces section
because this package replace file presents in earlier versions of
mate-accessibility-full-fr
[ Colomban Wendling ]
* mate-accessibility-spd-french: Add Conflicts: on mate-a11y-full-fr
to fix downgrade.
* mate-accessibility-common: Add a workaround for missing MATE
panel applets.
-- Alex ARNAUD <alexarnaud@hypra.fr> Wed, 19 Jun 2019 17:40:07 +0200
mate-accessibility (1.1) stretch; urgency=medium
[ Alex ARNAUD ]
......@@ -28,7 +67,7 @@ mate-accessibility (1.1) stretch; urgency=medium
* mate-accessibility-ocr-integration-caja: remove dependency on mate-
accessibility-common as it is not useful.
* mate-accessibility-ocr-integration-caja: execute ocrize in another
process to avoid to freeze caja during the ocrzer loading
proccess to avoid to freeze caja during the ocrzer loading
* mate-accessibility-compiz: play_sound_restore_volume.sh: rewrite it
completely to avoid sound reduction with PulseAudio. Previously, when
the sound was inferior to the default one, the sound of other
......
......@@ -198,6 +198,10 @@ Description: Mate accessibility support package
Package: mate-accessibility-spd-french
Section: sound
Architecture: all
Replaces:
mate-accessibility-full-fr (<< 1.2~),
Conflicts:
mate-accessibility-full-fr (<< 1.2~)
Depends:
${misc:Depends},
python,
......
......@@ -4,4 +4,5 @@ usr/share/glib-2.0/schemas/01_enable_a11y.gschema.override
usr/share/glib-2.0/schemas/01_enable_accessibility_theme.gschema.override
etc/X11/Xsession.d/01speech-dispatcher-pulseaudio-cleanup-with-session
etc/X11/Xsession.d/89atk-adaptor
etc/X11/Xsession.d/93mate-panel-workaround
po/mate-accessibility.mo usr/share/locale/fr/LC_MESSAGES/
usr/lib/python2.7/dist-packages/mate-accessibility/orca_install.py
etc/lightdm/lightdm.conf.d/80_orca-dm-wrapper.conf
etc/X11/Xsession.d/91enforceSoundUp
#! /bin/sh
set -e
#DEBHELPER#
python /usr/lib/python2.7/dist-packages/mate-accessibility/orca_install.py $*
......@@ -5,4 +5,8 @@ amixer set Speaker 100%
amixer set Headphone unmute
amixer set Headphone 100%
amixer set Master unmute
amixer set Master 70%
volume=$(amixer sget Master | grep 'Right:')
volume=$(echo $volume |awk -F"[][]" '/%/ { print $2 }' |tr -d "%")
if [ $volume -lt 30 ] ; then
amixer set Master 30%
fi
# This file is sourced by Xsession(5), not executed.
TOPLEVEL_SCHEMA=org.mate.panel.toplevel
TOPLEVEL_PATH=/org/mate/panel/toplevels
# Temporarily resize the panel to refresh the applets and try and work
# around https://github.com/mate-desktop/mate-panel/issues/897.
(for i in 1 2 3; do
# give some time for mate-panel to start up
sleep 10
panel_pid="$(pgrep -u "$USER" -n -x mate-panel)" || continue
export DBUS_SESSION_BUS_ADDRESS="$(grep -z DBUS_SESSION_BUS_ADDRESS= /proc/$panel_pid/environ | cut -d= -f2-)"
for panel in $(gsettings get org.mate.panel toplevel-id-list | tr -d "[',]"); do
size=$(gsettings get ${TOPLEVEL_SCHEMA}:${TOPLEVEL_PATH}/$panel/ size)
gsettings set ${TOPLEVEL_SCHEMA}:${TOPLEVEL_PATH}/$panel/ size $((size + 1))
gsettings set ${TOPLEVEL_SCHEMA}:${TOPLEVEL_PATH}/$panel/ size $size
done
break # it's done, break out of the retry loop
done) &
......@@ -50,7 +50,16 @@ class Accessibility_Installer():
print "got: sys.argv = ", sys.argv
sys.exit(1)
if action == "configure":
self.install(last_configured_version)
if last_configured_version:
try:
func_upgrade = getattr(self, "upgrade")
# mean upgrade function doesn't exist
except:
return
self.last_configured_version = last_configured_version
func_upgrade()
else:
self.install()
elif action == "remove":
self.uninstall()
elif action == "upgrade":
......@@ -70,31 +79,6 @@ class Accessibility_Installer():
logging.error("Error: no version, or bad version found %s", self.version)
sys.exit(1)
def install(self, last_configured_version):
self.last_configured_version = last_configured_version
self.get_version()
version_str = str(self.version).replace(".", "_")
version_str = '_'.join(version_str.split("_")[0:2])
if last_configured_version:
try:
func_upgrade = getattr(self, "upgrade_v%s" % version_str)
except:
return
func_upgrade()
else:
func = getattr(self, "install_v%s" % version_str)
func()
def uninstall(self):
self.get_version()
version_str = str(self.version).replace(".", "_")
version_str = '_'.join(version_str.split("_")[0:2])
func = getattr(self, "uninstall_v%s" % version_str)
try:
func()
except:
pass
def fail_upgrade():
pass
......
......@@ -30,15 +30,6 @@ class Core_Accessibility_Installer(Accessibility_Installer):
self.version = None
self.available_desktop_shortcuts = []
def setup_common_aliases(self):
user = self.get_first_system_user()
if not user:
return
commands_to_execute = [
'cat /etc/skel/.bash_aliases | grep -q -f - /home/%s/.bash_aliases || cp /etc/skel/.bash_aliases /home/%s/.bash_aliases' %(user, user) # TODO change that to per line base. and chmod to user...
]
self.execute_commands(commands_to_execute)
def teardown_common_aliases(self):
user = self.get_first_system_user()
commands_to_execute = [
......@@ -47,72 +38,17 @@ class Core_Accessibility_Installer(Accessibility_Installer):
]
self.execute_commands(commands_to_execute)
def install_v0_1(self):
self.setup_common_aliases()
def uninstall_v0_1(self):
self.teardown_common_aliases()
def install_v0_2(self):
self.setup_common_aliases()
self.setup_desktop()
def uninstall_v0_2(self):
self.teardown_common_aliases()
def install_v0_3(self):
self.install_v0_2()
def uninstall_v0_3(self):
self.uninstall_v0_2()
def install_v0_5(self):
self.install_v0_3()
def uninstall_v0_5(self):
self.uninstall_v0_3()
def install_v0_6(self):
self.install_v0_3()
def uninstall_v0_6(self):
self.uninstall_v0_3()
def install_v0_7(self):
self.setup_desktop()
def uninstall_v0_7(self):
pass
def install_v0_8(self):
self.install_v0_7()
def uninstall_v0_8(self):
def install(self):
pass
def install_v0_9(self):
self.install_v0_7()
def uninstall_v0_9(self):
def uninstall(self):
pass
def install_v1_0(self):
self.install_v0_7()
def uninstall_v1_0(self):
pass
def install_v1_1(self):
pass
def uninstall_v1_1(self):
pass
def upgrade_v1_1(self):
def upgrade(self):
# if the settings are yet installed
if LooseVersion(self.last_configured_version) >= LooseVersion('0.7.0'):
return
self.uninstall_v0_6()
self.teardown_common_aliases()
if __name__ == "__main__":
inst = Core_Accessibility_Installer()
......
......@@ -31,69 +31,15 @@ class Compiz_Installer(Accessibility_Installer):
Accessibility_Installer.__init__(self)
self.pkg_name = "mate-accessibility-compiz"
def install_v0_1(self):
self.enable_compiz_mate_accessibility_profile()
def uninstall_v0_1(self):
self.disable_compiz_mate_accessibility_profile()
def install_v0_2(self):
self.enable_compiz_mate_accessibility_profile()
def uninstall_v0_2(selfh):
self.disable_compiz_mate_accessibility_profile()
def install_v0_3(self):
self.install_v0_2()
def uninstall_v0_3(self):
self.uninstall_v0_2()
def install_v0_5(self):
self.install_v0_3()
def uninstall_v0_5(self):
self.uninstall_v0_3()
def install_v0_6(self):
self.enable_compiz_mate_accessibility_profile()
def uninstall_v0_6(self):
self.disable_compiz_mate_accessibility_profile()
def install_v0_7(self):
self.install_v0_6()
def uninstall_v0_7(self):
self.uninstall_v0_6()
def install_v0_8(self):
self.install_v0_6()
def uninstall_v0_8(self):
self.uninstall_v0_6()
def install_v0_9(self):
self.enable_compiz_mate_profile()
def uninstall_v0_9(self):
self.disable_compiz_profile()
def install_v1_0(self):
def install(self):
self.enable_compiz_mate_profile()
def uninstall_v1_0(self):
def uninstall(self):
self.disable_compiz_profile()
def install_v1_1(self):
self.install_v1_0()
def uninstall_v1_1(self):
self.uninstall_v1_0()
def upgrade_v1_1(self):
def upgrade(self):
if LooseVersion(self.last_configured_version) < LooseVersion('0.9.0'):
self.install_v0_9()
self.install()
# if the settings are yet installed
if LooseVersion(self.last_configured_version) > LooseVersion('0.5.2'):
print "not upgrading compiz configuration, version already too high (>0.5.2)"
......
......@@ -29,59 +29,7 @@ class Mbrola_Installer(Accessibility_Installer):
Accessibility_Installer.__init__(self)
self.pkg_name = "mate-accessibility-mbrola"
def install_v0_2(self):
speechd_conf = "/etc/speech-dispatcher/speechd.conf"
commands_to_execute = [
'sed -i "s/^\#\(AddModule .espeak-mbrola-generic.\)/\\1/" %s' % speechd_conf,
'sed -i "s/^DefaultModule\ espeak$/DefaultModule espeak-mbrola-generic/" %s' % speechd_conf
]
self.execute_commands(commands_to_execute)
def uninstall_v0_2(self):
speechd_conf = "/etc/speech-dispatcher/speechd.conf"
commands_to_execute = [
'sed -i "s/^\(AddModule .espeak-mbrola-generic.\)/#\\1/" %s' % speechd_conf,
'sed -i "s/^DefaultModule\ espeak-mbrola-generic/DefaultModule espeak/" %s' % speechd_conf
]
self.execute_commands(commands_to_execute)
def install_v0_3(self):
self.install_v0_2()
def uninstall_v0_3(self):
self.uninstall_v0_2()
def install_v0_5(self):
self.install_v0_3()
def uninstall_v0_5(self):
self.uninstall_v0_3()
def install_v0_6(self):
self.install_v0_3()
def uninstall_v0_6(self):
self.uninstall_v0_3()
def install_v0_7(self):
self.install_v0_3()
def uninstall_v0_7(self):
self.uninstall_v0_3()
def install_v0_8(self):
self.install_v0_3()
def uninstall_v0_8(self):
self.uninstall_v0_3()
def install_v0_9(self):
self.install_v0_3()
def uninstall_v0_9(self):
self.uninstall_v0_3()
def install_v1_0(self):
def install(self):
speechd_conf = "/etc/speech-dispatcher/speechd.conf"
commands_to_execute = [
'sed -i "s/^\#\(AddModule .espeak-mbrola-generic.\)/\\1/" %s' % speechd_conf,
......@@ -89,7 +37,7 @@ class Mbrola_Installer(Accessibility_Installer):
]
self.execute_commands(commands_to_execute)
def uninstall_v1_0(self):
def uninstall(self):
speechd_conf = "/etc/speech-dispatcher/speechd.conf"
commands_to_execute = [
'sed -i "s/^\(AddModule .espeak-mbrola-generic.\)/#\\1/" %s' % speechd_conf,
......@@ -97,12 +45,6 @@ class Mbrola_Installer(Accessibility_Installer):
]
self.execute_commands(commands_to_execute)
def install_v1_1(self):
self.install_v1_0()
def uninstall_v1_1(self):
self.uninstall_v1_0()
if __name__ == "__main__":
inst = Mbrola_Installer()
inst.launch(sys.argv)
#!/usr/bin/python
# coding: utf-8
# This file is part of mate-accessibility.
#
# mate-accessibility is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# mate-accessibility is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with mate-accessibility. If not, see <http://www.gnu.org/licenses/>.
import sys
import os
import shutil
import logging
from base_install import Accessibility_Installer
class Orca_Installer(Accessibility_Installer):
usage = "usage: %s action\nactions are:\n\tinstall :\t install orca setup\n\tuninstall :\t uninstall orca setup" % sys.argv[0]
def __init__(self):
Accessibility_Installer.__init__(self)
self.pkg_name = "mate-accessibility-orca"
def install_v0_1(self):
self.setup_orca_shortcuts()
def uninstall_v0_1(self):
self.teardown_orca_shortcuts()
def install_v0_2(self):
pass
#self.setup_desktop() # TODO make liste racourcis clavier lecteur ecran
def uninstall_v0_2(self):
pass
#self.teardown_desktop()
def install_v0_3(self):
self.install_v0_2()
def uninstall_v0_3(self):
self.uninstall_v0_2()
def install_v0_5(self):
self.install_v0_3()
def uninstall_v0_5(self):
self.uninstall_v0_3()
def install_v0_6(self):
self.install_v0_3()
def uninstall_v0_6(self):
self.uninstall_v0_3()
def install_v0_7(self):
self.install_v0_3()
def uninstall_v0_7(self):
self.uninstall_v0_3()
def install_v0_8(self):
self.install_v0_3()
def uninstall_v0_8(self):
self.uninstall_v0_3()
def install_v0_9(self):
pass
def uninstall_v0_9(self):
pass
def install_v1_0(self):
pass
def uninstall_v1_0(self):
pass
def install_v1_1(self):
pass
def uninstall_v1_1(self):
pass
if __name__ == "__main__":
inst = Orca_Installer()
inst.launch(sys.argv)
......@@ -30,36 +30,12 @@ class SpeechDFrench_Installer(Accessibility_Installer):
self.pkg_name = "mate-accessibility-spd-french"
self.speechd_conf = "/etc/speech-dispatcher/speechd.conf"
def install_v0_7(self):
def install(self):
self.replace_line_begin_by('# DefaultLanguage', 'DefaultLanguage "fr"')
def uninstall_v0_7(self):
def uninstall(self):
self.replace_line_begin_by('DefaultLanguage', '# DefaultLanguage "en"')
def install_v0_8(self):
self.install_v0_7()
def uninstall_v0_8(self):
self.uninstall_v0_7()
def install_v0_9(self):
self.install_v0_7()
def uninstall_v0_9(self):
self.uninstall_v0_7()
def install_v1_0(self):
self.install_v0_7()
def uninstall_v1_0(self):
self.uninstall_v0_7()
def install_v1_1(self):
self.install_v0_7()
def uninstall_v1_1(self):
self.uninstall_v0_7()
if __name__ == "__main__":
inst = SpeechDFrench_Installer()
inst.launch(sys.argv)