public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Gilles Dartiguelongue" <eva@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gnome:master commit in: app-accessibility/orca/, app-accessibility/orca/files/
Date: Thu, 14 Apr 2011 19:43:38 +0000 (UTC)	[thread overview]
Message-ID: <73ef83971a6452cd26015a1999e0a1d10455730a.eva@gentoo> (raw)

commit:     73ef83971a6452cd26015a1999e0a1d10455730a
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 14 19:38:22 2011 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Thu Apr 14 19:43:30 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=73ef8397

app-accessibility/orca: import upstream patches

The release does not work out of the box. Apply upstream patches.

---
 .../orca/files/orca-3.0.0-autostart-kde.patch      |   21 +++
 .../orca/files/orca-3.0.0-braille-window.patch     |   78 +++++++++++
 .../orca-3.0.0-fix-gnomespeech-traceback.patch     |   39 ++++++
 .../orca/files/orca-3.0.0-fix-gsettings.patch      |  144 ++++++++++++++++++++
 app-accessibility/orca/orca-3.0.0.ebuild           |    7 +
 5 files changed, 289 insertions(+), 0 deletions(-)

diff --git a/app-accessibility/orca/files/orca-3.0.0-autostart-kde.patch b/app-accessibility/orca/files/orca-3.0.0-autostart-kde.patch
new file mode 100644
index 0000000..72a2e93
--- /dev/null
+++ b/app-accessibility/orca/files/orca-3.0.0-autostart-kde.patch
@@ -0,0 +1,21 @@
+From f1d122442a30178d20ca2968c42e6cb24b3999fc Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Thu, 7 Apr 2011 19:03:51 -0400
+Subject: [PATCH 4/6] Fix for bug #647117 - orca autostarted in kde
+
+---
+ orca-autostart.desktop.in |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/orca-autostart.desktop.in b/orca-autostart.desktop.in
+index 98bdd48..7887e75 100644
+--- a/orca-autostart.desktop.in
++++ b/orca-autostart.desktop.in
+@@ -6,3 +6,4 @@ NoDisplay=true
+ AutostartCondition=GSettings org.gnome.desktop.a11y.applications screen-reader-enabled
+ X-GNOME-AutoRestart=true
+ #X-GNOME-Autostart-Phase=Initialization
++OnlyShowIn=GNOME;
+-- 
+1.7.4.1
+

