Re: gtk_container_new_child (was Re: Wrapping Box Container)

2010-09-06 Thread Havoc Pennington
I forgot that GtkWidget::parent already works: g_object_new (TYPE_FOO, "parent", box, "blah", 42, NULL) This is a pretty nice solution I think. You don't even have to save a pointer to the new object if you aren't doing anything other than adding it to parent and setting a couple of props. Havoc

Re: gtk_container_new_child (was Re: Wrapping Box Container)

2010-09-02 Thread Havoc Pennington
Hi, On Thu, Sep 2, 2010 at 5:38 AM, Tristan Van Berkom wrote: > On the other hand... since g_object_new() will never return NULL... > I'm not sure how much this api would be different than simply > invoking these lines of code: > > gtk_container_add_with_properties (container, >                  

Re: gtk_container_new_child (was Re: Wrapping Box Container)

2010-09-02 Thread Tristan Van Berkom
On Wed, 2010-09-01 at 10:59 -0400, Havoc Pennington wrote: > Hi, > > On Wed, Sep 1, 2010 at 6:41 AM, Tristan Van Berkom > wrote: > > I like this idea alot and as its a trivial patch I might write one > > up tonight or tomorrow ... > > well, it's trivial except for the need to add some kind of go

Re: Wrapping Box Container

