Hello,
Sorry I may not explained well.

1. Check if you need to apply the change or not.
    If sd->wheel_disabled equals to disabled, you don't need to do anything.
So returns.
    This makes if statement simple :)
    See the differences below.

>> if (!sd->wheel_disabled == disabled) return;
>> if (disabled)
>>   xxx
>> else
>>   xxx

    is simpler and clearer than

>> if ((!sd->wheel_disabled) && (disabled))
>>   xxx
>> else if ((sd->wheel_disabled) && (!disabled))
>>   xxx

    So easy to understand. :)

2. I mean, use EINA_TRUE macro instead of 1, use EINA_FALSE macro instead of
0.
    1 ==> EINA_TRUE
    0 ==> EINA_FALSE

Thanks.
Daniel Juyung Seo (SeoZ)

On Thu, Apr 28, 2011 at 12:04 AM, sangho park <[email protected]> wrote:

> SeoZ,
>
> 1. you mean.. "if (sd->wheel_disabled == disabled) "?? not
> "!sd->wheel_disabled"
>    anyway.. i don't understand why you recommend this way. :(
>    if you okay, i want to not revise.
>
> 2. disabled is already Eina_Bool. why do i need to make 1 line code to 2
> lines?
>     if i follow your recommend, the code is like below.. right? is it
> worth?
>        "if (disabled) sd->wheel_disabled = EINA_TRUE;
>         else sd->wheel_disabled = EINA_FALSE; "
>
> Thanks.
>
>
> On Wed, Apr 27, 2011 at 11:43 PM, Daniel Juyung Seo 
> <[email protected]>wrote:
>
>> I'm ok with this concept.
>> Anybody else has a comment?
>>
>> Let me give two comments.
>>
>> 1. How about checking sd->weel_disabled and disabled first.
>>     Genlist does this :) If you don't like it, never mind.
>>
>>     if (!sd->wheel_disabled == disabled) return;
>>     if (disabled)
>>       xxxxxx
>>     else
>>       xxxxxx
>>
>> 2. Use EINA_TRUE/FALSE for Eina_Bool.
>>     I think bounce_animator, momentum_animator also have to be changed :)
>>
>>     sd->wheel_disabled = EINA_FALSE;
>>
>> Otherwise looks ok.
>> Thanks.
>>
>> Daniel Juyung Seo (SeoZ)
>>
>> On Wed, Apr 27, 2011 at 9:51 AM, sangho park <[email protected]> wrote:
>>
>>> Dear all,
>>>
>>> this patch is for enable / disable the default els_scroller's wheel
>>> control.
>>>
>>> when I use elm_map, map's default wheel control means zoom in / out.
>>> so enable / disable els_scroller's default wheel control feature is
>>> needed.
>>>
>>> map is also needed enable / disable default wheel control.
>>> if you review this patch, I'll apply elm_map at next time.
>>>
>>> Thanks.
>>> BR.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> WhatsUp Gold - Download Free Network Management Software
>>> The most intuitive, comprehensive, and cost-effective network
>>> management toolset available today.  Delivers lowest initial
>>> acquisition cost and overall TCO of any competing solution.
>>> http://p.sf.net/sfu/whatsupgold-sd
>>> _______________________________________________
>>> enlightenment-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>>
>>>
>>
>
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to