[Glade-devel] [glade-3] pixmap properties



On Wed, 2004-05-12 at 21:27, J. Ali Harlow wrote:
On 2004.05.12 07:32 Damon Chaplin wrote:

But how is this going to work with the stuff like Undo/Redo that only
works with GValues?

I think we may need our own GladeValue wrapper that has a GValue and
extra data like pixmap filename/translatable flag/translator comments.
We'd then need to update all the code that works on GValues to expect
GladeValues instead.

Is there any better solution?

I haven't really been following what you're trying to do here so pardon
me if this is rubbish...

If all you want to do is pass around a GdkPixbuf plus "stuff" as a GValue
then can't you just register a new GBoxed type which contains the various
bits-n-pieces and use g_value_set_boxed() and friends. The whole point of
GValue is that it can hold any type of variable. You shouldn't need to
abstract it any further.

Yes, that is a possibility.

Though I think it would be more complex to implement than my idea.
You'd need to transform the custom GBoxed GValues into the GValues that
the widget expects for setting its properties.

Would we gain anything by using a GBoxed? I can't really think of
anything.

Damon






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]