Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 41364 - GTK-BIDI: RTL support in Combo
Summary: GTK-BIDI: RTL support in Combo
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: Bogdan Gheorghe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-10 12:07 EDT by Semion Chichelnitsky CLA
Modified: 2007-10-30 11:50 EDT (History)
3 users (show)

See Also:


Attachments
Combo.java from build N20030729 with proposed changes (43.35 KB, text/plain)
2003-08-10 12:32 EDT, Semion Chichelnitsky CLA
no flags Details
Combo.java from build i20040210 with proposed changes. (44.54 KB, text/plain)
2004-02-12 05:12 EST, Semion Chichelnitsky CLA
no flags Details
Zip, wich contains doc with screenshots and some diff files. (72.83 KB, application/x-zip-compressed)
2007-10-14 07:08 EDT, Semion Chichelnitsky CLA
no flags Details
Last zip with doc and diff files (73.04 KB, application/x-zip-compressed)
2007-10-15 04:15 EDT, Semion Chichelnitsky CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Semion Chichelnitsky CLA 2003-08-10 12:07:29 EDT
All currently found problems in rtl-oriented Combo are connected with it's drop-
down list. Text direction of each item of this list should be set separately. 
Position of vertical scroll bar of it's scrolled window should be changed to 
opposite. Initial position of horizontal scroll bar should be changed to 
rightmost position. X position of window, which contains drop-down list, should 
be changed to leftmost position of Combo. 
As far as I understand, last problem can't be solved with current version of 
GTK without handling of widget's visibility changing. GTK places list's window 
in accordance with leftmost position of entry widget, that isn't leftmost 
widget in case of rtl orientation of Combo.
Comment 1 Semion Chichelnitsky CLA 2003-08-10 12:32:57 EDT
Created attachment 5702 [details]
Combo.java from build N20030729 with proposed changes

Our changes are marked with tag "bidi". They don't include changes,which are
needed for setting horizontal scroll bar to rightmost position.
Comment 2 Semion Chichelnitsky CLA 2003-08-10 12:38:57 EDT
Problem with position of horizontal scrollbar of list is currently discussed in 
the comments to bug 41243. 
Comment 3 Felipe Heidrich CLA 2003-08-19 16:22:37 EDT
Your code does not fixed two of the problems you mention:

1. Initial position of horizontal scroll bar should be changed to rightmost
position.
2. X position of window, which contains drop-down list, should 
be changed to leftmost position of Combo.

I believe we can fix both problems, but it will be very hacky.

Comment 4 Semion Chichelnitsky CLA 2004-02-12 05:12:30 EST
Created attachment 7831 [details]
Combo.java from build i20040210 with proposed changes.

Starting with GTK 2.3.2, the most problems of rtl-oriented Combo are solved.
Some additional changes are needed here because of this control's specifics.
It is supposed here, that general problem, which is described in the bug 41184,

is solved by the newly suggested way.
Our changes are marked with tag b41364.
Comment 5 Felipe Heidrich CLA 2005-02-23 14:43:22 EST
fixed in head > 20050223
Comment 6 Semion Chichelnitsky CLA 2007-10-14 07:08:22 EDT
Created attachment 80315 [details]
Zip, wich contains doc with screenshots and some diff files.
Comment 7 Semion Chichelnitsky CLA 2007-10-14 07:10:49 EDT
This bug should be reopened, because bidi-specific problems appear in Combo again. This is caused by change base GTK widget, used by Combo,  from GtkCombo to GtkComboBox.
I don't touch here general GTK problems with contextual ordering of the text and dynamic alignment in GTK text widgets. Problems, specific for SWT Combo, consist in wrong alignment of drop-down list's content and wrong alignment of the text, which appears in not-editable Combo's cell view (see attachments). Reason: correct text direction isn't set for corresponding GTK widgets. To change their direction, we need found and save handles of these widgets. Case of cell view from not-editable Combo is more simple: its handle can be found in the list of GtkComboBox children.  What about drop-down list, it is released inside additional toplevel Window. Handle to this Window can be found by comparing lists of toplevels before and after creating GtkComboBox.
Our suggestions can be found in attachments as diff files, which are done on the base of corresponding sources from 3.4M2.
Comment 8 Semion Chichelnitsky CLA 2007-10-15 04:15:48 EDT
Created attachment 80339 [details]
Last zip with doc and diff files
Comment 9 Bogdan Gheorghe CLA 2007-10-15 17:19:22 EDT
Thank you for the patch! I released it to HEAD with some modifications. Should be in tomorrow's I-build - can you please give it a try at your end? Thanks!

Fixed in HEAD > 20071015
Comment 10 Semion Chichelnitsky CLA 2007-10-16 13:12:15 EDT
I checked with build I20071016 - it looks ok.
Thank you.