public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gnome:master commit in: app-accessibility/orca/, app-accessibility/orca/files/
@ 2011-04-14 19:43 Gilles Dartiguelongue
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Dartiguelongue @ 2011-04-14 19:43 UTC (permalink / raw
  To: gentoo-commits

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/gnome:master commit in: app-accessibility/orca/, app-accessibility/orca/files/
@ 2011-05-10 21:35 Nirbheek Chauhan
  0 siblings, 0 replies; 2+ messages in thread
From: Nirbheek Chauhan @ 2011-05-10 21:35 UTC (permalink / raw
  To: gentoo-commits

commit:     6702aa9e549c7b727e045dda96cd088702a34b7d
Author:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
AuthorDate: Tue May 10 21:34:59 2011 +0000
Commit:     Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Tue May 10 21:34:59 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=6702aa9e

app-accessibility/orca: fix bug 366529

---
 .../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.1.ebuild           |   28 ++---
 5 files changed, 11 insertions(+), 299 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
deleted file mode 100644
index 72a2e93..0000000
--- a/app-accessibility/orca/files/orca-3.0.0-autostart-kde.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-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
deleted file mode 100644
index 5f650d5..0000000
--- a/app-accessibility/orca/files/orca-3.0.0-braille-window.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-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
deleted file mode 100644
index feeaedc..0000000
--- a/app-accessibility/orca/files/orca-3.0.0-fix-gnomespeech-traceback.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-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
deleted file mode 100644
index 0b47ea4..0000000
--- a/app-accessibility/orca/files/orca-3.0.0-fix-gsettings.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-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.1.ebuild b/app-accessibility/orca/orca-3.0.1.ebuild
index afc8405..aee042c 100644
--- a/app-accessibility/orca/orca-3.0.1.ebuild
+++ b/app-accessibility/orca/orca-3.0.1.ebuild
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-accessibility/orca/orca-2.32.1.ebuild,v 1.1 2010/12/03 23:44:57 pacho Exp $
+# $Header: $
 
 EAPI="3"
 GCONF_DEBUG="no"
@@ -21,25 +21,25 @@ IUSE=""
 # liblouis is not in portage yet
 # it is used to provide contracted braille support
 # XXX: Check deps for correctness
-RDEPEND=">=dev-libs/glib-2.10
-	>=gnome-extra/at-spi-1.32
-	>=gnome-base/orbit-2
+RDEPEND=">=dev-libs/glib-2.10:2
+	>=gnome-extra/at-spi-1.32:1
+	>=gnome-base/orbit-2:2
 	>=dev-python/pyorbit-2.24
 	>=gnome-base/libbonobo-2.24
-	>=dev-python/libbonobo-python-2.24
+	>=dev-python/libbonobo-python-2.24:2
 
-	dev-python/pygobject
+	dev-python/pygobject:2
 	dev-python/pycairo
 	dev-python/pyxdg
 	>=dev-python/dbus-python-0.83
-	>=dev-python/pygtk-2.12
+	>=dev-python/pygtk-2.12:2
 
 	>=dev-python/libwnck-python-2.24
-	>=dev-python/gconf-python-2.24
-	>=dev-python/libgnome-python-2.14
+	>=dev-python/gconf-python-2.24:2
+	>=dev-python/libgnome-python-2.14:2
 
-	>=app-accessibility/gnome-speech-0.3.10
-	>=app-accessibility/gnome-mag-0.12.5"
+	>=app-accessibility/gnome-speech-0.3.10:1
+	>=app-accessibility/gnome-mag-0.12.5:1"
 
 DEPEND="${RDEPEND}
 	>=app-text/gnome-doc-utils-0.17.3
@@ -54,12 +54,6 @@ 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-10 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 21:35 [gentoo-commits] proj/gnome:master commit in: app-accessibility/orca/, app-accessibility/orca/files/ Nirbheek Chauhan
  -- strict thread matches above, loose matches on Subject: below --
2011-04-14 19:43 Gilles Dartiguelongue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox