Remove Classic Preference plugin because of breakages.

This commit is contained in:
Storm Dragon 2024-11-28 05:46:35 -05:00
parent d28e0086d9
commit 03bed6c5d4
13 changed files with 1 additions and 7500 deletions

View File

@ -1,28 +0,0 @@
Cthulhu is a screen reader for individuals who are blind or visually impaired,
forked from Orca. It provides access to applications and toolkits that support
the AT-SPI (e.g., the GNOME desktop).
This screen reader helps users navigate their desktop environment and applications
through speech synthesis and braille output.
After installation, you can start Cthulhu through the GNOME desktop environment
or by running 'cthulhu' from the command line.
DEPENDENCIES:
This package requires the following packages, all available from SlackBuilds.org:
- at-spi2-core
- brltty
- gobject-introspection
- gsettings-desktop-schemas
- gstreamer
- gst-plugins-base
- gst-plugins-good
- gtk3
- liblouis
- libpeas
- libwnck3
- python3-atspi
- python3-cairo
- python3-gobject
- python3-setproctitle
- speech-dispatcher

View File

@ -1,10 +0,0 @@
PRGNAM="cthulhu"
VERSION="0.4"
HOMEPAGE="https://git.stormux.org/storm/cthulhu"
DOWNLOAD="https://git.stormux.org/storm/cthulhu.git"
MD5SUM="SKIP"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="at-spi2-core brltty gobject-introspection gsettings-desktop-schemas gstreamer gst-plugins-base gst-plugins-good gtk3 liblouis libpeas libwnck3 python3-atspi python3-cairo python3-gobject python3-setproctitle speech-dispatcher"
MAINTAINER="Storm Dragon"
EMAIL="storm_dragon@stormux.org"

View File

