Incorrect xfce_framebox_add() implementation
Jeff Franks
jcfranks at tpg.com.au
Wed Aug 31 07:32:48 CEST 2005
Brian J. Tarricone wrote:
>Jeff Franks wrote:
>
>
>>Brain,
>>
>>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
>c) both
>
>
>
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.
Jeff.
More information about the Xfce4-dev
mailing list