summaryrefslogtreecommitdiff
path: root/caribou
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-02-11 19:29:26 -0500
committerMatthias Clasen <mclasen@redhat.com>2013-02-13 11:01:33 -0500
commit0eb7a510c16959f246f9645e0894f96915e41e94 (patch)
treeb109112be81065f4bd440d04a837288d12867a60 /caribou
parentb75ff3338651932962baf57076a9261bbe57a7d1 (diff)
downloadcaribou-0eb7a510c16959f246f9645e0894f96915e41e94.tar.gz
Don't check the toolkit-accessibility setting
It is irrelevant for gtk3 and clutter apps. https://bugzilla.gnome.org/show_bug.cgi?id=693616
Diffstat (limited to 'caribou')
-rw-r--r--caribou/daemon/main.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/caribou/daemon/main.py b/caribou/daemon/main.py
index 0d570e8..dded0e5 100644
--- a/caribou/daemon/main.py
+++ b/caribou/daemon/main.py
@@ -12,8 +12,6 @@ debug = False
class CaribouDaemon:
def __init__(self):
- if not self._get_a11y_enabled():
- self._show_no_a11y_dialogs()
try:
self.keyboard_proxy = Gio.DBusProxy.new_for_bus_sync(
Gio.BusType.SESSION,
@@ -40,35 +38,6 @@ class CaribouDaemon:
msgdialog.run()
quit()
- def _show_no_a11y_dialogs(self):
- from gi.repository import Gtk
- msgdialog = Gtk.MessageDialog(None,
- Gtk.DialogFlags.MODAL,
- Gtk.MessageType.QUESTION,
- Gtk.ButtonsType.YES_NO,
- _("In order to use %s, accessibility needs "
- "to be enabled. Do you want to enable "
- "it now?") % APP_NAME)
- resp = msgdialog.run()
- if resp == Gtk.ResponseType.NO:
- msgdialog.destroy()
- quit()
- if resp == Gtk.ResponseType.YES:
- settings = Gio.Settings('org.gnome.desktop.interface')
- atspi = settings.set_boolean("toolkit-accessibility", True)
- msgdialog2 = Gtk.MessageDialog(msgdialog,
- Gtk.DialogFlags.MODAL,
- Gtk.MessageType.INFO,
- Gtk.ButtonsType.OK,
- _("Accessibility has been enabled. "
- "Log out and back in again to use "
- "%s." % APP_NAME))
- msgdialog2.run()
- msgdialog2.destroy()
- msgdialog.destroy()
- quit()
-
-
def _register_event_listeners(self):
pyatspi.Registry.registerEventListener(
self.on_focus, "object:state-changed:focused")
@@ -83,25 +52,6 @@ class CaribouDaemon:
pyatspi.Registry.deregisterEventListener(
self.on_text_caret_moved, "object:text-caret-moved")
- def _get_a11y_enabled(self):
- try:
- try:
- settings = Gio.Settings('org.gnome.desktop.interface')
- atspi = settings.get_boolean("toolkit-accessibility")
- return atspi
- except:
- raise
- from gi.repository import GConf
- gconfc = GConf.Client.get_default()
- atspi1 = gconfc.get_bool(
- "/desktop/gnome/interface/accessibility")
- atspi2 = gconfc.get_bool(
- "/desktop/gnome/interface/accessibility2")
- return atspi1 or atspi2
- except:
- raise
- return False
-
def on_text_caret_moved(self, event):
if self._current_acc == event.source:
text = self._current_acc.queryText()