GtkOrientable and GtkBox

2009-06-03 Thread Davyd Madeley
I was experimenting with using GtkOrientable today and came across what might be an oversight when using it with GtkBox'like objects. I wanted to turn a hbox into a vbox, which is fine. However the buttons in the box are then clearly in the reverse order to the one that makes sense. This can be

Re: GtkOrientable and GtkBox

2009-06-03 Thread Sven Neumann
Hi, On Wed, 2009-06-03 at 14:25 +0800, Davyd Madeley wrote: I was experimenting with using GtkOrientable today and came across what might be an oversight when using it with GtkBox'like objects. I wanted to turn a hbox into a vbox, which is fine. However the buttons in the box are then

Re: GtkOrientable and GtkBox

2009-06-03 Thread Davyd Madeley
On Wed, 2009-06-03 at 10:08 +0200, Sven Neumann wrote: Hi, On Wed, 2009-06-03 at 14:25 +0800, Davyd Madeley wrote: I was experimenting with using GtkOrientable today and came across what might be an oversight when using it with GtkBox'like objects. I wanted to turn a hbox into a vbox,

Re: GtkOrientable and GtkBox

2009-06-03 Thread Christian Dywan
Am Wed, 03 Jun 2009 16:18:17 +0800 schrieb Davyd Madeley da...@madeley.id.au: On Wed, 2009-06-03 at 10:08 +0200, Sven Neumann wrote: Hi, On Wed, 2009-06-03 at 14:25 +0800, Davyd Madeley wrote: I was experimenting with using GtkOrientable today and came across what might be an

Re: GtkOrientable and GtkBox

2009-06-03 Thread Davyd Madeley
On Wed, 2009-06-03 at 11:55 +0200, Christian Dywan wrote: how is this related to GtkOrientable at all? This was always how a vertical box worked, ever since GtkVBox was there. There is nothing new with it. I'm afraid I don't see how Gtk could help you out, if what you need really is a

Re: GtkOrientable and GtkBox

2009-06-03 Thread Sven Neumann
Hi, On Wed, 2009-06-03 at 19:03 +0800, Davyd Madeley wrote: It's not really related to GtkOrientable per se, but it's specifically that when you change the runtime orientation you might also wish to reverse the packing order (I guess think about wishing to do a -90 degree rotation rather

Re: GtkOrientable and GtkBox

2009-06-03 Thread Tristan Van Berkom
On Wed, Jun 3, 2009 at 7:18 AM, Davyd Madeley da...@madeley.id.au wrote: [...] In general though, GtkOrientable already exists. People are bound to use it. An example use case of this would be a custom toolbar that could be placed optionally on top or on the side of the workspace where the

Re: GtkOrientable and GtkBox

2009-06-03 Thread Freddie Unpenstein
From: Tristan Van Berkom, Date: 04/06/2009 00:13, Wrote: In general though, GtkOrientable already exists. People are bound to use it. An example use case of this would be a custom toolbar that could be placed optionally on top or on the side of the workspace where the tool ordering is

Re: GtkOrientable and GtkBox

2009-06-03 Thread Sven Neumann
Hi, On Wed, 2009-06-03 at 13:32 -0400, Freddie Unpenstein wrote: From: Tristan Van Berkom, Date: 04/06/2009 00:13, Wrote: In general though, GtkOrientable already exists. People are bound to use it. An example use case of this would be a custom toolbar that could be placed optionally

Re: GtkOrientable and GtkBox

2009-06-03 Thread Tristan Van Berkom
On Wed, Jun 3, 2009 at 1:56 PM, Sven Neumann s...@gimp.org wrote: [...] I haven't tried this, but unless I am mistaken this should reverse the order of children in a box. Seems easy enough to do and avoids the need to introduce yet another special case in the GtkBox code. Perhaps if this

Re: GtkOrientable and GtkBox

2009-06-03 Thread Davyd Madeley
On Wed, 2009-06-03 at 19:56 +0200, Sven Neumann wrote: what's so painful about: GList *list = gtk_container_get_children (GTK_CONTAINER (box)); gint pos = g_list_length (list) - 1; for (; list; list = list-next, pos--) gtk_box_reorder_child (GTK_BOX (box), list-data, pos); I

Re: GtkOrientable and GtkBox

2009-06-03 Thread Freddie Unpenstein
From: Davyd Madeley, Date: 04/06/2009 10:59, Wrote: I haven't tried this, but unless I am mistaken this should reverse the order of children in a box. Seems easy enough to do and avoids the need to introduce yet another special case in the GtkBox code. Perhaps if this solution is not obvious