Re: 3.0 refactoring issues



On Wed, Oct 13, 2010 at 11:13 AM, Tristan Van Berkom
<tristanvb openismus com> wrote:
> On Sun, 2010-10-10 at 03:01 +0900, Tristan Van Berkom wrote:
>> On Sat, 2010-10-09 at 13:18 -0400, Matthias Clasen wrote:
>> > On Sat, Oct 9, 2010 at 2:56 AM, Tristan Van Berkom
>> [...]
>> > > And... please, please... if removing the expose completely
>> > > is acceptable... can we then go ahead and remove ->size_request()
>> > > as well ?
>> >
>> > That is a fair question, I'd say, and we should consider it. One
>> > question is how straightforward the conversion is.
>>
>> The conversion is as simple as:
>>
>>   a.) If you care about writing clean code, you break the request into
>>       two separate APIs get_preferred_width & get_preferred_height
>>
>>   b.) If you are in a hurry, you take your old size_request() vfunc
>>       and invoke it for both calls to
>>       get_preferred_width() & get_preferred_height()
>>
>> Option 'a' has the advantage of not calling the size_request twice
>> and running a few extra calculations during requests (which is what
>> happens now anyway for widgets that are not yet converted; ever since
>> we removed the ->requisition cache).
>>
>> All in all I'd say, much more straightforward than converting old
>> expose functions to use new cairo drawing APIs.

I've brought this up at todays meeting, and there was no big
opposition to the idea.
Of course, somebody has to do the work... Grepping my jhbuild tree for
->size_request
finds some 130 hits, 40 of which are in GTK3, so some patch-writing
will be required, I'll assist you, of course. Proposed plan:

1. nuke size-request in GTK+
2. deprecate size-request in 2.91.3 (we can't use #ifdef deprecation
for vfuncs, but maybe we can arrange things so that having a non-NULL
size_request vfunc will trigger a runtime warning)
3. write patches for the rest of gnome (at least the 'core' desktop)
4. remove size-request in 2.91.4

does that sound doable to you ?


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