After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 385853 - Added input features for BasicBraillePerk
Added input features for BasicBraillePerk
Status: RESOLVED FIXED
Product: lsr
Classification: Deprecated
Component: extensions
0.3.x
Other Linux
: Normal normal
: 0.4.0
Assigned To: Scott Haeger
LSR maintainers
Depends on:
Blocks:
 
 
Reported: 2006-12-14 14:14 UTC by Scott Haeger
Modified: 2006-12-15 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for home, end of line, and beginning of line braille display features (6.75 KB, patch)
2006-12-14 16:26 UTC, Scott Haeger
none Details | Review
patch for home, EOL, SOL braille display features. user defined caret move (8.74 KB, patch)
2006-12-14 18:29 UTC, Scott Haeger
committed Details | Review
patch for home, EOL, SOL braille display features. user defined caret move (3.57 KB, patch)
2006-12-15 14:56 UTC, Scott Haeger
none Details | Review
patch for home, EOL, SOL braille display features. user defined caret move (3.59 KB, patch)
2006-12-15 15:12 UTC, Scott Haeger
committed Details | Review

Description Scott Haeger 2006-12-14 14:14:47 UTC
Add home, begin line, and end line device navigation inputs.
Comment 1 Scott Haeger 2006-12-14 16:26:34 UTC
Created attachment 78367 [details] [review]
patch for home, end of line, and beginning of line braille display features
Comment 2 Scott Haeger 2006-12-14 18:29:24 UTC
Created attachment 78379 [details] [review]
patch for home, EOL, SOL braille display features. user defined caret move
Comment 3 Scott Haeger 2006-12-14 20:50:28 UTC
Comment on attachment 78379 [details] [review]
patch for home, EOL, SOL braille display features. user defined caret move