@ -1,94 +0,0 @@
#!/bin/bash
# Slackware build script for cthulhu
# Created based on PKGBUILD from Storm Dragon <storm_dragon@stormux.org>
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cthulhu
VERSION=${VERSION:-0.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
git clone https://git.stormux.org/storm/cthulhu.git $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Prepare the source
NOCONFIGURE=1 ./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog NEWS README \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

View File

@ -1,9 +0,0 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View File

@ -1,19 +0,0 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
cthulhu: cthulhu (Screen reader for blind or visually impaired users)
cthulhu:
cthulhu: Cthulhu is a screen reader for individuals who are blind or visually
cthulhu: impaired, forked from Orca. It provides a way to access applications
cthulhu: and toolkits that support the AT-SPI (e.g., the GNOME desktop).
cthulhu:
cthulhu: Homepage: https://git.stormux.org/storm/cthulhu
cthulhu:
cthulhu:
cthulhu:
cthulhu:

View File

@ -1,14 +0,0 @@
[Plugin]
Module=ClassicPreferences
Loader=python3
Name=Classic Preferences UI
Description=The classic preferences dialog
Authors=Chrys chrys@linux-a11y.org
Website=
Version=1.0
Copyright=
Builtin=true
Hidden=true
Depends=
Icon=
Help=

View File

@ -1,84 +0,0 @@
from cthulhu import plugin
import gi, time
gi.require_version('Peas', '1.0')
from gi.repository import GObject
from gi.repository import Peas
import importlib, os
import cthulhu_gui_prefs
class ClassicPreferences(GObject.Object, Peas.Activatable, plugin.Plugin):
#__gtype_name__ = 'ClassicPreferences'
object = GObject.Property(type=GObject.Object)
def __init__(self):
plugin.Plugin.__init__(self)
def do_activate(self):
API = self.object
self.connectSignal("setup-inputeventhandlers-completed", self.setupCompatBinding)
#self.setupCompatBinding(API.app)
def setupCompatBinding(self, app):
cmdnames = app.getDynamicApiManager().getAPI('Cmdnames')
inputEventHandlers = app.getDynamicApiManager().getAPI('inputEventHandlers')
inputEventHandlers['preferencesSettingsHandler'] = app.getAPIHelper().createInputEventHandler(self.showPreferencesGUI, cmdnames.SHOW_PREFERENCES_GUI)
inputEventHandlers['appPreferencesSettingsHandler'] = app.getAPIHelper().createInputEventHandler(self.showAppPreferencesGUI, cmdnames.SHOW_APP_PREFERENCES_GUI)
def do_deactivate(self):
API = self.object
inputEventHandlers = API.app.getDynamicApiManager().getAPI('inputEventHandlers')
del inputEventHandlers['preferencesSettingsHandler']
del inputEventHandlers['appPreferencesSettingsHandler']
def do_update_state(self):
API = self.object
def showAppPreferencesGUI(self, script=None, inputEvent=None):
"""Displays the user interface to configure the settings for a
specific applications within Cthulhu and set up those app-specific
user preferences using a GUI.
Returns True to indicate the input event has been consumed.
"""
API = self.object
cthulhu_state = API.app.getDynamicApiManager().getAPI('CthulhuState')
settings = API.app.getDynamicApiManager().getAPI('Settings')
_settingsManager = API.app.getDynamicApiManager().getAPI('SettingsManager').getManager()
_scriptManager = API.app.getDynamicApiManager().getAPI('ScriptManager').getManager()
prefs = {}
for key in settings.userCustomizableSettings:
prefs[key] = _settingsManager.getSetting(key)
script = script or cthulhu_state.activeScript
self._showPreferencesUI(script, prefs)
return True
def showPreferencesGUI(self, script=None, inputEvent=None):
"""Displays the user interface to configure Cthulhu and set up
user preferences using a GUI.
Returns True to indicate the input event has been consumed.
"""
API = self.object
cthulhu_state = API.app.getDynamicApiManager().getAPI('CthulhuState')
settings = API.app.getDynamicApiManager().getAPI('Settings')
_settingsManager = API.app.getDynamicApiManager().getAPI('SettingsManager').getManager()
_scriptManager = API.app.getDynamicApiManager().getAPI('ScriptManager').getManager()
debug = API.app.getDynamicApiManager().getAPI('Debug')
prefs = _settingsManager.getGeneralSettings(_settingsManager.profile)
script = _scriptManager.getDefaultScript()
self._showPreferencesUI(script, prefs)
return True
def _showPreferencesUI(self, script, prefs):
API = self.object
cthulhu_state = API.app.getDynamicApiManager().getAPI('CthulhuState')
debug = API.app.getDynamicApiManager().getAPI('Debug')
cthulhu_platform = API.app.getDynamicApiManager().getAPI('CthulhuPlatform')
if cthulhu_state.cthulhuOS:
cthulhu_state.cthulhuOS.showGUI()
return
uiFile = os.path.join(self.getModuleDir(),
"cthulhu-setup.ui")
cthulhu_state.cthulhuOS = cthulhu_gui_prefs.CthulhuSetupGUI(uiFile, "cthulhuSetupWindow", prefs, API.app)
cthulhu_state.cthulhuOS.init(script)
cthulhu_state.cthulhuOS.setTranslationContext(self.getTranslationContext())
cthulhu_state.cthulhuOS.showGUI()

View File

@ -1,10 +0,0 @@
cthulhu_python_PYTHON = \
__init__.py \
ClassicPreferences.plugin \
ClassicPreferences.py \
cthulhu_gui_prefs.py \
cthulhu_gui_profile.py \
cthulhu-setup.ui
cthulhu_pythondir=$(pkgpythondir)/plugins/ClassicPreferences

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,163 +0,0 @@
# Cthulhu
#
# Copyright 2010 Consorcio Fernando de los Rios.
# Author: Javier Hernandez Antunez <jhernandez@emergya.es>
# Author: Alejandro Leiva <aleiva@emergya.es>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., Franklin Street, Fifth Floor,
# Boston MA 02110-1301 USA.
"""Displays the Save Profile As dialog."""
__id__ = "$Id$"
__version__ = "$Revision$"
__date__ = "$Date$"
__copyright__ = "Copyright (c) 2010 Consorcio Fernando de los Rios."
__license__ = "LGPL"
import locale
import sys
from gi.repository import Gtk
cthulhu_state = None
guilabels = None
OS = None
newProfile = None
app = None
class CthulhuProfileGUI(Gtk.Dialog):
def __init__(self, app):
"""Initialize the Cthulhu profile configuration GUI."""
self.app = app
global guilabels
global cthulhu_state
guilabels = self.app.getDynamicApiManager().getAPI('GuiLabels')
cthulhu_state = self.app.getDynamicApiManager().getAPI('CthulhuState')
Gtk.Dialog.__init__(self)
self.set_title(guilabels.PROFILE_SAVE_AS_TITLE)
self.set_has_resize_grip(False)
self.add_button('gtk-cancel', Gtk.ResponseType.CANCEL)
self.add_button('gtk-save', Gtk.ResponseType.ACCEPT)
grid = Gtk.Grid()
grid.set_property('margin', 12)
grid.set_row_spacing(10)
grid.set_column_spacing(10)
# Right now the content area is a GtkBox. We'll need to update
# this once GtkBox is fully deprecated.
contentArea = self.get_content_area()
contentArea.pack_start(grid, True, True, 0)
self.profileEntry = Gtk.Entry()
self.profileEntry.set_property('hexpand', True)
self.profileEntry.set_activates_default(True)
grid.attach(self.profileEntry, 1, 0, 1, 1)
label = Gtk.Label(guilabels.PROFILE_NAME_LABEL)
label.set_use_underline(True)
label.set_mnemonic_widget(self.profileEntry)
grid.attach(label, 0, 0, 1, 1)
defaultButton = self.get_widget_for_response(Gtk.ResponseType.ACCEPT)
defaultButton.set_property('can-default', True)
defaultButton.set_property('has-default', True)
self.connect('response', self.onResponse)
self.connect('destroy', self.onDestroy)
self.searchString = None
self.profileString = None
self.prefsDialog = None
self.translationContext = None
def init(self):
self.profileString = ''
def showGUI(self, prefsDialog):
"""Show the Save Profile As dialog."""
self.show_all()
self.prefsDialog = prefsDialog
self.profileEntry.set_text(self.profileString)
ts = 0
try:
ts = cthulhu_state.lastInputEvent.timestamp
except:
pass
if ts == 0:
ts = Gtk.get_current_event_time()
self.present_with_time(ts)
def onResponse(self, widget, response):
"""Signal handler for the responses emitted by the dialog."""
if response in [Gtk.ResponseType.CANCEL, Gtk.ResponseType.DELETE_EVENT]:
self.hide()
return
if response == Gtk.ResponseType.ACCEPT:
global newProfile
newProfile = self.profileEntry.get_text()
if newProfile:
self.destroy()
if self.prefsDialog:
self.prefsDialog.saveProfile(newProfile)
def onDestroy(self, widget):
"""Signal handler for the 'destroy' signal of the dialog."""
global OS
OS = None
def setTranslationContext(newTranslationContext):
global _, translationContext
translationContext = newTranslationContext
_ = newTranslationContext.gettext
def setApp(newApp):
global app
app = newApp
def showProfileUI(prefsDialog=None):
global OS
global newProfile
newProfile = None
if not OS:
OS = CthulhuProfileGUI(app)
OS.init()
OS.showGUI(prefsDialog)
def main():
locale.setlocale(locale.LC_ALL, '')
showProfileUI()
Gtk.main()
sys.exit(0)
if __name__ == "__main__":
main()

View File

@ -1,4 +1,4 @@
SUBDIRS = Clipboard HelloWorld SelfVoice Time MouseReview Date ByeCthulhu HelloCthulhu PluginManager CapsLockHack ClassicPreferences SimplePluginSystem SUBDIRS = Clipboard HelloWorld SelfVoice Time MouseReview Date ByeCthulhu HelloCthulhu PluginManager CapsLockHack SimplePluginSystem
cthulhu_pythondir=$(pkgpythondir)/plugins cthulhu_pythondir=$(pkgpythondir)/plugins