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 96632 - Support RTL flipping for hpaned
Support RTL flipping for hpaned
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.1.x
Other other
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 76219
 
 
Reported: 2002-10-23 18:12 UTC by Matthias Clasen
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (7.40 KB, patch)
2002-10-29 21:42 UTC, Matthias Clasen
none Details | Review
less invasive patch (6.43 KB, patch)
2002-11-01 23:33 UTC, Matthias Clasen
none Details | Review
patch (5.36 KB, patch)
2003-09-19 14:25 UTC, Soren Sandmann Pedersen
none Details | Review

Description Matthias Clasen 2002-10-23 18:12:11 UTC
the children should be exchanged in RTL mode.
Comment 1 Owen Taylor 2002-10-23 19:08:19 UTC
Moving all the RTL flipping bugs to the 2.4.0 milestone; in some
cases the changes should be easy to do. (GtkPaned comes to mind)
In those cases, we can move the bugs back to 2.2.0 if patches occur.
Comment 2 Matthias Clasen 2002-10-29 21:41:44 UTC
Actually, hpaned turned out to be one of the hardest so far, since a
good part of the position calculation is done in paned.c and shared
with   vpaned. In the end, I had to enhance gtk_paned_compute_position
() to support flipping child1 and child2 by adding a new boolean
parameter.
This should not count as an api change, however, since
gtk_paned_compute_position is an internal function (which should
really be named _gtk_paned_compute_position and not be exported at all).
Comment 3 Matthias Clasen 2002-10-29 21:42:34 UTC
Created attachment 11901 [details] [review]
patch
Comment 4 Owen Taylor 2002-11-01 22:53:42 UTC
Can't you compute the inverted parameter using 
paned->orientation and gtk_widget_get_direction()?

(The "encapsulation" of the orientation in the subclasses
is already incomplete.)
Comment 5 Matthias Clasen 2002-11-01 23:32:49 UTC
Yes, I could. If I would have been totally confused by 
hpaned->orientation being vertical...new patch coming
Comment 6 Matthias Clasen 2002-11-01 23:33:37 UTC
Created attachment 11974 [details] [review]
less invasive patch
Comment 7 Owen Taylor 2002-11-02 00:11:09 UTC
It definitely bothers me that in this patch, when the hpaned
is flipped, paned->child1_size refers to the size of 
paned->child2.

Not only that, but the effect of gtk_paned_set_position()
will be wrong if it effects the size of the left pane
not the size of pane1.

I think it would all come out a whole lot cleaner if the
child1_size is left the size of child 1, and flipping 
is done:

 - When getting event coordinates (update_drag(), 
   gtk_paned_button_press())

 - When allocating the children gtk_hpaned_size_allocate() - 
   it should be possible to add helper functions:

    compute_screen_rectangle (paned, &unflipped_rectangle);
    allocate_child (paned, child, &unflipped_allocation);

   and do it pretty cleanly.
Comment 8 Matthias Clasen 2003-03-04 08:16:09 UTC
Removing PATCH since the attached patch is not acceptable and I have not been able to 
produce a better one, despite several attempts. Owen, since you think this is simple, 
maybe you could give it a try...
Comment 9 Soren Sandmann Pedersen 2003-09-19 14:25:05 UTC
Created attachment 20096 [details] [review]
patch
Comment 10 Soren Sandmann Pedersen 2003-09-19 14:30:21 UTC
- I did it pretty much as Owen suggested, except that flipping
  was not necessary in the button_press() handler.

- It is not necessary to flip during f6 and f8 navigation because 
  these routines selects the handles to activate based on child1/child2,
  not on aboslute position.
Comment 11 Owen Taylor 2003-09-19 15:58:50 UTC
Looks plausible; if it works, I'd say commit it.
Comment 12 Soren Sandmann Pedersen 2003-09-19 16:18:28 UTC
Fri Sep 19 18:15:31 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkpaned.c, gtk/gtkhpaned.c: implement RTL flipping
	(#96632)