>? 385567.patch
>? INSTALL
>? Makefile
>? Makefile.in
>? aclocal.m4
>? additionalfeatures.patch
>? autom4te.cache
>? config.log
>? config.status
>? configure
>? install-sh
>? lsr.desktop
>? lsr.spec
>? missing
>? mkinstalldirs
>? omf.make
>? py-compile
>? xmldocs.make
>? doc/Makefile
>? doc/Makefile.in
>? doc/man/Makefile
>? doc/man/Makefile.in
>? doc/ui/Makefile
>? doc/ui/Makefile.in
>? doc/workbook/Makefile
>? doc/workbook/Makefile.in
>? src/AEConstants/Makefile
>? src/AEConstants/Makefile.in
>? src/AEConstants/Platform.py
>? src/Devices/BrlAPIDevice.pyc
>? src/Perks/BasicBraillePerk.pyc
>Index: src/AEConstants/Output.py
>===================================================================
>RCS file: /cvs/gnome/lsr/src/AEConstants/Output.py,v
>retrieving revision 1.5
>diff -r1.5 Output.py
>28,29c28,31
>< CMD_CARET = 6
>< CMD_TRUNCATE = 8
>---
>> BRAILLE_CMD = 0x0010
>> CMD_CARET = (BRAILLE_CMD | 0x0001)
>> CMD_TRUNCATE = (BRAILLE_CMD | 0x0002)
>> CMD_GET_ELLIPSIS_SIZE = (BRAILLE_CMD | 0x0003)
>Index: src/AEOutput/Braille.py
>===================================================================
>RCS file: /cvs/gnome/lsr/src/AEOutput/Braille.py,v
>retrieving revision 1.5
>diff -r1.5 Braille.py
>89a90,91
>>     elif name == AEConstants.CMD_GET_ELLIPSIS_SIZE:
>>       return self.sendGetEllipsisSizes(style)
>120a123,132
>>   
>>   def sendGetEllipsisSizes(self, style):
>>     '''
>>     @param style: Style with which the ellipsis are defined
>>     @type style: L{AEOutput.Style}
>>     @return: tuple containing length of left and right ellipsis
>>     @rtype: tuple
>>     @raise NotImplementedError: When not overridden in a subclass
>>     '''
>>     raise NotImplementedError
>177c189
><     raise NotImplementedError
>\ No newline at end of file
>---
>>     raise NotImplementedError
>Index: src/Devices/BrlAPIDevice.py
>===================================================================
>RCS file: /cvs/gnome/lsr/src/Devices/BrlAPIDevice.py,v
>retrieving revision 1.1
>diff -r1.1 BrlAPIDevice.py
>404a405,416
>>     
>>   def sendGetEllipsisSizes(self, style):
>>     '''
>>     @param style: Style with which the ellipsis are defined
>>     @type style: L{AEOutput.Style}
>>     @return: tuple containing length of left and right ellipsis
>>     @rtype: tuple
>>     @raise NotImplementedError: When not overridden in a subclass
>>     '''
>>     left = len(self.EllipsisStyles[self.default_style.EllipsisStyle][0])
>>     right = len(self.EllipsisStyles[self.default_style.EllipsisStyle][1])
>>     return (left, right)
>Index: src/Perks/BasicBraillePerk.py
>===================================================================
>RCS file: /cvs/gnome/lsr/src/Perks/BasicBraillePerk.py,v
>retrieving revision 1.1
>diff -r1.1 BasicBraillePerk.py
>39,40c39,40
><                 _('When set, after any type of scrolling, display snaps to '
><                   'original position upon an update.'))
>---
>>                 _('When set, after any type of scrolling display snaps to'
>>                 ' original position upon an update'))
>43,44c43,44
><                 _('When set, display snaps to nearest word on previous or '
><                   'next chunk of text.'))
>---
>>                 _('When set, display snaps to nearest word during display '
>>                   'paging.'))
>46a47,50
>>     self.newBool('MoveCaret', False, _('Move caret on Home, EOL, SOL?'), 
>>                 _('When set, Home, End of Line, and Start of Line commands move'
>>                 ' caret to respective position.  Otherwise, display is moved but'
>>                 ' caret remains in the same location.'))
>57c61
><     g = root.newGroup(_('Scrolling'))
>---
>>     g = root.newGroup(_('General Navigation'))
>58a63
>>     g.append('MoveCaret')
>60,61c65
><     g = root.newGroup(_('Display Forwarding'))
><     g.append('Overlap')
>---
>>     g = root.newGroup(_('Page Forwarding'))
>62a67
>>     g.append('Overlap')
>117a123,125
>>     self.registerTask(HandleHome('braille home'))
>>     self.registerTask(HandleLineBegin('braille line begin'))
>>     self.registerTask(HandleLineEnd('braille line end'))
>132a141,146
>>     self.registerCommand(brlindev, 'braille home', True, 
>>                          [brlindev.KEY_CMD_HOME])
>>     self.registerCommand(brlindev, 'braille line begin', True, 
>>                          [brlindev.KEY_CMD_LNBEG])
>>     self.registerCommand(brlindev, 'braille line end', True, 
>>                          [brlindev.KEY_CMD_LNEND])
>187a202,261
>>        
>> class HandleLineEnd(Task.InputTask):
>>   '''
>>   Moves caret to last cell in current line of text, redraws braille display
>>   @note getEndOfHardLine skews offset one cell on last line, probably an error
>>   '''
>>   def execute(self, **kwargs):
>>     # move caret if desired. 
>>     if self.perk.getState().MoveCaret:
>>       # HandleCaretChange.update() will update current_text
>>       eol_por = self.getEndOfHardLine()
>>       self.clickPOR(EVENT_SYNTHMOUSE_B1C, eol_por)
>>     else:
>>       # otherwise just set current_text for new por location
>>       self.task_por.char_offset = len(self.getItemText())
>>       self.perk.current_text = self.getItemText()
>>     
>>     self.perk.scroll_offset = 0
>>     self.doTask("braille output")
>>     
>>     
>> class HandleHome(Task.InputTask):
>>   '''
>>   Moves caret to first cell of first line, redraws braille display
>>   '''
>>   def execute(self, **kwargs):
>>     self.task_por.char_offset = 0
>>     self.task_por.item_offset = 0
>>     
>>     # move caret if desired. 
>>     if self.perk.getState().MoveCaret:
>>       # HandleCaretChange.update() will update current_text
>>       self.clickPOR(EVENT_SYNTHMOUSE_B1C, self.task_por)
>>     else:
>>       # otherwise just set current_text for new por location
>>       self.perk.current_text = self.getItemText()
>>       
>>     self.perk.scroll_offset = 0
>>     self.doTask("braille output")
>>     
>>     
>> class HandleLineBegin(Task.InputTask):
>>   '''
>>   Moves caret to first cell in current line of text, redraws braille display
>>   '''
>>   def execute(self, **kwargs):
>>     self.task_por.char_offset = 0
>>     
>>     # move caret if desired. 
>>     if self.perk.getState().MoveCaret:
>>       # HandleCaretChange.update() will update current_text
>>       self.clickPOR(EVENT_SYNTHMOUSE_B1C, self.task_por)
>>     else:
>>       # otherwise just set current_text for new por location
>>       self.perk.current_text = self.getItemText()
>>     
>>     self.perk.scroll_offset = 0
>>     self.doTask("braille output")
>>     
>>     
>190,191c264,265
><   Handle touch cursor sets caret at given location in text accessibles or
><   left clicks the center of the given accessible
>---
>>   Sets caret at given location in text accessibles or left clicks the center 
>>   of the given accessible.
>248a323
>>     l_el_len, r_el_len = self.send(CMD_GET_ELLIPSIS_SIZE, None, talk=False)
>252c327,328
><       self.perk.scroll_offset += style.TotalCells-state.Overlap
>---
>>       self.perk.scroll_offset += \
>>                      style.TotalCells-state.Overlap-l_el_len-r_el_len
>254c330,331
><       self.perk.scroll_offset = ctlen + state.RightPadding - style.TotalCells - self.perk.pre_left_slice
>---
>>       self.perk.scroll_offset = ctlen + state.RightPadding\
>>              - style.TotalCells - self.perk.pre_left_slice
>261,262c338,340
><       for i in xrange(self.perk.scroll_offset+self.perk.pre_left_slice, \
><                       -1, -1):
>---
>>       # TODO change hardcoded len(ellipsis)
>>       for i in xrange(self.perk.scroll_offset+ \
>>                      self.perk.pre_left_slice+l_el_len, -1, -1):
>266c344
><           found = True
>---
>>             found = True
>285c363,366
><     if  self.perk.pre_left_slice+self.perk.scroll_offset-\
>---
>>     l_el_len, r_el_len = self.send(CMD_GET_ELLIPSIS_SIZE, None, talk=False)
>>     
>>     # TODO change hardcoded len(ellipsis)
>>     if self.perk.pre_left_slice+self.perk.scroll_offset- \
>287c368,369
><       self.perk.scroll_offset -= style.TotalCells-state.Overlap
>---
>>       self.perk.scroll_offset -= \
>>                      style.TotalCells-state.Overlap-l_el_len-r_el_len
>290c372
><       
>---
>>     
>296,297c378,380
><       for i in xrange(self.perk.scroll_offset+self.perk.pre_left_slice, \
><                       -1, -1):
>---
>>       # TODO change hardcoded len(ellipsis)
>>       for i in xrange(self.perk.scroll_offset+ \
>>                      self.perk.pre_left_slice+l_el_len, -1, -1):
>301c384
><           found = True
>---
>>             found = True
>309a393
>>     
>395d478
><     self.perk.pre_left_slice = 0
>477a561,562
>>     #print "leftslice=", leftslice
>>    # print "offset=", self.perk.scroll_offset
>484c569
><     
>\ No newline at end of file
>---
>>     
>Index: src/Task/Tools/View.py
>===================================================================
>RCS file: /cvs/gnome/lsr/src/Task/Tools/View.py,v
>retrieving revision 1.43
>diff -r1.43 View.py
>2434c2434
><       rv = IAccessibleAction(por).doMouseClickAtPor(mouseevent)
>---
>>       rv = IAccessibleAction(por).doMouseClickAtPOR(mouseevent)
Comment 4 Peter Parente 2006-12-15 02:02:25 UTC
Double check HandlePageBackward and Forward. I couldn't apply the patch entirely because of a conflict with a prior patch. Make sure the found = True line is indented correctly.
Comment 5 Scott Haeger 2006-12-15 14:56:44 UTC
Created attachment 78429 [details] [review]
patch for home, EOL, SOL braille display features. user defined caret move
Comment 6 Scott Haeger 2006-12-15 15:12:26 UTC
Created attachment 78430 [details] [review]
patch for home, EOL, SOL braille display features. user defined caret move