Incorrect xfce_framebox_add() implementation
Brian J. Tarricone
bjt23 at cornell.edu
Wed Aug 31 08:56:11 CEST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Jeff Franks wrote:
> Brian J. Tarricone wrote:
>>Jeff Franks wrote:
>>>Another thing I've noticed about XfceFramebox is that I have no way of
>>>setting the frame text or indent without duplicating the entire code
>>>block in xfce_framebox_new(). I can provide a patch if you like that
>>>would make 'indent' a property, provide a text getter and setter and add
>>>the xfce_real_framebox_add() function (making XfceFramebox language
>>>binding friendly :-) ).
>>I'm not sure what the problem is... Why is it necessary to change indent
>>or label text after construction? XfceFramebox itself doesn't have that
>>functionality, so... Or am I missing something? (Probably.)
>>Otherwise, an 'indent' property sounds fine. Would it be best to have:
>>a) a 'label-text' property
>>b) getters/setters for the label text
> The problem is XFC implements its own type system that derives from the
> GTK type system, and in XFC's case, also Xfce4 types. Implementing XFC's
> type system requires a way construct each XFC object with a call to
> g_object_new(), not xfce_*_new(). Calling the 'new' function breaks the
> type system. Remember language bindings tend to be more object
> orientated than GTK.
> Implementing both the 'text' and 'indent' arguments as properties will
> solve the wrapping problem. Otherwise, I will have to duplicate the
> entire xfce_framebox_new() code block in the Xfce::Framebox constructor.
Understood. Ok, so that was a bit of a pain, but now
xfce_framebox_new() contains a call to g_object_new() and nothing else.
We have 'label' and 'indent' properties.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Xfce4-dev