2010-09-01 Thread Tristan Van Berkom
On Wed, 2010-09-01 at 10:51 -0400, Havoc Pennington wrote: > Hi, > > On Wed, Sep 1, 2010 at 6:37 AM, Tristan Van Berkom > wrote: > > SPREAD_EVEN is exactly that.. adding extra space between the children as > > spacing, and there is SPREAD_EXPAND for the other (not sure if that > > could be better

Re: Wrapping Box Container

2010-09-01 Thread Havoc Pennington
Hi, On Wed, Sep 1, 2010 at 6:37 AM, Tristan Van Berkom wrote: > SPREAD_EVEN is exactly that.. adding extra space between the children as > spacing, and there is SPREAD_EXPAND for the other (not sure if that > could be better explained). that's what I was saying, just that the docs could use a sm

Re: gtk_container_new_child (was Re: Wrapping Box Container)

2010-09-01 Thread Havoc Pennington
Hi, On Wed, Sep 1, 2010 at 6:41 AM, Tristan Van Berkom wrote: > I like this idea alot and as its a trivial patch I might write one > up tonight or tomorrow ... well, it's trivial except for the need to add some kind of gobject API (or you could do it in a somewhat hacky way without that, I think

Re: gtk_container_new_child (was Re: Wrapping Box Container)

2010-09-01 Thread Tristan Van Berkom
On Tue, 2010-08-31 at 18:32 -0400, Havoc Pennington wrote: > Hi, > > On Mon, Aug 30, 2010 at 9:51 PM, Havoc Pennington wrote: > > With my proposed padding cleanup though that issue goes away: > > > > child = g_object_new(TYPE_MYCHILD, "padding", 5, "h-align", > > GTK_ALIGN_FILL_HORIZONTAL, NULL);

Re: Wrapping Box Container

2010-09-01 Thread Tristan Van Berkom
On Mon, 2010-08-30 at 22:07 -0400, Havoc Pennington wrote: > While I'm making trivial comments about wrap box - there's START/END > in several other enums, rather than BEGIN/END (just look through > gtkenums.h, wrap box is the only BEGIN) > > @GTK_WRAP_BOX_SPREAD_EVEN description says "evenly dist

gtk_container_new_child (was Re: Wrapping Box Container)

2010-08-31 Thread Havoc Pennington
Hi, On Mon, Aug 30, 2010 at 9:51 PM, Havoc Pennington wrote: > With my proposed padding cleanup though that issue goes away: > > child = g_object_new(TYPE_MYCHILD, "padding", 5, "h-align", > GTK_ALIGN_FILL_HORIZONTAL, NULL); > insert_child(layout, child, 2, GTK_WRAP_BOX_PACK_Y_EXPAND); > Really

Re: Wrapping Box Container

2010-08-31 Thread Murray Cumming
On Mon, 2010-08-30 at 18:20 -0400, Behdad Esfahbod wrote: > On 08/24/10 13:42, Tristan Van Berkom wrote: > > Is this a kind of widget that we are interested in adding to GTK+ ? > > What are the usecases for such a container? The selection of features looks a > bit arbitrary to me. I wanted it fo

Re: Wrapping Box Container

2010-08-30 Thread Havoc Pennington
While I'm making trivial comments about wrap box - there's START/END in several other enums, rather than BEGIN/END (just look through gtkenums.h, wrap box is the only BEGIN) @GTK_WRAP_BOX_SPREAD_EVEN description says "evenly distributed between children" which I think means "as spacing between chi

Re: Wrapping Box Container

2010-08-30 Thread Havoc Pennington
Hi, On Mon, Aug 30, 2010 at 9:51 PM, Havoc Pennington wrote: > I think "guint" here is just misleading; it's not like you can use > UINT_MAX, GTK uses signed int for most layout internally to avoid > screwy bugs caused by subtraction ending up < 0. > Also public API like set_size_request and GtkS

Re: Wrapping Box Container

2010-08-30 Thread Havoc Pennington
it'd be great to avoid the GtkBox stuff I was whining about in the padding thread, e.g. void egg_wrap_box_insert_child (EggWrapBox *layout, GtkWidget *widget,

Re: Wrapping Box Container

2010-08-30 Thread Behdad Esfahbod
On 08/24/10 13:42, Tristan Van Berkom wrote: > Is this a kind of widget that we are interested in adding to GTK+ ? What are the usecases for such a container? The selection of features looks a bit arbitrary to me. behdad ___ gtk-devel-list mailing list

Re: Wrapping Box Container

2010-08-27 Thread Matthias Clasen
On Thu, Aug 26, 2010 at 10:43 PM, Tristan Van Berkom > > I'm happy that this was so well received :) > > Maybe a decent property name alternative could be: >  "minimum-line-children"/"natural-line-children" > > "minimum-children-per-line" would fit the description > but seems to me absurdly long w

[Fwd: Re: Wrapping Box Container]

2010-08-27 Thread Tristan Van Berkom
Oops I sent this privately to Hans earlier without CCing the list. Forwarded Message From: Tristan Van Berkom To: Hans Breuer Subject: Re: Wrapping Box Container Date: Fri, 27 Aug 2010 11:53:53 +0900 On Tue, 2010-08-24 at 23:09 +0200, Hans Breuer wrote: > At 24.08.2010 20

Re: Wrapping Box Container

2010-08-26 Thread Tristan Van Berkom
On Tue, 2010-08-24 at 20:20 -0400, Matthias Clasen wrote: > On Tue, Aug 24, 2010 at 1:51 PM, Tristan Van Berkom > wrote: > > On Wed, 2010-08-25 at 02:42 +0900, Tristan Van Berkom wrote: > > [...] > >> PS: I've been trying to send this mail all day, at this point from > >> several email addresses..

Re: Wrapping Box Container

2010-08-24 Thread Matthias Clasen
On Tue, Aug 24, 2010 at 1:51 PM, Tristan Van Berkom wrote: > On Wed, 2010-08-25 at 02:42 +0900, Tristan Van Berkom wrote: > [...] >> PS: I've been trying to send this mail all day, at this point from >> several email addresses... I'm dropping the .tgz attachment and will >> follow up with another

Re: Wrapping Box Container

2010-08-24 Thread Hans Breuer
At 24.08.2010 20:31, Matthias Clasen wrote: On Tue, Aug 24, 2010 at 1:42 PM, Tristan Van Berkom wrote: Hi developers, Last week I was busy writing up a new container widget for GTK+ and would like to propose it for inclusion in 3.0. Hey, sounds like a useful addition. I've actually had it

Re: Wrapping Box Container

2010-08-24 Thread Matthias Clasen
On Tue, Aug 24, 2010 at 1:42 PM, Tristan Van Berkom wrote: > Hi developers, >  Last week I was busy writing up a new container > widget for GTK+ and would like to propose it for > inclusion in 3.0. Hey, sounds like a useful addition. I've actually had it somewhere deep on my todo list to look at

Re: Wrapping Box Container

2010-08-24 Thread Alberto Ruiz
I'm not even reading the whole email: +1 !!! :-) 2010/8/24 Tristan Van Berkom : > On Wed, 2010-08-25 at 02:42 +0900, Tristan Van Berkom wrote: > [...] >> PS: I've been trying to send this mail all day, at this point from >> several email addresses... I'm dropping the .tgz attachment and will >> fo

Re: Wrapping Box Container

2010-08-24 Thread Tristan Van Berkom
On Wed, 2010-08-25 at 02:42 +0900, Tristan Van Berkom wrote: [...] > PS: I've been trying to send this mail all day, at this point from > several email addresses... I'm dropping the .tgz attachment and will > follow up with another mail after uploading it somewhere if this email > does indeed hit t