Commit b9bb2f48 authored by Joanmarie Diggs's avatar Joanmarie Diggs Committed by Javier Hernández
parent 0ebfd8ae
...@@ -6,12 +6,12 @@ AM_MAINTAINER_MODE([enable]) ...@@ -6,12 +6,12 @@ AM_MAINTAINER_MODE([enable])
YELP_HELP_INIT YELP_HELP_INIT
dnl == check for python == dnl == check for python ==
AM_PATH_PYTHON(2.7) AM_PATH_PYTHON(3.2)
dnl == requeriments == dnl == requeriments ==
GTK_REQUIRED=3.1.13 GTK_REQUIRED=3.1.13
PYGOBJECT_REQUIRED=2.90.3 PYGOBJECT_REQUIRED=2.90.3
ATSPI_REQUIRED=2.1.5 ATSPI_REQUIRED=2.5.2
GLIB_GSETTINGS GLIB_GSETTINGS
dnl == check for requeriments == dnl == check for requeriments ==
......
...@@ -141,7 +141,7 @@ class Level2SequenceFactory(SequenceFactory): ...@@ -141,7 +141,7 @@ class Level2SequenceFactory(SequenceFactory):
self._prependContext() self._prependContext()
if event.modifiers in (0, Gdk.ModifierType.SHIFT_MASK) and \ if event.modifiers in (0, Gdk.ModifierType.SHIFT_MASK) and \
Gdk.keyval_to_unicode(event.id): Gdk.keyval_to_unicode(event.id):
self.typed_text += unichr(Gdk.keyval_to_unicode(event.id)) self.typed_text += chr(Gdk.keyval_to_unicode(event.id))
else: else:
if self.frame_name: if self.frame_name:
if isinstance(event, pyatspi.deviceevent.DeviceEvent): if isinstance(event, pyatspi.deviceevent.DeviceEvent):
...@@ -270,7 +270,7 @@ class DogtailFactory(ScriptFactory): ...@@ -270,7 +270,7 @@ class DogtailFactory(ScriptFactory):
return return
if event.modifiers in (0, Gdk.ModifierType.SHIFT_MASK) and \ if event.modifiers in (0, Gdk.ModifierType.SHIFT_MASK) and \
Gdk.keyval_to_unicode(event.id): Gdk.keyval_to_unicode(event.id):
self.typed_text += unichr(Gdk.keyval_to_unicode(event.id)) self.typed_text += chr(Gdk.keyval_to_unicode(event.id))
else: else:
if self.app_name: if self.app_name:
self.commands_queue.put_nowait('focus.application("%s")\n' % \ self.commands_queue.put_nowait('focus.application("%s")\n' % \
...@@ -323,7 +323,7 @@ class LDTPFactory(DogtailFactory): ...@@ -323,7 +323,7 @@ class LDTPFactory(DogtailFactory):
return return
if event.modifiers in (0, Gdk.ModifierType.SHIFT_MASK) and \ if event.modifiers in (0, Gdk.ModifierType.SHIFT_MASK) and \
Gdk.keyval_to_unicode(event.id): Gdk.keyval_to_unicode(event.id):
self.typed_text += unichr(Gdk.keyval_to_unicode(event.id)) self.typed_text += chr(Gdk.keyval_to_unicode(event.id))
else: else:
if self.frame_name: if self.frame_name:
self.commands_queue.put_nowait('waittillguiexist("%s")\n' % \ self.commands_queue.put_nowait('waittillguiexist("%s")\n' % \
......
...@@ -55,7 +55,7 @@ class OneFocus(Validator): ...@@ -55,7 +55,7 @@ class OneFocus(Validator):
def before(self, acc, state, view): def before(self, acc, state, view):
s = acc.getState() s = acc.getState()
if s.contains(STATE_FOCUSED): if s.contains(STATE_FOCUSED):
if not state.has_key('focus'): if 'focus' not in state:
state['focus'] = acc state['focus'] = acc
else: else:
view.error(_('more than one focused widget'), acc, self.URL) view.error(_('more than one focused widget'), acc, self.URL)
...@@ -133,7 +133,7 @@ class ReciprocalRelations(Validator): ...@@ -133,7 +133,7 @@ class ReciprocalRelations(Validator):
rec = rel.getRelationType() rec = rel.getRelationType()
if kind != rec: if kind != rec:
continue continue
for i in xrange(rel.getNTargets()): for i in range(rel.getNTargets()):
if rel.getTarget(i) == acc: if rel.getTarget(i) == acc:
return True return True
return False return False
...@@ -142,7 +142,7 @@ class ReciprocalRelations(Validator): ...@@ -142,7 +142,7 @@ class ReciprocalRelations(Validator):
s = acc.getRelationSet() s = acc.getRelationSet()
for rel in s: for rel in s:
kind = rel.getRelationType() kind = rel.getRelationType()
for i in xrange(rel.getNTargets()): for i in range(rel.getNTargets()):
target = rel.getTarget(i) target = rel.getTarget(i)
ts = target.getRelationSet() ts = target.getRelationSet()
rec = self._getReciprocal(kind) rec = self._getReciprocal(kind)
...@@ -189,7 +189,7 @@ class HasLabelName(Validator): ...@@ -189,7 +189,7 @@ class HasLabelName(Validator):
for rel in acc.getRelationSet(): for rel in acc.getRelationSet():
if rel.getRelationType() != RELATION_LABELLED_BY: if rel.getRelationType() != RELATION_LABELLED_BY:
continue continue
for i in xrange(rel.getNTargets()): for i in range(rel.getNTargets()):
target = rel.getTarget(i) target = rel.getTarget(i)
if self._checkForReadable(target): if self._checkForReadable(target):
return return
...@@ -260,7 +260,7 @@ class RadioInSet(Validator): ...@@ -260,7 +260,7 @@ class RadioInSet(Validator):
def before(self, acc, state, view): def before(self, acc, state, view):
attrs = acc.getAttributes() attrs = acc.getAttributes()
m = dict([attr.split(':', 1) for attr in attrs]) m = dict([attr.split(':', 1) for attr in attrs])
if m.has_key('posinset'): if 'posinset' in m:
return return
rels = acc.getRelationSet() rels = acc.getRelationSet()
for rel in rels: for rel in rels:
...@@ -293,7 +293,7 @@ class TableRowColIndex(Validator): ...@@ -293,7 +293,7 @@ class TableRowColIndex(Validator):
def before(self, acc, state, view): def before(self, acc, state, view):
t = acc.queryTable() t = acc.queryTable()
samples = max(t.nRows * t.nColumns, self.MAX_SAMPLES) samples = max(t.nRows * t.nColumns, self.MAX_SAMPLES)
for i in xrange(samples): for i in range(samples):
r, c = _randomRowCol(t) r, c = _randomRowCol(t)
i = t.getIndexAt(r, c) i = t.getIndexAt(r, c)
ir = t.getRowAtIndex(i) ir = t.getRowAtIndex(i)
...@@ -324,7 +324,7 @@ class TableRowColParentIndex(Validator): ...@@ -324,7 +324,7 @@ class TableRowColParentIndex(Validator):
def before(self, acc, state, view): def before(self, acc, state, view):
t = acc.queryTable() t = acc.queryTable()
samples = max(t.nRows * t.nColumns, self.MAX_SAMPLES) samples = max(t.nRows * t.nColumns, self.MAX_SAMPLES)
for i in xrange(samples): for i in range(samples):
r, c = _randomRowCol(t) r, c = _randomRowCol(t)
child = t.getAccessibleAt(r, c) child = t.getAccessibleAt(r, c)
ip = child.getIndexInParent() ip = child.getIndexInParent()
......
...@@ -117,8 +117,8 @@ class EventMonitor(ViewportPlugin): ...@@ -117,8 +117,8 @@ class EventMonitor(ViewportPlugin):
Populate the model for the event types tree view. Uses a constant Populate the model for the event types tree view. Uses a constant
from pyatspi for the listing of all event types. from pyatspi for the listing of all event types.
''' '''
events = pyatspi.EVENT_TREE.keys() events = list(pyatspi.EVENT_TREE.keys())
for sub_events in pyatspi.EVENT_TREE.itervalues(): for sub_events in pyatspi.EVENT_TREE.values():
events.extend(sub_events) events.extend(sub_events)
events = list(set([event.strip(':') for event in events])) events = list(set([event.strip(':') for event in events]))
events.sort() events.sort()
......
...@@ -233,12 +233,12 @@ class _InterfaceSection(object): ...@@ -233,12 +233,12 @@ class _InterfaceSection(object):
label = expander.get_label_widget() label = expander.get_label_widget()
label_text = label.get_label() label_text = label.get_label()
if isinstance(label_text, unicode): if isinstance(label_text, str):
label_text = label_text.decode('UTF-8') label_text = label_text.decode('UTF-8')
not_implemented_str = _('(not implemented)') not_implemented_str = _('(not implemented)')
if isinstance(not_implemented_str, unicode): if isinstance(not_implemented_str, str):
not_implemented_str = not_implemented_str.encode('UTF-8') not_implemented_str = not_implemented_str.encode('UTF-8')
if sensitive: if sensitive:
...@@ -351,7 +351,7 @@ class _SectionAccessible(_InterfaceSection): ...@@ -351,7 +351,7 @@ class _SectionAccessible(_InterfaceSection):
states = [pyatspi.stateToString(s) for s in acc.getState().getStates()] states = [pyatspi.stateToString(s) for s in acc.getState().getStates()]
states.sort() states.sort()
map(self.states_model.append, [[state] for state in states]) list(map(self.states_model.append, [[state] for state in states]))
try: try:
attribs = acc.getAttributes() attribs = acc.getAttributes()
...@@ -436,7 +436,7 @@ class _SectionAccessible(_InterfaceSection): ...@@ -436,7 +436,7 @@ class _SectionAccessible(_InterfaceSection):
# Maybe we got a defunct state, in which case the object is diseased. # Maybe we got a defunct state, in which case the object is diseased.
states = [] states = []
states.sort() states.sort()
map(self.states_model.append, [[state] for state in states]) list(map(self.states_model.append, [[state] for state in states]))
class _SectionAction(_InterfaceSection): class _SectionAction(_InterfaceSection):
...@@ -604,7 +604,7 @@ class _SectionComponent(_InterfaceSection): ...@@ -604,7 +604,7 @@ class _SectionComponent(_InterfaceSection):
bbox = ci.getExtents(pyatspi.WINDOW_COORDS) bbox = ci.getExtents(pyatspi.WINDOW_COORDS)
self.label_posrel.set_text('%d, %d' % (bbox.x, bbox.y)) self.label_posrel.set_text('%d, %d' % (bbox.x, bbox.y))
layer = ci.getLayer() layer = ci.getLayer()
self.label_layer.set_text(repr(ci.getLayer()).replace('LAYER_','')) self.label_layer.set_text(repr(ci.getLayer()).replace('LAYER_', ''))
self.label_zorder.set_text(repr(ci.getMDIZOrder())) self.label_zorder.set_text(repr(ci.getMDIZOrder()))
self.label_alpha.set_text(repr(ci.getAlpha())) self.label_alpha.set_text(repr(ci.getAlpha()))
self.registerEventListener(self._accEventComponent, self.registerEventListener(self._accEventComponent,
...@@ -782,14 +782,14 @@ class _SectionHypertext(_InterfaceSection): ...@@ -782,14 +782,14 @@ class _SectionHypertext(_InterfaceSection):
''' '''
hti = acc.queryHypertext() hti = acc.queryHypertext()
for link_index in xrange(hti.getNLinks()): for link_index in range(hti.getNLinks()):
link = hti.getLink(link_index) link = hti.getLink(link_index)
iter = self.links_model.append(None, iter = self.links_model.append(None,
[link_index, [link_index,
'', '', '', '', '', '',
link.startIndex, link.startIndex,
link.endIndex, None]) link.endIndex, None])
for anchor_index in xrange(link.nAnchors): for anchor_index in range(link.nAnchors):
acc_obj = link.getObject(anchor_index) acc_obj = link.getObject(anchor_index)
self.links_model.append(iter, self.links_model.append(iter,
[link_index, acc_obj.name, acc_obj.description, [link_index, acc_obj.name, acc_obj.description,
...@@ -933,7 +933,7 @@ class _SectionSelection(_InterfaceSection): ...@@ -933,7 +933,7 @@ class _SectionSelection(_InterfaceSection):
if child is not None: if child is not None:
state = child.getState() state = child.getState()
if state.contains(pyatspi.STATE_SELECTABLE): if state.contains(pyatspi.STATE_SELECTABLE):
self.sel_model.append([getIcon(child),child.name, child]) self.sel_model.append([getIcon(child), child.name, child])
state = acc.getState() state = acc.getState()
multiple_selections = state.contains(pyatspi.STATE_MULTISELECTABLE) multiple_selections = state.contains(pyatspi.STATE_MULTISELECTABLE)
...@@ -1266,7 +1266,7 @@ class _SectionText(_InterfaceSection): ...@@ -1266,7 +1266,7 @@ class _SectionText(_InterfaceSection):
expander_label = self.expander.get_label_widget() expander_label = self.expander.get_label_widget()
label_text = expander_label.get_label() label_text = expander_label.get_label()
label_text = label_text.replace(_('<i>(Editable)</i>'),'') label_text = label_text.replace(_('<i>(Editable)</i>'), '')
label_text = label_text.strip(' ') label_text = label_text.strip(' ')
if eti and acc.getState().contains(pyatspi.STATE_EDITABLE): if eti and acc.getState().contains(pyatspi.STATE_EDITABLE):
label_text += ' ' + _('<i>(Editable)</i>') label_text += ' ' + _('<i>(Editable)</i>')
...@@ -1394,7 +1394,7 @@ class _SectionText(_InterfaceSection): ...@@ -1394,7 +1394,7 @@ class _SectionText(_InterfaceSection):
else: else:
attr_dict = self._attrStringToDict(attr) attr_dict = self._attrStringToDict(attr)
attr_list = attr_dict.keys() attr_list = list(attr_dict.keys())
attr_list.sort() attr_list.sort()
self.attr_model.clear() self.attr_model.clear()
......
#!/usr/bin/python #!/usr/bin/python3
''' '''
Provides IPython console widget. Provides IPython console widget.
...@@ -23,7 +23,8 @@ import re ...@@ -23,7 +23,8 @@ import re
import sys import sys
import os import os
from StringIO import StringIO from io import StringIO
from functools import reduce
try: try:
import IPython import IPython
...@@ -124,7 +125,7 @@ class IterableIPShell: ...@@ -124,7 +125,7 @@ class IterableIPShell:
''' '''
Update self.IP namespace for autocompletion with sys.modules Update self.IP namespace for autocompletion with sys.modules
''' '''
for k,v in sys.modules.items(): for k, v in list(sys.modules.items()):
if not '.' in k: if not '.' in k:
self.IP.user_ns.update({k:v}) self.IP.user_ns.update({k:v})
...@@ -265,7 +266,7 @@ class IterableIPShell: ...@@ -265,7 +266,7 @@ class IterableIPShell:
possibilities = self.IP.complete(split_line[-1]) possibilities = self.IP.complete(split_line[-1])
else: else:
completed = line completed = line
possibilities = ['',[]] possibilities = ['', []]
if possibilities: if possibilities:
def _commonPrefix(str1, str2): def _commonPrefix(str1, str2):
''' '''
...@@ -307,11 +308,11 @@ class IterableIPShell: ...@@ -307,11 +308,11 @@ class IterableIPShell:
@type header: string @type header: string
''' '''
stat = 0 stat = 0
if verbose or debug: print header+cmd if verbose or debug: print(header+cmd)
# flush stdout so we don't mangle python's buffering # flush stdout so we don't mangle python's buffering
if not debug: if not debug:
input, output = os.popen4(cmd) input, output = os.popen4(cmd)
print output.read() print(output.read())
output.close() output.close()
input.close() input.close()
...@@ -458,7 +459,7 @@ class ConsoleView(gtk.TextView): ...@@ -458,7 +459,7 @@ class ConsoleView(gtk.TextView):
if text: if text:
self._write('\n') self._write('\n')
self._showPrompt(self.prompt) self._showPrompt(self.prompt)
self.text_buffer.move_mark(self.line_start,self.text_buffer.get_end_iter()) self.text_buffer.move_mark(self.line_start, self.text_buffer.get_end_iter())
self.text_buffer.place_cursor(self.text_buffer.get_end_iter()) self.text_buffer.place_cursor(self.text_buffer.get_end_iter())
def onKeyPress(self, widget, event): def onKeyPress(self, widget, event):
...@@ -526,7 +527,7 @@ class IPythonView(ConsoleView, IterableIPShell): ...@@ -526,7 +527,7 @@ class IPythonView(ConsoleView, IterableIPShell):
''' '''
ConsoleView.__init__(self) ConsoleView.__init__(self)
self.cout = StringIO() self.cout = StringIO()
IterableIPShell.__init__(self, cout=self.cout,cerr=self.cout, IterableIPShell.__init__(self, cout=self.cout, cerr=self.cout,
input_func=self.raw_input) input_func=self.raw_input)
# self.connect('key_press_event', self.keyPress) # self.connect('key_press_event', self.keyPress)
self.interrupt = False self.interrupt = False
......
...@@ -80,7 +80,7 @@ class QuickSelect(Plugin): ...@@ -80,7 +80,7 @@ class QuickSelect(Plugin):
# First check if the currently selected accessible has the pointer over it. # First check if the currently selected accessible has the pointer over it.
# This is an optimization: Instead of searching for # This is an optimization: Instead of searching for
# STATE_SELECTED and ROLE_MENU and LAYER_POPUP in the entire tree. # STATE_SELECTED and ROLE_MENU and LAYER_POPUP in the entire tree.
item = self._getPopupItem(x,y) item = self._getPopupItem(x, y)
if item: if item:
self.node.update(item) self.node.update(item)
return return
...@@ -140,7 +140,7 @@ class QuickSelect(Plugin): ...@@ -140,7 +140,7 @@ class QuickSelect(Plugin):
except NotImplementedError: except NotImplementedError:
continue continue
if ci.contains(x,y, pyatspi.DESKTOP_COORDS) and \ if ci.contains(x, y, pyatspi.DESKTOP_COORDS) and \
ci.getLayer() == pyatspi.LAYER_POPUP: ci.getLayer() == pyatspi.LAYER_POPUP:
return child return child
......
...@@ -85,7 +85,7 @@ class ValidatorManager(type): ...@@ -85,7 +85,7 @@ class ValidatorManager(type):
@return: List of string names @return: List of string names
''' '''
return VALIDATORS.keys() return list(VALIDATORS.keys())
@staticmethod @staticmethod
def getSchemaMetadata(name): def getSchemaMetadata(name):
...@@ -261,7 +261,7 @@ class ValidatorViewport(ViewportPlugin): ...@@ -261,7 +261,7 @@ class ValidatorViewport(ViewportPlugin):
self.save.set_sensitive(False) self.save.set_sensitive(False)
report_store = self.report.get_model() report_store = self.report.get_model()
# create list of lists containing column values # create list of lists containing column values
self.row_values = [[row[0],row[1],row[2],row[3]] for row in report_store] self.row_values = [[row[0], row[1], row[2], row[3]] for row in report_store]
self.n_report_rows = len(self.row_values) self.n_report_rows = len(self.row_values)
return True return True
...@@ -429,7 +429,7 @@ class ValidatorViewport(ViewportPlugin): ...@@ -429,7 +429,7 @@ class ValidatorViewport(ViewportPlugin):
''' '''
try: try:
# generate the next accessible to validate # generate the next accessible to validate
self.walk.next() next(self.walk)
except StopIteration: except StopIteration:
# nothing left to validate, so stop # nothing left to validate, so stop
self._stopValidate() self._stopValidate()
...@@ -454,8 +454,8 @@ class ValidatorViewport(ViewportPlugin): ...@@ -454,8 +454,8 @@ class ValidatorViewport(ViewportPlugin):
while 1: while 1:
try: try:
# get one child # get one child
child = gen_child.next() child = next(gen_child)
except StopIteration, e: except StopIteration as e:
break break
# recurse # recurse
gen_traverse = self._traverse(child, state) gen_traverse = self._traverse(child, state)
...@@ -464,7 +464,7 @@ class ValidatorViewport(ViewportPlugin): ...@@ -464,7 +464,7 @@ class ValidatorViewport(ViewportPlugin):
yield None yield None
try: try:
# get one descendant # get one descendant
gen_traverse.next() next(gen_traverse)
except StopIteration: except StopIteration:
break break
...@@ -481,7 +481,7 @@ class ValidatorViewport(ViewportPlugin): ...@@ -481,7 +481,7 @@ class ValidatorViewport(ViewportPlugin):
self._runValidators(acc, state, True) self._runValidators(acc, state, True)
# generate all children, but only if acc doesn't manage descendants # generate all children, but only if acc doesn't manage descendants
if not acc.getState().contains(pyatspi.constants.STATE_MANAGES_DESCENDANTS): if not acc.getState().contains(pyatspi.constants.STATE_MANAGES_DESCENDANTS):
for i in xrange(acc.childCount): for i in range(acc.childCount):
child = acc.getChildAtIndex(i) child = acc.getChildAtIndex(i)
yield child yield child
# run after methods on all validators # run after methods on all validators
...@@ -509,7 +509,7 @@ class ValidatorViewport(ViewportPlugin): ...@@ -509,7 +509,7 @@ class ValidatorViewport(ViewportPlugin):
val.before(acc, state, self) val.before(acc, state, self)
else: else:
val.after(acc, state, self) val.after(acc, state, self)
except Exception, e: except Exception as e:
self._exceptionError(acc, e) self._exceptionError(acc, e)
def _onCursorChanged(self, report): def _onCursorChanged(self, report):
......
...@@ -14,7 +14,7 @@ U{http://www.opensource.org/licenses/bsd-license.php} ...@@ -14,7 +14,7 @@ U{http://www.opensource.org/licenses/bsd-license.php}
import sys, os, imp import sys, os, imp
PYGTK_REQ = '2.0' PYGTK_REQ = '2.0'
PYATSPI_REQ = (2,23,3) PYATSPI_REQ = (2, 23, 3)
GTK_VERSION = (2, 8, 0) GTK_VERSION = (2, 8, 0)
try: try:
...@@ -33,22 +33,21 @@ modules = ['pyatspi', 'cairo', 'rsvg', 'gi', 'gi.repository.Gtk', \ ...@@ -33,22 +33,21 @@ modules = ['pyatspi', 'cairo', 'rsvg', 'gi', 'gi.repository.Gtk', \
for name in modules: for name in modules:
try: try:
m = __import__(name) m = __import__(name)
print name, print(name)
except ImportError, e: except ImportError as e:
print name, '*MISSING*' print(name, '*MISSING*')
sys.exit(1) sys.exit(1)
except RuntimeError: except RuntimeError:
# ignore other errors which might be from lack of a display # ignore other errors which might be from lack of a display
continue continue
if name =='pyatspi': if name =='pyatspi':
try: try:
compared = map(lambda x: cmp(*x), zip(PYATSPI_REQ, m.__version__)) compared = [cmp(*x) for x in zip(PYATSPI_REQ, m.__version__)]
except AttributeError: except AttributeError:
# Installed pyatspi does not support __version__, too old. # Installed pyatspi does not support __version__, too old.
compared = [-1, 0, 0] compared = [-1, 0, 0]
if -1 in compared and 1 not in compared[:compared.index(-1)]: if -1 in compared and 1 not in compared[:compared.index(-1)]:
# A -1 without a 1 preceding it means an older version. # A -1 without a 1 preceding it means an older version.
print print("\nNeed pyatspi 1.23.4 or higher (or SVN trunk)")
print "Need pyatspi 1.23.4 or higher (or SVN trunk)"
sys.exit(1) sys.exit(1)
print print()
#!/usr/bin/env python #!@PYTHON@
''' '''
Creates an instance of the program GUI and starts the main event loop. Creates an instance of the program GUI and starts the main event loop.
...@@ -21,11 +21,11 @@ import sys, os ...@@ -21,11 +21,11 @@ import sys, os
def migrate_data (old_path, new_path): def migrate_data (old_path, new_path):
if os.path.exists(old_path) and not os.path.exists(new_path): if os.path.exists(old_path) and not os.path.exists(new_path):
mask = os.umask(077) mask = os.umask(0o77)
try: try:
os.renames(old_path, new_path) os.renames(old_path, new_path)
except: except:
print "Unable to migrate ", old_path print("Unable to migrate ", old_path)
os.umask(mask) os.umask(mask)
# Load gail module no matter what the desktop-wide settings are. # Load gail module no matter what the desktop-wide settings are.
......
...@@ -12,13 +12,13 @@ available under the terms of the BSD which accompanies this distribution, and ...@@ -12,13 +12,13 @@ available under the terms of the BSD which accompanies this distribution, and
is available at U{http://www.opensource.org/licenses/bsd-license.php} is available at U{http://www.opensource.org/licenses/bsd-license.php}
''' '''
import sys, os import sys, os
from i18n import _ from .i18n import _
import signal import signal
def signal_handler(signal, frame): def signal_handler(signal, frame):
print _( print(_(
'You pressed Ctrl+Z. This would normally freeze your keyboard') 'You pressed Ctrl+Z. This would normally freeze your keyboard'))
print _( print(_(
'Ctrl+Z has been disabled; use "accerciser &" instead from the command line') 'Ctrl+Z has been disabled; use "accerciser &" instead from the command line'))
signal.signal(signal.SIGTSTP, signal_handler) signal.signal(signal.SIGTSTP, signal_handler)
# If pyatspi not installed seperately, add pyatspi zip file to the path # If pyatspi not installed seperately, add pyatspi zip file to the path
...@@ -31,6 +31,6 @@ def main(): ...@@ -31,6 +31,6 @@ def main():
''' '''
Run program. Run program.
''' '''
from accerciser import Main from .accerciser import Main
main = Main() main = Main()
main.run() main.run()
...@@ -16,7 +16,7 @@ is available at U{http://www.opensource.org/licenses/bsd-license.php} ...@@ -16,7 +16,7 @@ is available at U{http://www.opensource.org/licenses/bsd-license.php}
import gi import gi
from gi.repository import Gtk as gtk from gi.repository import Gtk as gtk
from i18n import _ from .i18n import _
class AccerciserAboutDialog(gtk.AboutDialog): class AccerciserAboutDialog(gtk.AboutDialog):
''' '''
......
...@@ -21,20 +21,20 @@ from gi.repository import GObject ...@@ -21,20 +21,20 @@ from gi.repository import GObject
from gi.repository import Atk as atk from gi.repository import Atk as atk
import os, sys, locale import os, sys, locale
from icons import getIcon from .icons import getIcon
import os import os
from bookmarks import BookmarkStore from .bookmarks import BookmarkStore
from accessible_treeview import * from .accessible_treeview import *
from node import Node from .node import Node
from plugin import PluginManager from .plugin import PluginManager
from plugin import PluginView from .plugin import PluginView
from tools import Tools from .tools import Tools
from i18n import _, N_ from .i18n import _, N_
from hotkey_manager import HotkeyManager, HotkeyTreeView from .hotkey_manager import HotkeyManager, HotkeyTreeView
from about_dialog import AccerciserAboutDialog from .about_dialog import AccerciserAboutDialog
from prefs_dialog import AccerciserPreferencesDialog from .prefs_dialog import AccerciserPreferencesDialog
from main_window import AccerciserMainWindow from .main_window import AccerciserMainWindow
import ui_manager from . import ui_manager
class Main(Tools): class Main(Tools):
''' '''
......
...@@ -19,12 +19,12 @@ from gi.repository import GObject ...@@ -19,12 +19,12 @@ from gi.repository import GObject
import pyatspi import pyatspi
import os import os
import ui_manager from . import ui_manager
from time import sleep from time import sleep
from icons import getIcon from .icons import getIcon
from node import Node from .node import Node
from tools import Tools, getTreePathBoundingBox from .tools import Tools, getTreePathBoundingBox
from i18n import _ from .i18n import _
COL_ICON = 0 COL_ICON = 0
COL_NAME = 1 COL_NAME = 1
...@@ -236,10 +236,10 @@ class AccessibleModel(gtk.TreeStore, Tools): ...@@ -236,10 +236,10 @@ class AccessibleModel(gtk.TreeStore, Tools):
''' '''
if not self._hide_leaves:</