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 482294 - Contextual information for gnome-terminal should only be shown in braille when you're on the first line
Contextual information for gnome-terminal should only be shown in braille whe...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: braille
2.20.x
Other All
: Normal normal
: 2.22.0
Assigned To: Willie Walker
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-10-01 16:39 UTC by Mike Pedersen
Modified: 2008-07-22 19:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Work in progress (1.82 KB, patch)
2008-01-12 18:53 UTC, Willie Walker
none Details | Review
Patch to jump into flat review (3.79 KB, patch)
2008-01-18 23:02 UTC, Willie Walker
none Details | Review
Patch to remove " $l" when in focus tracking mode (3.43 KB, patch)
2008-01-19 00:37 UTC, Willie Walker
committed Details | Review

Description Mike Pedersen 2007-10-01 16:39:02 UTC
To reproduce this problem do the following: 
1.  start orca and open gnome terminal.
2.  Type "ls" followed by enter   so that some information is on the screen.
3. Press pan left on the braille display.  
When pan left is pressed braille jumps to the title of the gnome terminal.  
What should actually happen is that braille should move to the last segment of the line above the prompt.
Comment 1 Willie Walker 2007-10-02 13:30:42 UTC
I'm not sure, but I think you might be panning left to the contextual information for the terminal.  Thus, the entire braille line probably looks similar to this:

BRAILLE LINE:  'gnome-terminal Application Terminal Frame TabList  Terminal Term
inalbash-3.00$
     VISIBLE:  'bash-3.00$                      ', cursor=13

Then, when you pan left, you get the contextual information for the terminal, which probably looks like this:

BRAILLE LINE:  'gnome-terminal Application Terminal Frame TabList  Terminal Term
inalbash-3.00$
     VISIBLE:  'gnome-terminal Application Terminal F', cursor=1

So, I suspect this is an RFE to treat gnome-terminal areas similar to multiline editable text.  Is that correct?

Comment 2 Mike Pedersen 2007-10-02 17:42:30 UTC
Yes this is exactly what is happening. 
Comment 3 Willie Walker 2007-11-01 20:15:44 UTC
Sorry - I had marked this as an enhancement.  This really is a bug.
Comment 4 Willie Walker 2008-01-12 18:53:34 UTC
Created attachment 102678 [details] [review]
Work in progress

This patch eliminates the context on all lines except the first line.  Doing the rest of the job, however, is going to be a bigger challenge.  Before I jump into it, I'll explain what's going on.

The current implementation of panning left in text areas merely moves the caret in the text area and Orca then responds to the caret movement accordingly via a separate caret moved event.  This works fine if you can move the caret, which is the case for text areas.  Terminals are different in that you have a tough time moving their caret.  So, the logic we apply to text areas won't work with terminals.

As a possible solution to this problem, we could detect that our attempt to move the caret failed (a return value of False from text.setCaretOffset).  If we failed to move the caret, we would automatically enter flat review mode and pan/move to the next or previous portion of the text that we wanted to get to.  I'm not sure how much work this would be, so I wanted to check with Mike before investing more time into it.

Mike, what are your thought on this?
Comment 5 Mike Pedersen 2008-01-12 20:30:47 UTC
The above idea seems reasonable and should provide the desired behavior. 
Comment 6 Willie Walker 2008-01-18 23:02:28 UTC
Created attachment 103171 [details] [review]
Patch to jump into flat review

(In reply to comment #4)
> As a possible solution to this problem, we could detect that our attempt to
> move the caret failed (a return value of False from text.setCaretOffset).  
> If we failed to move the caret, we would automatically enter flat review 
> mode and pan/move to the next or previous portion of the text that we 
> wanted to get to.

This patch does the above and seems to work OK.  The thing it doesn't do well is automatically exit flat review if you 'pan right' back to the starting point.  That may be a bit trickier to pull off.  Mike, do you want that behavior?
Comment 7 Mike Pedersen 2008-01-19 00:01:02 UTC
> This patch does the above and seems to work OK.  The thing it doesn't do well
> is automatically exit flat review if you 'pan right' back to the starting
> point.  That may be a bit trickier to pull off.  Mike, do you want that
> behavior?
>
No, you don't need to do anything about that because the braille display user will expect to either press the route braile to focus position or have the next action that in any way changes the screen update the braile display.  
 

Comment 8 Mike Pedersen 2008-01-19 00:25:41 UTC
I needed a break from comparing selection test cases with windows so decided to test this bug.  
The behavior is what I was hoping for.  The only problem is:  Now when focus tracking presents the terminal line we are showing the end of line marker after the prompt.  We weren't doing this before and I don't think it is what we want.  
Comment 9 Willie Walker 2008-01-19 00:37:10 UTC
Created attachment 103174 [details] [review]
Patch to remove " $l" when in focus tracking mode

Here's a patch to eliminate the " $l" when in focus tracking mode.  Please give it a try.
Comment 10 Mike Pedersen 2008-01-22 16:50:13 UTC
Works great.  thanks 
Comment 11 Willie Walker 2008-01-22 17:47:12 UTC
Committed and closing as FIXED.  Thanks!