diff --git a/app-accessibility/orca/files/orca-3.0.0-braille-window.patch b/app-accessibility/orca/files/orca-3.0.0-braille-window.patch
new file mode 100644
index 0000000..5f650d5
--- /dev/null
+++ b/app-accessibility/orca/files/orca-3.0.0-braille-window.patch
@@ -0,0 +1,78 @@
+From 3522603a5a9d953fbdd91bc75316afad1f13db74 Mon Sep 17 00:00:00 2001
+From: Joanmarie Diggs <joanmarie.diggs@gmail.com>
+Date: Tue, 12 Apr 2011 07:03:48 -0400
+Subject: [PATCH 6/6] Fix for bug #647547 - The braille monitor should be movable
+
+---
+ src/orca/brlmon.py |   47 ++++-------------------------------------------
+ 1 files changed, 4 insertions(+), 43 deletions(-)
+
+diff --git a/src/orca/brlmon.py b/src/orca/brlmon.py
+index 998084f..d10aeb3 100644
+--- a/src/orca/brlmon.py
++++ b/src/orca/brlmon.py
+@@ -73,7 +73,7 @@ class BrlMon(gtk.Window):
+ 
+         gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
+         self.set_title("Braille Monitor")
+-        self.set_default_size(cellWidth * numCells, cellHeight)
++        self.set_size_request(cellWidth * numCells, cellHeight)
+         hbox = gtk.HBox(True)
+         self.add(hbox)
+         self.cellFrames = []
+@@ -90,49 +90,10 @@ class BrlMon(gtk.Window):
+             self.cellLabels.append(label)
+             i += 1
+ 
+-        # This prevents it from getting focus.
+-        #
+         self.set_property("accept-focus", False)
+-        self.connect_after("check-resize", self.onResize)
+-
+-    def onResize(self, obj):
+-        """Tell the window to be a dock and set its struts, which I
+-        thinks means to attempt to glue it somewhere on the display.
+-        """
+-
+-        # We know what we are doing here, so tell pylint not to flag
+-        # the self.window method calls as errors (e.g., Class 'window' 
+-        # has no 'get_size' member).  The disable-msg is localized to
+-        # just this method.
+-        #
+-        # pylint: disable-msg=E1101
+-
+-        screen_width = gtk.gdk.screen_width()
+-        [window_width, window_height] = self.window.get_size()
+-        if window_width < screen_width:
+-            x = (screen_width - window_width) / 2
+-        else:
+-            x = 0
+-
+-        self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK)
+-        self.window.property_change(
+-                gtk.gdk.atom_intern("_NET_WM_STRUT_PARTIAL", False),
+-                gtk.gdk.atom_intern("CARDINAL", False), 32,
+-                gtk.gdk.PROP_MODE_REPLACE,
+-                [0,                     # LEFT
+-                 0,                     # RIGHT
+-                 window_height,         # TOP
+-                 0,                     # BOTTOM
+-                 0,                     # LEFT_START
+-                 0,                     # LEFT_END
+-                 0,                     # RIGHT_START
+-                 0,                     # RIGHT_END
+-                 0,                     # TOP_START
+-                 screen_width - 1,      # TOP_END
+-                 0,                     # BOTTOM_START
+-                 0])                    # BOTTOM_END
+-
+-        self.move(x, 0)
++        self.set_resizable(False)
++        self.set_skip_taskbar_hint(True)
++        self.set_skip_pager_hint(True)
+ 
+     def writeText(self, cursorCell, string, mask=None):
+         """Display the given text and highlight the given
+-- 
+1.7.4.1
+

diff --git a/app-accessibility/orca/files/orca-3.0.0-fix-gnomespeech-traceback.patch b/app-accessibility/orca/files/orca-3.0.0-fix-gnomespeech-traceback.patch
new file mode 100644
index 0000000..feeaedc
--- /dev/null
+++ b/app-accessibility/orca/files/orca-3.0.0-fix-gnomespeech-traceback.patch
@@ -0,0 +1,39 @@
+From 83362b4facb7848a1cc3ac1bcba7f269ba660855 Mon Sep 17 00:00:00 2001
+From: Joanmarie Diggs <joanmarie.diggs@gmail.com>
+Date: Fri, 1 Apr 2011 21:06:05 +0000
+Subject: [PATCH 2/6] Fix for bug #646475 - Traceback seen with gnome-speech
+
+---
+ src/orca/gnomespeechfactory.py |    2 +-
+ src/orca/speech.py             |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/orca/gnomespeechfactory.py b/src/orca/gnomespeechfactory.py
+index 800809a..572cccb 100644
+--- a/src/orca/gnomespeechfactory.py
++++ b/src/orca/gnomespeechfactory.py
+@@ -443,7 +443,7 @@ class SpeechServer(speechserver.SpeechServer):
+     def __getSpeaker(self, acss=None):
+ 
+         voices = settings.voices
+-        defaultACSS = voices[settings.DEFAULT_VOICE]
++        defaultACSS = ACSS(voices[settings.DEFAULT_VOICE])
+ 
+         if not acss:
+             acss = defaultACSS
+diff --git a/src/orca/speech.py b/src/orca/speech.py
+index 56de03d..eccea41 100644
+--- a/src/orca/speech.py
++++ b/src/orca/speech.py
+@@ -147,7 +147,7 @@ def __resolveACSS(acss=None):
+         return acss
+     else:
+         voices = settings.voices
+-        return voices[settings.DEFAULT_VOICE]
++        return ACSS(voices[settings.DEFAULT_VOICE])
+ 
+ def sayAll(utteranceIterator, progressCallback):
+     if settings.silenceSpeech:
+-- 
+1.7.4.1
+

diff --git a/app-accessibility/orca/files/orca-3.0.0-fix-gsettings.patch b/app-accessibility/orca/files/orca-3.0.0-fix-gsettings.patch
new file mode 100644
index 0000000..0b47ea4
--- /dev/null
+++ b/app-accessibility/orca/files/orca-3.0.0-fix-gsettings.patch
@@ -0,0 +1,144 @@
+From dfe3dbc698a963fb4164da958a069b8e495d0b37 Mon Sep 17 00:00:00 2001
+From: Joanmarie Diggs <joanmarie.diggs@gmail.com>
+Date: Mon, 4 Apr 2011 13:51:15 -0400
+Subject: [PATCH 3/6] Fix for bug #646288 - Orca needs to set and respond to the appropriate gsettings keys
+
+---
+ src/orca/orca.in             |    3 ++-
+ src/orca/orca.py             |   27 +++++++++++++++++++++++++--
+ src/orca/orca_quit.py        |    2 +-
+ src/orca/settings_manager.py |   23 ++++++-----------------
+ 4 files changed, 34 insertions(+), 21 deletions(-)
+
+diff --git a/src/orca/orca.in b/src/orca/orca.in
+index 527141c..2187cef 100644
+--- a/src/orca/orca.in
++++ b/src/orca/orca.in
+@@ -133,7 +133,8 @@ runOrca()
+ if [ "x$LOGNAME" != "xgdm" ] ; then
+     ACCESSIBILITY_ENABLED=`gsettings \
+         get org.gnome.desktop.interface toolkit-accessibility`
+-    if [ "x$ACCESSIBILITY_ENABLED" != "xtrue" ] ; then
++    if [[ "x$ACCESSIBILITY_ENABLED" != "xtrue" && \
++          `echo $ARGS | grep -c "no-setup"` -eq 0 ]]; then
+         # Because we will be running Orca in text-setup mode, we want to
+         # make sure it is run in a terminal window.  If we're already in
+         # a terminal, this is great.  If not, we spawn a gnome-terminal
+diff --git a/src/orca/orca.py b/src/orca/orca.py
+index b208357..636d55d 100644
+--- a/src/orca/orca.py
++++ b/src/orca/orca.py
+@@ -35,6 +35,26 @@ import time
+ import unicodedata
+ import shutil
+ 
++# This must happen BEFORE we import gtk (until we start using
++# introspection).
++from gi.repository.Gio import Settings
++a11yAppSettings = Settings('org.gnome.desktop.a11y.applications')
++
++def getOrcaEnabled(gsetting, key):
++    return gsetting.get_boolean(key)
++
++def setOrcaEnabled(gsetting, key, enabled):
++    gsetting = gsetting or a11yAppSettings
++    gsetting.set_boolean(key, enabled)
++
++def onEnabledChanged(gsetting, key):
++    if not key == 'screen-reader-enabled':
++        return
++
++    enabled = getOrcaEnabled(gsetting, key)
++    if not enabled:
++        shutdown()
++
+ # We're going to force the name of the app to "orca" so pygtk
+ # will end up showing us as "orca" to the AT-SPI.  If we don't
+ # do this, the name can end up being "-c".  See bug 364452 at
+@@ -1897,7 +1917,7 @@ def quitOrca(script=None, inputEvent=None):
+     """
+ 
+     if settings.quitOrcaNoConfirmation:
+-        shutdown()
++        setOrcaEnabled(a11yAppSettings, 'screen-reader-enabled', False)
+     else:
+         try:
+             module = __import__(settings.quitModule,
+@@ -1963,7 +1983,8 @@ def init(registry):
+     global _initialized
+     global _keyBindings
+ 
+-    if _initialized:
++    if _initialized \
++       and getOrcaEnabled(a11yAppSettings, 'screen-reader-enabled'):
+         return False
+ 
+     # Do not hang on initialization if we can help it.
+@@ -2007,6 +2028,8 @@ def init(registry):
+         signal.alarm(0)
+ 
+     _initialized = True
++    setOrcaEnabled(a11yAppSettings, 'screen-reader-enabled', True)
++    a11yAppSettings.connect('changed', onEnabledChanged)
+     return True
+ 
+ def start(registry):
+diff --git a/src/orca/orca_quit.py b/src/orca/orca_quit.py
+index b58cccc..d5ec6b1 100644
+--- a/src/orca/orca_quit.py
++++ b/src/orca/orca_quit.py
+@@ -91,7 +91,7 @@ class OrcaQuitGUI(orca_gtkbuilder.GtkBuilderWrapper):
+         - widget: the component that generated the signal.
+         """
+ 
+-        orca.shutdown()
++        orca.setOrcaEnabled(None, 'screen-reader-enabled', False)
+ 
+     def quitDialogDestroyed(self, widget):
+         """Signal handler for the "destroyed" signal for the quitDialog
+diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
+index c9576b7..0a9ad46 100644
+--- a/src/orca/settings_manager.py
++++ b/src/orca/settings_manager.py
+@@ -36,11 +36,9 @@ import debug
+ from keybindings import KeyBinding
+ import settings
+ 
+-try:
+-    import gconf
+-    gconfClient = gconf.client_get_default()
+-except:
+-    gconfClient = None
++from gi.repository.Gio import Settings
++a11yAppSettings = Settings('org.gnome.desktop.interface')  
++
+ 
+ class SettingsManager(object):
+     """Settings backend manager. This class manages orca user's settings
+@@ -302,20 +300,11 @@ class SettingsManager(object):
+         return not alreadyEnabled
+ 
+     def isAccessibilityEnabled(self):
+-        try:
+-            return gconfClient.get_bool(
+-                "/desktop/gnome/interface/accessibility") \
+-                or gconfClient.get_bool(
+-                    "/desktop/gnome/interface/accessibility2")
+-        except:
+-            return False
++        return a11yAppSettings.get_boolean("toolkit-accessibility")
+ 
+     def setAccessibility(self, enable):
+-        try:
+-            return gconfClient.set_bool(
+-                "/desktop/gnome/interface/accessibility", enable)
+-        except:
+-            return False
++        return a11yAppSettings.set_boolean(
++            "toolkit-accessibility", enable)
+ 
+     def setStartingProfile(self, profile=None):
+         if profile is None:
+-- 
+1.7.4.1
+

diff --git a/app-accessibility/orca/orca-3.0.0.ebuild b/app-accessibility/orca/orca-3.0.0.ebuild
index ca9b537..afc8405 100644
--- a/app-accessibility/orca/orca-3.0.0.ebuild
+++ b/app-accessibility/orca/orca-3.0.0.ebuild
@@ -6,6 +6,7 @@ EAPI="3"
 GCONF_DEBUG="no"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="2:2.6"
+# FIXME: multiple python support
 
 inherit gnome2 python
 
@@ -53,6 +54,12 @@ pkg_setup() {
 src_prepare() {
 	gnome2_src_prepare
 
+	# Apply patches from origin/gnome-3-0 fixing important bugs
+	epatch "${FILESDIR}/${P}-fix-gnomespeech-traceback.patch" \
+		"${FILESDIR}/${P}-fix-gsettings.patch" \
+		"${FILESDIR}/${P}-autostart-kde.patch" \
+		"${FILESDIR}/${P}-braille-window.patch"
+
 	# disable pyc compiling
 	mv py-compile py-compile.orig
 	ln -s $(type -P true) py-compile



             reply	other threads:[~2011-04-14 19:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14 19:43 Gilles Dartiguelongue [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-05-10 21:35 [gentoo-commits] proj/gnome:master commit in: app-accessibility/orca/, app-accessibility/orca/files/ Nirbheek Chauhan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73ef83971a6452cd26015a1999e0a1d10455730a.eva@gentoo \
    --to=eva@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox