[E-devel] Build on Windows

2011-07-08 Thread cnook
Dear Mr. Vincent Torri,

When I have tried to build Eina (rev: 61152) on Windows, an error occurs as
bellow.

eina_inline_lock_win32.x:344:21: error: 'x' undeclared (first use in this
function)


Sincerely,
Shinwoo Kim.
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][Evil] evil_string has strcasestr

2011-06-30 Thread cnook
Hi :-]

Your review comments in the attached patch.
Thanks for your response always.

Sincerely,
Shinwoo Kim.

2011/6/29 Vincent Torri 

>
>
> On Wed, 29 Jun 2011, cnook wrote:
>
>  Oh I see, I got the point. Thanks for your response.
>>
>> Wherever the strcasestr() is used using previous patch, would be changed
>> as
>> bellow.
>>
>> #ifdef HAVE_STRCASESTR
>> strcase(h, n);
>> #else
>> _elm_util_strcasestr(h, n);
>> #endif
>>
>
> better:
>
> #ifdef HAVE_STRCASESTR
> # define _elm_util_strcasestr(h, n) strcase((h), (n))
> #endif
>
> and always use _elm_util_strcasestr() instead of strcasestr()
>
> Vincent
>
>
>> Anyhow, I have refined the previous patch and attached.
>> Then, wherever the strcasestr() is used, should be changed just as bellow
>>
>> _elm_util_strcasestr(h, n);
>>
>>
>> Sincerely,
>> Shinwoo Kim.
>>
>>
>> 2011/6/29 Vincent Torri 
>>
>>
>>> what he means is:
>>>
>>>  * using AC_CHECK_FUNCS([strcasestr]) in configure.ac defined
>>> HAVE_STRCASESTR in config.h
>>>  * in the code, you use the macro HAVE_STRCASESTR to use the glibc
>>> version
>>> of strcase, or to use your own version
>>>
>>> Vincent
>>>
>>>
>>> On Wed, 29 Jun 2011, cnook wrote:
>>>
>>>  Hi
>>>
>>>>
>>>> Thanks for your response.
>>>> I have no enough idea when it comes to E16.
>>>> Actually this patch comes because of the Evil Windows environments -
>>>> strcasestr does not exist.
>>>> If strcasestr alternative - Estrcasestr - is on the E16, Should I
>>>> install
>>>> the E16 also or not?
>>>>
>>>> Sincerely,
>>>> Shinwoo Kim.
>>>>
>>>>
>>>> 2011/6/29 Hyoyoung Chang 
>>>>
>>>>  I think it's a nice patch if glibc's strcasestr can be used
>>>>
>>>>>
>>>>> How about to add statements like below?
>>>>>
>>>>> #ifdef HAVE_STRCASESTR
>>>>> #define Estrcasestr(haystack, needle) strcasestr(haystack, needle)
>>>>> #else
>>>>> const char *Estrcasestr(const char *haystack, const char
>>>>> *needle);
>>>>> #endif
>>>>>
>>>>> In E16/e/src/util.h
>>>>>
>>>>>
>>>>>
>>>>>  From: cnook [mailto:kimci...@gmail.com]
>>>>>
>>>>>> Sent: Tuesday, June 28, 2011 3:58 PM
>>>>>> To: Hyoyoung Chang
>>>>>> Cc: Daniel Juyung Seo; 
>>>>>> enlightenment-devel@lists.**so**urceforge.net<http://sourceforge.net>
>>>>>> 
>>>>>> >
>>>>>>
>>>>>> Subject: Re: [E-devel] [Patch][Evil] evil_string has strcasestr
>>>>>>
>>>>>> Dear All,
>>>>>>
>>>>>> Hi~
>>>>>> Here is the patch added on the elementary. :-]
>>>>>>
>>>>>> Sincerely,
>>>>>> Shinwoo Kim.
>>>>>> 2011/6/22 Hyoyoung Chang 
>>>>>> As I know strcasestr is not standard function.
>>>>>> It's a glibc extension.
>>>>>>
>>>>>> CONFORMING TO
>>>>>> The  strstr() function conforms to C89 and C99.  The strcasestr()
>>>>>> funcÿÿ
>>>>>>
>>>>>> tion is a nonstandard extension.
>>>>>> -- man page of strcasestr
>>>>>>
>>>>>> Is it only used in elementary? If then how about add to check routine
>>>>>> in
>>>>>> configure and add in elm_util.c?
>>>>>> Or is it widely used in e project, it can be added in other module.
>>>>>>
>>>>>> PS. I google about strcasestr. It's contained in LSB 3.1
>>>>>>
>>>>>>
>>>>>>  http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-**
>>>>>>
>>>>> generic/LSB-Core-generi>>>> LSB_3.1.1/LSB-Core-generic/**LSB-Core-generi<http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generi>
>>>>> >
>>>>>
>>>>>  c/baselib-strcasestr.html
>>>>>>
>>>>>>
>>>>>>  -Original Message-
>>>

Re: [E-devel] [Patch][Evil] evil_string has strcasestr

2011-06-29 Thread cnook
Oh I see, I got the point. Thanks for your response.

Wherever the strcasestr() is used using previous patch, would be changed as
bellow.

#ifdef HAVE_STRCASESTR
strcase(h, n);
#else
_elm_util_strcasestr(h, n);
#endif

Anyhow, I have refined the previous patch and attached.
Then, wherever the strcasestr() is used, should be changed just as bellow

_elm_util_strcasestr(h, n);


Sincerely,
Shinwoo Kim.


2011/6/29 Vincent Torri 

>
> what he means is:
>
>  * using AC_CHECK_FUNCS([strcasestr]) in configure.ac defined
> HAVE_STRCASESTR in config.h
>  * in the code, you use the macro HAVE_STRCASESTR to use the glibc version
> of strcase, or to use your own version
>
> Vincent
>
>
> On Wed, 29 Jun 2011, cnook wrote:
>
>  Hi
>>
>> Thanks for your response.
>> I have no enough idea when it comes to E16.
>> Actually this patch comes because of the Evil Windows environments -
>> strcasestr does not exist.
>> If strcasestr alternative - Estrcasestr - is on the E16, Should I install
>> the E16 also or not?
>>
>> Sincerely,
>> Shinwoo Kim.
>>
>>
>> 2011/6/29 Hyoyoung Chang 
>>
>>  I think it's a nice patch if glibc's strcasestr can be used
>>>
>>> How about to add statements like below?
>>>
>>> #ifdef HAVE_STRCASESTR
>>> #define Estrcasestr(haystack, needle) strcasestr(haystack, needle)
>>> #else
>>> const char *Estrcasestr(const char *haystack, const char
>>> *needle);
>>> #endif
>>>
>>> In E16/e/src/util.h
>>>
>>>
>>>
>>>  From: cnook [mailto:kimci...@gmail.com]
>>>> Sent: Tuesday, June 28, 2011 3:58 PM
>>>> To: Hyoyoung Chang
>>>> Cc: Daniel Juyung Seo; 
>>>> enlightenment-devel@lists.**sourceforge.net
>>>> Subject: Re: [E-devel] [Patch][Evil] evil_string has strcasestr
>>>>
>>>> Dear All,
>>>>
>>>> Hi~
>>>> Here is the patch added on the elementary. :-]
>>>>
>>>> Sincerely,
>>>> Shinwoo Kim.
>>>> 2011/6/22 Hyoyoung Chang 
>>>> As I know strcasestr is not standard function.
>>>> It's a glibc extension.
>>>>
>>>> CONFORMING TO
>>>>  The  strstr() function conforms to C89 and C99.  The strcasestr()
>>>> funcÿÿ
>>>>
>>>>  tion is a nonstandard extension.
>>>> -- man page of strcasestr
>>>>
>>>> Is it only used in elementary? If then how about add to check routine in
>>>> configure and add in elm_util.c?
>>>> Or is it widely used in e project, it can be added in other module.
>>>>
>>>> PS. I google about strcasestr. It's contained in LSB 3.1
>>>>
>>>>
>>>>  http://refspecs.freestandards.**org/LSB_3.1.1/LSB-Core-**
>>> generic/LSB-Core-generi<http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generi>
>>>
>>>> c/baselib-strcasestr.html
>>>>
>>>>
>>>>  -Original Message-
>>>>> From: cnook [mailto:kimci...@gmail.com]
>>>>> Sent: Wednesday, June 22, 2011 5:56 PM
>>>>> To: Daniel Juyung Seo
>>>>> Cc: 
>>>>> enlightenment-devel@lists.**sourceforge.net
>>>>> Subject: Re: [E-devel] [Patch][Evil] evil_string has strcasestr
>>>>>
>>>>> Dear Mr. Daniel,
>>>>>
>>>>> Thanks your response :-]
>>>>> Initially, I had added this to the elm_entry in downstream(?), but a
>>>>> reviewer does not prefer it in the elm_entry.
>>>>> Then how about add this somewhere in Elementary?
>>>>> um... btw... why I added this to Evil module is.. there is no
>>>>>
>>>> strcasestr
>>>
>>>> on
>>>>> MinGW Env. only.
>>>>>
>>>>>
>>>>> Sincerely,
>>>>> Shinwoo Kim.
>>>>>
>>>>>
>>>>> 2011/6/22 Daniel Juyung Seo 
>>>>>
>>>>>  Well..
>>>>>> Dear Shinwoo Kim,
>>>>>> According to vtorri's comment, you can merge this patch and another
>>>>>> patch that uses this feature.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Daniel Juyung Seo (SeoZ)
>>>>>>
>>>>>> On Wed, Jun 22, 2011 at 4:53 PM, Vincent Torri 
>>>>>> wrote:
>

Re: [E-devel] [Patch][Evil] evil_string has strcasestr

2011-06-28 Thread cnook
Hi

Thanks for your response.
I have no enough idea when it comes to E16.
Actually this patch comes because of the Evil Windows environments -
strcasestr does not exist.
If strcasestr alternative - Estrcasestr - is on the E16, Should I install
the E16 also or not?

Sincerely,
Shinwoo Kim.


2011/6/29 Hyoyoung Chang 

> I think it's a nice patch if glibc's strcasestr can be used
>
> How about to add statements like below?
>
> #ifdef HAVE_STRCASESTR
> #define Estrcasestr(haystack, needle) strcasestr(haystack, needle)
> #else
> const char *Estrcasestr(const char *haystack, const char *needle);
> #endif
>
> In E16/e/src/util.h
>
>
>
> > From: cnook [mailto:kimci...@gmail.com]
> > Sent: Tuesday, June 28, 2011 3:58 PM
> > To: Hyoyoung Chang
> > Cc: Daniel Juyung Seo; enlightenment-devel@lists.sourceforge.net
> > Subject: Re: [E-devel] [Patch][Evil] evil_string has strcasestr
> >
> > Dear All,
> >
> > Hi~
> > Here is the patch added on the elementary. :-]
> >
> > Sincerely,
> > Shinwoo Kim.
> > 2011/6/22 Hyoyoung Chang 
> > As I know strcasestr is not standard function.
> > It's a glibc extension.
> >
> > CONFORMING TO
> >   The  strstr() function conforms to C89 and C99.  The strcasestr()
> > func‐
> >   tion is a nonstandard extension.
> > -- man page of strcasestr
> >
> > Is it only used in elementary? If then how about add to check routine in
> > configure and add in elm_util.c?
> > Or is it widely used in e project, it can be added in other module.
> >
> > PS. I google about strcasestr. It's contained in LSB 3.1
> >
> >
> http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generi
> > c/baselib-strcasestr.html
> >
> >
> > > -Original Message-
> > > From: cnook [mailto:kimci...@gmail.com]
> > > Sent: Wednesday, June 22, 2011 5:56 PM
> > > To: Daniel Juyung Seo
> > > Cc: enlightenment-devel@lists.sourceforge.net
> > > Subject: Re: [E-devel] [Patch][Evil] evil_string has strcasestr
> > >
> > > Dear Mr. Daniel,
> > >
> > > Thanks your response :-]
> > > Initially, I had added this to the elm_entry in downstream(?), but a
> > > reviewer does not prefer it in the elm_entry.
> > > Then how about add this somewhere in Elementary?
> > > um... btw... why I added this to Evil module is.. there is no
> strcasestr
> > > on
> > > MinGW Env. only.
> > >
> > >
> > > Sincerely,
> > > Shinwoo Kim.
> > >
> > >
> > > 2011/6/22 Daniel Juyung Seo 
> > >
> > > > Well..
> > > > Dear Shinwoo Kim,
> > > > According to vtorri's comment, you can merge this patch and another
> > > > patch that uses this feature.
> > > >
> > > > Thanks.
> > > >
> > > > Daniel Juyung Seo (SeoZ)
> > > >
> > > > On Wed, Jun 22, 2011 at 4:53 PM, Vincent Torri 
> > > > wrote:
> > > > >
> > > > >
> > > > > On Wed, 22 Jun 2011, cnook wrote:
> > > > >
> > > > >> Thanks for your response.
> > > > >> There is a possibility in newly made elementary widget.
> > > > >> So far, no one have used strcasestr in upstream.
> > > > >
> > > > > i won't add functions if they are not needed. Evil is minimalist
> and
> > > must
> > > > > remain like that. If strcasestr is needed, it will be added.
> > > > >
> > > > > Vincent
> > > > >
> > > > >>
> > > > >> Sincerely,
> > > > >> Shinwoo Kim.
> > > > >>
> > > > >> 2011/6/22 Vincent Torri 
> > > > >>
> > > > >>>
> > > > >>> Hey
> > > > >>>
> > > > >>>
> > > > >>>  There is no strcasestr() on MinGW Env.
> > > > >>>> So this patch comes.. Please review the attached one.
> > > > >>>>
> > > > >>>
> > > > >>> where is strcasestr used ?
> > > > >>>
> > > > >>> Vincent
> > > > >>>
> > > > >>
> > > > >
> > > > >
> > > >
> 
> > > 

Re: [E-devel] [Patch][Evil] evil_string has strcasestr

2011-06-27 Thread cnook
Dear All,

Hi~
Here is the patch added on the elementary. :-]

Sincerely,
Shinwoo Kim.

2011/6/22 Hyoyoung Chang 

> As I know strcasestr is not standard function.
> It's a glibc extension.
>
> CONFORMING TO
>   The  strstr() function conforms to C89 and C99.  The strcasestr()
> func‐
>   tion is a nonstandard extension.
> -- man page of strcasestr
>
> Is it only used in elementary? If then how about add to check routine in
> configure and add in elm_util.c?
> Or is it widely used in e project, it can be added in other module.
>
> PS. I google about strcasestr. It's contained in LSB 3.1
>
>
> http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generi
> c/baselib-strcasestr.html
>
>
> > -Original Message-
> > From: cnook [mailto:kimci...@gmail.com]
> > Sent: Wednesday, June 22, 2011 5:56 PM
> > To: Daniel Juyung Seo
> > Cc: enlightenment-devel@lists.sourceforge.net
> > Subject: Re: [E-devel] [Patch][Evil] evil_string has strcasestr
> >
> > Dear Mr. Daniel,
> >
> > Thanks your response :-]
> > Initially, I had added this to the elm_entry in downstream(?), but a
> > reviewer does not prefer it in the elm_entry.
> > Then how about add this somewhere in Elementary?
> > um... btw... why I added this to Evil module is.. there is no strcasestr
> > on
> > MinGW Env. only.
> >
> >
> > Sincerely,
> > Shinwoo Kim.
> >
> >
> > 2011/6/22 Daniel Juyung Seo 
> >
> > > Well..
> > > Dear Shinwoo Kim,
> > > According to vtorri's comment, you can merge this patch and another
> > > patch that uses this feature.
> > >
> > > Thanks.
> > >
> > > Daniel Juyung Seo (SeoZ)
> > >
> > > On Wed, Jun 22, 2011 at 4:53 PM, Vincent Torri 
> > > wrote:
> > > >
> > > >
> > > > On Wed, 22 Jun 2011, cnook wrote:
> > > >
> > > >> Thanks for your response.
> > > >> There is a possibility in newly made elementary widget.
> > > >> So far, no one have used strcasestr in upstream.
> > > >
> > > > i won't add functions if they are not needed. Evil is minimalist and
> > must
> > > > remain like that. If strcasestr is needed, it will be added.
> > > >
> > > > Vincent
> > > >
> > > >>
> > > >> Sincerely,
> > > >> Shinwoo Kim.
> > > >>
> > > >> 2011/6/22 Vincent Torri 
> > > >>
> > > >>>
> > > >>> Hey
> > > >>>
> > > >>>
> > > >>>  There is no strcasestr() on MinGW Env.
> > > >>>> So this patch comes.. Please review the attached one.
> > > >>>>
> > > >>>
> > > >>> where is strcasestr used ?
> > > >>>
> > > >>> Vincent
> > > >>>
> > > >>
> > > >
> > > >
> > >
> 
> > --
> > > > Simplify data backup and recovery for your virtual environment with
> > > vRanger.
> > > > Installation's a snap, and flexible recovery options mean your data
> is
> > > safe,
> > > > secure and there when you need it. Data protection magic?
> > > > Nope - It's vRanger. Get your free trial download today.
> > > > http://p.sf.net/sfu/quest-sfdev2dev
> > > > ___
> > > > enlightenment-devel mailing list
> > > > enlightenment-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > > >
> > >
> >
> --
> > 
> > Simplify data backup and recovery for your virtual environment with
> > vRanger.
> > Installation's a snap, and flexible recovery options mean your data is
> > safe,
> > secure and there when you need it. Data protection magic?
> > Nope - It's vRanger. Get your free trial download today.
> > http://p.sf.net/sfu/quest-sfdev2dev
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
Index: 

Re: [E-devel] [Patch][elm_conform] add del_pre_hook for removing handler

2011-06-27 Thread cnook
Hi Mr. Hermet,

I got your point, and have attached new patch based on your review comments.

Sincerely,
Shinwoo Kim.

2011년 6월 27일 오후 4:37, ChunEon Park 님의 말:

>  hi cnook, good patch.
>
>
>
> But it looks it does not need to deleted event callbacks in pre_hook except
> ecore event handler.
>
>
>
> They will be deleted evas internally.
>
>
>
> Thanks.
>
>
>
> -Original Message-
> *From:* "cnook"
> *To:* enlightenment-devel@lists.sourceforge.net
> *Cc:*
> *Sent:* 11-06-27(월) 14:19:14
> *Subject:* [E-devel] [Patch][elm_conform] add del_pre_hook for removing
> handlerDear All,
>
> Hello,
> I have got elm_confrom does not remove its handler while it is deleted.
> This patch is for that. Please review attached patch. Thanks always.
>
> Sincerely,
> Shinwoo Kim.
>
Index: src/lib/elm_conform.c
===
--- src/lib/elm_conform.c	(revision 60713)
+++ src/lib/elm_conform.c	(working copy)
@@ -51,6 +51,7 @@
 
 /* local function prototypes */
 static const char *widtype = NULL;
+static void _del_pre_hook(Evas_Object *obj);
 static void _del_hook(Evas_Object *obj);
 static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
 static void _theme_hook(Evas_Object *obj);
@@ -73,6 +74,16 @@
 
 /* local functions */
 static void
+_del_pre_hook(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+#ifdef HAVE_ELEMENTARY_X
+   if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
+#endif
+}
+
+static void
 _del_hook(Evas_Object *obj)
 {
Widget_Data *wd = elm_widget_data_get(obj);
@@ -454,6 +465,7 @@
elm_widget_type_set(obj, "conformant");
elm_widget_sub_object_add(parent, obj);
elm_widget_data_set(obj, wd);
+   elm_widget_del_pre_hook_set(obj, _del_pre_hook);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch][elm_conform] add del_pre_hook for removing handler

2011-06-26 Thread cnook
Dear All,

Hello,
I have got elm_confrom does not remove its handler while it is deleted.
This patch is for that. Please review attached patch. Thanks always.

Sincerely,
Shinwoo Kim.
Index: src/lib/elm_conform.c
===
--- src/lib/elm_conform.c	(revision 60713)
+++ src/lib/elm_conform.c	(working copy)
@@ -51,6 +51,7 @@
 
 /* local function prototypes */
 static const char *widtype = NULL;
+static void _del_pre_hook(Evas_Object *obj);
 static void _del_hook(Evas_Object *obj);
 static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
 static void _theme_hook(Evas_Object *obj);
@@ -73,6 +74,18 @@
 
 /* local functions */
 static void
+_del_pre_hook(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+#ifdef HAVE_ELEMENTARY_X
+   if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
+#endif
+   evas_object_event_callback_del_full(obj, EVAS_CALLBACK_RESIZE, _conformant_move_resize_event_cb, obj);
+   evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOVE, _conformant_move_resize_event_cb, obj);
+}
+
+static void
 _del_hook(Evas_Object *obj)
 {
Widget_Data *wd = elm_widget_data_get(obj);
@@ -454,6 +467,7 @@
elm_widget_type_set(obj, "conformant");
elm_widget_sub_object_add(parent, obj);
elm_widget_data_set(obj, wd);
+   elm_widget_del_pre_hook_set(obj, _del_pre_hook);
elm_widget_del_hook_set(obj, _del_hook);
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_can_focus_set(obj, EINA_FALSE);
--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][elm_conform]

2011-06-22 Thread cnook
Hi!
Thanks for your response. The patch have been refined and attached.
I have moved MOVE,RESIZE callback handling to elm_conformant_add() from
_prop_change().

Sincerely,
Shinwoo Kim.


2011/6/20 Carsten Haitzler 

> On Thu, 16 Jun 2011 18:43:09 +0900 cnook  said:
>
> > Dear All,
> >
> > Hello~
> >
> > When the indicator is displayed initially and use elm_confrom as parent
> by
> > using elm_conformant_content_area_get, the indicator area (wd->shelf)
> does
> > not display properly.
> > Because any interested ECORE_X_EVENT_WINDOW_PROPERTY does not notify.
> > In this case, we have got to evaluate size, when EVAS_CALLBACK_RESIZE
> > occurs.
>
> hmmm i see a problem. you add the resize callback (technically you should
> do it
> on BOTH a move AND), but you dont remove the callbacks added once the
> illume
> zone property change event comes in so we have this being called multiple
> times. maybe you want to just add the move and resize callback handling on
> widget create (like you do with resize alone) and remove the code that adds
> the
> event handlers in _prop_change() ?
>
> > And I have a query...
> > When the event with ECORE_X_ATOM_E_ILLUME_ZONE occurs?
>
> e sets this property on the client window itself. this property has in it
> the
> window id that contains zone information (different screens looking at the
> same
> root window will see different "zones"). this property is SET when the
> illume
> policy get a border add (thus letting the app be able to know where to get
> zone
> info). it will happen after a map request by a client then, so when the app
> sees the prop change it knows the wm has now managed it and told it where
> to
> find zone info so it can get indicator and other info correctly for that
> zone.
>
> see policy.c from the illume2 module. ecore_x_e_illume_zone_set(0 sets the
> prop
> on the client window. :)
>
> >
> > Sincerely,
> > Shinwoo Kim.
>
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)ras...@rasterman.com
>
>
Index: src/lib/elm_conform.c
===
--- src/lib/elm_conform.c	(revision 60611)
+++ src/lib/elm_conform.c	(working copy)
@@ -24,8 +24,8 @@
Evas_Object *shelf, *panel, *virtualkeypad;
Evas_Object *content;
Evas_Object *scroller;
+#ifdef HAVE_ELEMENTARY_X
Ecore_Event_Handler *prop_hdl;
-#ifdef HAVE_ELEMENTARY_X
Ecore_X_Virtual_Keyboard_State vkb_state;
 #endif
struct
@@ -51,6 +51,7 @@
 
 /* local function prototypes */
 static const char *widtype = NULL;
+static void _del_pre_hook(Evas_Object *obj);
 static void _del_hook(Evas_Object *obj);
 static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
 static void _theme_hook(Evas_Object *obj);
@@ -65,17 +66,31 @@
 static void _conformant_part_sizing_eval(Evas_Object *obj,
  Conformant_Part_Type part_type);
 #endif
+static void
+_conformant_move_resize_event_cb(void *data, Evas *e, Evas_Object *obj,
+ void *event_info);
 static void _sizing_eval(Evas_Object *obj);
 static Eina_Bool _prop_change(void *data, int type, void *event);
 
 /* local functions */
 static void
+_del_pre_hook(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+#ifdef HAVE_ELEMENTARY_X
+   if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
+#endif
+   evas_object_event_callback_del_full(obj, EVAS_CALLBACK_RESIZE, _conformant_move_resize_event_cb, obj);
+   evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOVE, _conformant_move_resize_event_cb, obj);
+}
+
+static void
 _del_hook(Evas_Object *obj)
 {
Widget_Data *wd = elm_widget_data_get(obj);
 
if (!wd) return;
-   if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
free(wd);
 }
 
@@ -404,10 +419,6 @@
   ELM_CONFORM_SOFTKEY_PART |
   ELM_CONFORM_VIRTUAL_KEYPAD_PART);
 _conformant_part_sizing_eval(data, part_type);
-evas_object_event_callback_add(data, EVAS_CALLBACK_RESIZE,
-   _conformant_move_resize_event_cb, data);
-evas_object_event_callback_add(data, EVAS_CALLBACK_MOVE,
-   _conformant_move_resize_event_cb, data);
  }
else if (ev->atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY)
  _conformant_part_sizing_eval(data, ELM_CONFORM_INDICATOR_PART);
@@ -479,6 +490,10 @@
 #endif
 
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
+   evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
+  

Re: [E-devel] [Patch][Evil] evil_string has strcasestr

2011-06-22 Thread cnook
Dear Mr. Daniel,

Thanks your response :-]
Initially, I had added this to the elm_entry in downstream(?), but a
reviewer does not prefer it in the elm_entry.
Then how about add this somewhere in Elementary?
um... btw... why I added this to Evil module is.. there is no strcasestr on
MinGW Env. only.


Sincerely,
Shinwoo Kim.


2011/6/22 Daniel Juyung Seo 

> Well..
> Dear Shinwoo Kim,
> According to vtorri's comment, you can merge this patch and another
> patch that uses this feature.
>
> Thanks.
>
> Daniel Juyung Seo (SeoZ)
>
> On Wed, Jun 22, 2011 at 4:53 PM, Vincent Torri 
> wrote:
> >
> >
> > On Wed, 22 Jun 2011, cnook wrote:
> >
> >> Thanks for your response.
> >> There is a possibility in newly made elementary widget.
> >> So far, no one have used strcasestr in upstream.
> >
> > i won't add functions if they are not needed. Evil is minimalist and must
> > remain like that. If strcasestr is needed, it will be added.
> >
> > Vincent
> >
> >>
> >> Sincerely,
> >> Shinwoo Kim.
> >>
> >> 2011/6/22 Vincent Torri 
> >>
> >>>
> >>> Hey
> >>>
> >>>
> >>>  There is no strcasestr() on MinGW Env.
> >>>> So this patch comes.. Please review the attached one.
> >>>>
> >>>
> >>> where is strcasestr used ?
> >>>
> >>> Vincent
> >>>
> >>
> >
> >
> --
> > Simplify data backup and recovery for your virtual environment with
> vRanger.
> > Installation's a snap, and flexible recovery options mean your data is
> safe,
> > secure and there when you need it. Data protection magic?
> > Nope - It's vRanger. Get your free trial download today.
> > http://p.sf.net/sfu/quest-sfdev2dev
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][Evil] add some variables on evil_langinfo

2011-06-22 Thread cnook
Head of each file gives...

"This file has no copyright assinged and is placed in the Public Domain.
No warranty is given; refer to the file DISCLAIMER within mingw-runtime
package."

Then, we can use it?
Anyhow, I'm not sure this library(mingw-langinfo) works properly or not.


Sincerely,
Shinwoo Kim.



2011/6/22 Vincent Torri 

>
>
> On Wed, 22 Jun 2011, cnook wrote:
>
>  Means..
>> How about install the mingw-langifo instead of using evil_langinfo?
>>
>
> what is the licence of mingw-langinfo ?
>
> Vincent
>
>
>
>> Sincerely,
>> Shinwoo Kim.
>>
>> 2011/6/22 Vincent Torri 
>>
>>
>>>
>>> On Wed, 22 Jun 2011, cnook wrote:
>>>
>>>  Dear Mr. Vincent,
>>>
>>>>
>>>> Thanks for your response.
>>>> Actually I refer to the previous version mingw-langinfo-0.1.
>>>> Anyhow why don't you use the reference tar ball as other dependent
>>>> modules(that is, libcurl, libgcrypt, and so on)?
>>>>
>>>>
>>> sorry, i don't understand the question
>>>
>>> Vincent
>>>
>>>
>>
--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][Evil] add some variables on evil_langinfo

2011-06-22 Thread cnook
Means..
How about install the mingw-langifo instead of using evil_langinfo?

Sincerely,
Shinwoo Kim.

2011/6/22 Vincent Torri 

>
>
> On Wed, 22 Jun 2011, cnook wrote:
>
>  Dear Mr. Vincent,
>>
>> Thanks for your response.
>> Actually I refer to the previous version mingw-langinfo-0.1.
>> Anyhow why don't you use the reference tar ball as other dependent
>> modules(that is, libcurl, libgcrypt, and so on)?
>>
>
> sorry, i don't understand the question
>
> Vincent
>
--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][Evil] evil_string has strcasestr

2011-06-22 Thread cnook
Thanks for your response.
There is a possibility in newly made elementary widget.
So far, no one have used strcasestr in upstream.

Sincerely,
Shinwoo Kim.

2011/6/22 Vincent Torri 

>
> Hey
>
>
>  There is no strcasestr() on MinGW Env.
>> So this patch comes.. Please review the attached one.
>>
>
> where is strcasestr used ?
>
> Vincent
>
--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch][Evil] evil_string has strcasestr

2011-06-21 Thread cnook
Hi All,

There is no strcasestr() on MinGW Env.
So this patch comes.. Please review the attached one.

Sincerely,
Shinwoo Kim.
Index: src/lib/evil_string.c
===
--- src/lib/evil_string.c	(revision 60564)
+++ src/lib/evil_string.c	(working copy)
@@ -3,8 +3,8 @@
 #endif /* HAVE_CONFIG_H */
 
 #include "Evil.h"
+#include 
 
-
 #ifdef _WIN32_WCE
 
 /*
@@ -84,6 +84,31 @@
   return ret;
 }
 
+char *
+strcasestr (char *h, char *n)
+{
+   char *a, *e;
+   a = h;
+   e = n;
+
+   if (!h || !*h || !n ||!*n) return 0;
+   while (*a && *e)
+ {
+if(toupper((unsigned char) *a) != toupper((unsigned char) *e))
+  {
+ ++h;
+ a = h;
+ e = n;
+  }
+else
+  {
+ ++a;
+ ++e;
+  }
+ }
+   return *e ? 0 : h;
+} 
+
 #ifdef _MSC_VER
 
 int strcasecmp(const char *s1, const char *s2)
Index: src/lib/evil_string.h
===
--- src/lib/evil_string.h	(revision 60564)
+++ src/lib/evil_string.h	(working copy)
@@ -103,6 +103,11 @@
  */
 EAPI char *strrstr (const char *str, const char *substr);
 
+/**
+ * @brief Similar to 'strstr' but this function ignores the case of both strings. 
+ */
+EAPI char *strcasestr (char *str, char *substr);
+
 #ifdef _MSC_VER
 
 EAPI int strcasecmp(const char *s1, const char *s2);
--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][Evil] add some variables on evil_langinfo

2011-06-21 Thread cnook
Dear Mr. Vincent,

Thanks for your response.
Actually I refer to the previous version mingw-langinfo-0.1.
Anyhow why don't you use the reference tar ball as other dependent
modules(that is, libcurl, libgcrypt, and so on)?

Sincerely,
Shinwoo Kim.


2011/6/20 Vincent Torri 

>
> Hey
>
>
> On Fri, 17 Jun 2011, cnook wrote:
>
>  Dear All,
>>
>> Hello~
>> I add some enumeration variables for building on Windows.
>>
>> And.. One question,
>> nl_langinfo(CODESET) gives return value properly on MinGW?
>>
>
> nl_langinfo is not defined on Windows. I never really tested that code...
> Note that there is a code in public domain here :
>
> http://snaury.narod.ru/mingw-**langinfo-0.1b.tar.bz2<http://snaury.narod.ru/mingw-langinfo-0.1b.tar.bz2>
>
> found in that mingw thread:
>
> http://comments.gmane.org/**gmane.comp.gnu.mingw.user/**16568<http://comments.gmane.org/gmane.comp.gnu.mingw.user/16568>
>
> maybe it can help
>
> cheers
>
> Vincent
>
--
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch][Evil] add some variables on evil_langinfo

2011-06-17 Thread cnook
Dear All,

Hello~
I add some enumeration variables for building on Windows.

And.. One question,
nl_langinfo(CODESET) gives return value properly on MinGW?


Sincerely,
Shinwoo Kim.
Index: src/lib/evil_langinfo.c
===
--- src/lib/evil_langinfo.c	(revision 60423)
+++ src/lib/evil_langinfo.c	(working copy)
@@ -8,6 +8,12 @@
 #ifndef __MINGW32CE__
 
 static char *
+__nl_get_time_item(nl_item __item)
+{
+   return NULL;
+}
+
+static char *
 replace(char *prev, char *value)
 {
if (!value)
@@ -48,6 +54,12 @@
 }
  }
 
+   if (index > __NL_LANGINFO_TIME_FIRST && index < __NL_LANGINFO_TIME_LAST)
+ {
+result = __nl_get_time_item(index);
+if (result) return result;
+ }
+
return nothing;
 }
 
Index: src/lib/evil_langinfo.h
===
--- src/lib/evil_langinfo.h	(revision 60423)
+++ src/lib/evil_langinfo.h	(working copy)
@@ -21,6 +21,24 @@
   _NL_CTYPE_CODESET = __NL_ITEM( LC_CTYPE, 0 ),
   _NL_NUMERIC_RADIXCHAR = __NL_ITEM( LC_NUMERIC, 0 ),
 
+  __NL_LANGINFO_TIME_FIRST,
+  ABMON_1,
+  ABMON_2,
+  ABMON_3,
+  ABMON_4,
+  ABMON_5,
+  ABMON_6,
+  ABMON_7,
+  ABMON_8,
+  ABMON_9,
+  ABMON_10,
+  ABMON_11,
+  ABMON_12,
+  AM_STR,
+  PM_STR,
+  D_FMT,
+  __NL_LANGINFO_TIME_LAST,
+
   /*
* Dummy entry, to terminate the list.
*/
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][elm_conform] resolve issue when it comes to elm_conformant_content_area

2011-06-16 Thread cnook
Only add a subject.. :-]

2011/6/16 cnook 

>
> Dear All,
>
> Hello~
>
> When the indicator is displayed initially and use elm_confrom as parent by
> using elm_conformant_content_area_get, the indicator area (wd->shelf) does
> not display properly.
> Because any interested ECORE_X_EVENT_WINDOW_PROPERTY does not notify.
> In this case, we have got to evaluate size, when EVAS_CALLBACK_RESIZE
> occurs.
>
> And I have a query...
> When the event with ECORE_X_ATOM_E_ILLUME_ZONE occurs?
>
> Sincerely,
> Shinwoo Kim.
>
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch][elm_conform]

2011-06-16 Thread cnook
Dear All,

Hello~

When the indicator is displayed initially and use elm_confrom as parent by
using elm_conformant_content_area_get, the indicator area (wd->shelf) does
not display properly.
Because any interested ECORE_X_EVENT_WINDOW_PROPERTY does not notify.
In this case, we have got to evaluate size, when EVAS_CALLBACK_RESIZE
occurs.

And I have a query...
When the event with ECORE_X_ATOM_E_ILLUME_ZONE occurs?

Sincerely,
Shinwoo Kim.
Index: src/lib/elm_conform.c
===
--- src/lib/elm_conform.c	(revision 60372)
+++ src/lib/elm_conform.c	(working copy)
@@ -24,8 +24,8 @@
Evas_Object *shelf, *panel, *virtualkeypad;
Evas_Object *content;
Evas_Object *scroller;
+#ifdef HAVE_ELEMENTARY_X
Ecore_Event_Handler *prop_hdl;
-#ifdef HAVE_ELEMENTARY_X
Ecore_X_Virtual_Keyboard_State vkb_state;
 #endif
struct
@@ -51,6 +51,7 @@
 
 /* local function prototypes */
 static const char *widtype = NULL;
+static void _del_pre_hook(Evas_Object *obj);
 static void _del_hook(Evas_Object *obj);
 static void _mirrored_set(Evas_Object *obj, Eina_Bool rtl);
 static void _theme_hook(Evas_Object *obj);
@@ -65,17 +66,30 @@
 static void _conformant_part_sizing_eval(Evas_Object *obj,
  Conformant_Part_Type part_type);
 #endif
+static void
+_conformant_move_resize_event_cb(void *data, Evas *e, Evas_Object *obj,
+ void *event_info);
 static void _sizing_eval(Evas_Object *obj);
 static Eina_Bool _prop_change(void *data, int type, void *event);
 
 /* local functions */
 static void
+_del_pre_hook(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+#ifdef HAVE_ELEMENTARY_X
+   if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
+#endif
+   evas_object_event_callback_del_full(obj, EVAS_CALLBACK_RESIZE, _conformant_move_resize_event_cb, obj);
+}
+
+static void
 _del_hook(Evas_Object *obj)
 {
Widget_Data *wd = elm_widget_data_get(obj);
 
if (!wd) return;
-   if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
free(wd);
 }
 
@@ -479,6 +493,8 @@
 #endif
 
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
+   evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
+   _conformant_move_resize_event_cb, obj);
 
_mirrored_set(obj, elm_widget_mirrored_get(obj));
_sizing_eval(obj);
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Patch][CtxPopup] Add Arrow on the drag-able area of Base

2011-06-02 Thread cnook
Dear Mr. Hermet,
Hello, I have attached more accurate patch based on latest elementary. The
last patch already there.
All your review items are reflected on the attached patch.
Please review this again, sorry for any inconvenient.

Dear Mr. Raster,
Hi, Would you please let me know why you don't like the idea of swallowing?
Someday the arrow group could be a part of base group..
Previously, I had already made as you mentioned, but Hermet did not prefer
that the arrow is part of the ctxpopup(base).

Thanks!

Sincerely,
Shinwoo Kim.

2011/6/2 Carsten Haitzler 

> On Fri, 27 May 2011 19:08:44 +0900 cnook  said:
>
> this one is fine. though in general i dont like the idea of swallowing the
> arrows at all - should just be part of the ctxpopup design/obj directly,
> but
> thats already there and not specific to this patch :)
>
> thanks!
>
> > Dear All,
> >
> > Hi~
> >
> > If CtxPopup has elm_slider for content, the elm_slider indicator is
> covered
> > by CtxPopup arrow.
> > So, I have made a patch for resolving this issue. As the title the arrow
> > will be swallowed in the base.
> > Even though user uses his/her own style, the attached patch will work
> > properly.
> >
> > Sincerely,
> > Shinwoo Kim.
>
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> The Rasterman (Carsten Haitzler)ras...@rasterman.com
>
>
Index: src/lib/elc_ctxpopup.c
===
--- src/lib/elc_ctxpopup.c	(revision 59898)
+++ src/lib/elc_ctxpopup.c	(working copy)
@@ -484,79 +484,55 @@
  {
   case ELM_CTXPOPUP_DIRECTION_LEFT:
  edje_object_signal_emit(wd->arrow, "elm,state,left", "elm");
-
- // if user does not use dragable part
- arrow_size.y = (y - (arrow_size.h * 0.5));
- arrow_size.x = x;
-
- edje_object_part_swallow(wd->base, "elm.swallow.arrowLeft", wd->arrow);
+ edje_object_part_swallow(wd->base, "elm.swallow.arrow_left", wd->arrow);
  if (base_size.h > 0)
{
-  if (y - base_size.y < 0) y = 0;
-  else if (y > base_size.y + base_size.h) y = base_size.h;
-  else y = y - base_size.y;
-  edje_object_part_drag_value_set(wd->base, "elm.swallow.arrowLeft", 0.5,
-  (double) (y) / (double) (base_size.h));
+  if (y < (arrow_size.h * 0.5) + base_size.y) y = 0;
+  else if (y > base_size.y + base_size.h - (arrow_size.h * 0.5)) y = base_size.h - arrow_size.h;
+  else y = y - base_size.y - (arrow_size.h * 0.5);
+  edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_left", 0.5,
+  (double) (y) / (double) (base_size.h - arrow_size.h));
   }
  break;
   case ELM_CTXPOPUP_DIRECTION_RIGHT:
  edje_object_signal_emit(wd->arrow, "elm,state,right", "elm");
-
- // if user does not use dragable part
- arrow_size.y = (y - (arrow_size.h * 0.5));
- arrow_size.x = (x - arrow_size.w);
-
- edje_object_part_swallow(wd->base, "elm.swallow.arrowRight", wd->arrow);
+ edje_object_part_swallow(wd->base, "elm.swallow.arrow_right", wd->arrow);
  if (base_size.h > 0)
 {
-   if (y -base_size.y < 0) y = 0;
-   else if (y > base_size.y + base_size.h) y = base_size.h;
-   else y = y - base_size.y;
-   edje_object_part_drag_value_set(wd->base, "elm.swallow.arrowRight", 0.5,
-   (double) (y) / (double) (base_size.h));
+  if (y < (arrow_size.h * 0.5) + base_size.y) y = 0;
+  else if (y > base_size.y + base_size.h - (arrow_size.h * 0.5)) y = base_size.h - arrow_size.h;
+  else y = y - base_size.y - (arrow_size.h * 0.5);
+  edje_object_part_drag_value_set(wd->base, "elm.swallow.arrow_right", 0.5,
+  (double) (y) / (double) (base_size.h - arrow_size.h));
 }
  break;
   case ELM_CTXPOPUP_DIRECTION_UP:
  edje_object_signal_emit(wd->arrow, "elm,state,top", "elm");
-
- // if user does not use dragable part
- arrow_size.x = (x - (arrow_size.w * 0.5));
- arrow_size.y = y;
-
- edje_object_part_swallow(wd->base, "elm.swallow.arrowUp", wd->arrow);
+ edje_object_part_swallow(wd->base, "elm.swallow.arrow_up", wd->arrow);
  if (base_size.w > 0)
{
-  if (x - base_size.x < 0) 

[E-devel] [Patch][CtxPopup] Add Arrow on the drag-able area of Base

2011-05-27 Thread cnook
Dear All,

Hi~

If CtxPopup has elm_slider for content, the elm_slider indicator is covered
by CtxPopup arrow.
So, I have made a patch for resolving this issue. As the title the arrow
will be swallowed in the base.
Even though user uses his/her own style, the attached patch will work
properly.

Sincerely,
Shinwoo Kim.
Index: src/lib/elc_ctxpopup.c
===
--- src/lib/elc_ctxpopup.c	(revision 59726)
+++ src/lib/elc_ctxpopup.c	(working copy)
@@ -468,6 +468,7 @@
 {
Evas_Coord x, y;
Evas_Coord_Rectangle arrow_size;
+   Evas_Coord_Rectangle base_size;
Widget_Data *wd;
 
wd = elm_widget_data_get(obj);
@@ -476,33 +477,85 @@
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
evas_object_geometry_get(wd->arrow, NULL, NULL, &arrow_size.w,
 &arrow_size.h);
+   evas_object_geometry_get(wd->base, &base_size.x, &base_size.y,
+&base_size.w, &base_size.h);
 
switch (dir)
  {
   case ELM_CTXPOPUP_DIRECTION_LEFT:
  edje_object_signal_emit(wd->arrow, "elm,state,left", "elm");
+
+ // if user does not use dragable part
  arrow_size.y = (y - (arrow_size.h * 0.5));
  arrow_size.x = x;
+
+ edje_object_part_swallow(wd->base, "elm.swallow.arrowLeft", wd->arrow);
+ if (base_size.h > 0)
+   {
+  if (y - base_size.y < 0) y = 0;
+  else if (y > base_size.y + base_size.h) y = base_size.h;
+  else y = y - base_size.y;
+  edje_object_part_drag_value_set(wd->base, "elm.swallow.arrowLeft", 0.5,
+  (double) (y) / (double) (base_size.h));
+  }
  break;
   case ELM_CTXPOPUP_DIRECTION_RIGHT:
  edje_object_signal_emit(wd->arrow, "elm,state,right", "elm");
+
+ // if user does not use dragable part
  arrow_size.y = (y - (arrow_size.h * 0.5));
  arrow_size.x = (x - arrow_size.w);
+
+ edje_object_part_swallow(wd->base, "elm.swallow.arrowRight", wd->arrow);
+ if (base_size.h > 0)
+{
+   if (y -base_size.y < 0) y = 0;
+   else if (y > base_size.y + base_size.h) y = base_size.h;
+   else y = y - base_size.y;
+   edje_object_part_drag_value_set(wd->base, "elm.swallow.arrowRight", 0.5,
+   (double) (y) / (double) (base_size.h));
+}
  break;
   case ELM_CTXPOPUP_DIRECTION_UP:
  edje_object_signal_emit(wd->arrow, "elm,state,top", "elm");
+
+ // if user does not use dragable part
  arrow_size.x = (x - (arrow_size.w * 0.5));
  arrow_size.y = y;
+
+ edje_object_part_swallow(wd->base, "elm.swallow.arrowUp", wd->arrow);
+ if (base_size.w > 0)
+   {
+  if (x - base_size.x < 0) x = 0;
+  else if (x > base_size.x + base_size.w) x = base_size.w;
+  else x = x - base_size.x;
+  edje_object_part_drag_value_set(wd->base, "elm.swallow.arrowUp",
+  (double) (x) / (double) (base_size.w), 0.5);
+   }
  break;
   case ELM_CTXPOPUP_DIRECTION_DOWN:
  edje_object_signal_emit(wd->arrow, "elm,state,bottom", "elm");
+
+ // if user does not use dragable part
  arrow_size.x = (x - (arrow_size.w * 0.5));
  arrow_size.y = (y - arrow_size.h);
+
+ edje_object_signal_emit(wd->arrow, "elm,state,bottom", "elm");
+ edje_object_part_swallow(wd->base, "elm.swallow.arrowDown", wd->arrow);
+ if (base_size.w > 0)
+   {
+  if (x - base_size.x < 0) x = 0;
+  else if (x > base_size.x + base_size.w) x = base_size.w;
+  else x = x - base_size.x;
+  edje_object_part_drag_value_set(wd->base, "elm.swallow.arrowDown",
+  (double) (x) / (double) (base_size.w), 0.5);
+   }
  break;
   default:
  break;
  }
 
+   // if user does not use dragable part
evas_object_move(wd->arrow, arrow_size.x, arrow_size.y);
 }
 
Index: data/themes/default.edc
===
--- data/themes/default.edc	(revision 59726)
+++ data/themes/default.edc	(working copy)
@@ -7912,6 +7912,158 @@
  image: "bt_shine.png" COMP;
   }
   parts {
+		  part { name: "arrow_area_left";
+type: RECT;
+mouse_events: 0;
+description { state: "default" 0.0;
+   visible: 0;
+   min: 40 0;
+   fixed: 1 1;
+   align: 1 0.5;
+   rel1 {
+  to_y: "base";
+   }
+   rel2 {
+  relative:0 1;
+  to:"base";
+   }
+}
+ }
+ part { name: "arrow_area_ri

Re: [E-devel] [Patch] Display more than 3 items

2011-04-24 Thread cnook
Dear All,

Hello!

I have attached patch for elm_diskselector.
This patch is setting the width of elm_diskselector using its parent width
size, if there is no mention in the theme file.


Sincerely,
Shinwoo Kim.



2011/4/7 Carsten Haitzler 

> On Tue, 5 Apr 2011 23:33:08 +0900 cnook  said:
>
> thanks. still for()s in the test code have no space between for and ( - i
> fixed
> it though. patch in svn now!
>
> > Hello!
> >
> > Thank you for your response.
> > I am thoroughly impressed with your in-depth review.
> > All of your feedback is reflected on the latest attached patch.
> > Please verify and review this again. Thanks!
> >
> >
> > Sincerely,
> > Shinwoo Kim.
> >
> > 2011/4/4 Carsten Haitzler 
> >
> > > On Mon, 28 Mar 2011 12:04:19 +0900 cnook  said:
> > >
> > > too many problems with this patch :( can you fix the below and
> re-submit?
> > >
> > > 1. fails. malformed patch even.
> > > patching file src/lib/elm_diskselector.c
> > > Hunk #5 FAILED at 136.
> > > Hunk #19 succeeded at 780 with fuzz 2.
> > > 1 out of 29 hunks FAILED -- saving rejects to file
> > > src/lib/elm_diskselector.c.rej patching file src/lib/Elementary.h.in
> > > patching file src/bin/test_diskselector.c
> > > patching file data/themes/default.edc
> > > patch:  malformed patch at line 553:
> > > 2. math relying on operator precedence rather than being explicit with
> > > ()'s:
> > > + evas_object_resize(wd->main_box, w / wd->display_item_num *
> > > (wd->item_count + CEIL(wd->display_item_num) * 2), h);
> > > + evas_object_resize(wd->main_box, w / wd->display_item_num *
> > > (wd->item_count + CEIL(wd->display_item_num)), h);
> > > 3. divide by 0 waiting to happen:
> > > + (int)(w / wd->display_item_num), 0);
> > > (you never check the return of atoi so it can happily return 0 or theme
> > > could
> > > literally use a 0)
> > > 4. no space between if and ():
> > > +   if(!wd->display_item_num_by_api)
> > > 5. no check of atoi result to stop invalid values (<= 0):
> > > +if (str) wd->display_item_num = atoi(str);
> > > 6. no check of atoi() to check for <= -2:
> > > +   if (str) wd->minw = atoi(str);
> > > +   if (str) wd->minh = atoi(str);
> > > 7. no check of atoi result to stop invalid values:
> > > +   if (str) wd->display_item_num = atoi(str);
> > > 8. use: if (!strcmp(...)):
> > > +if (strcmp(item->label, it->label) == 0)
> edje_object_signal_emit
> > > (item->base.view, "elm,state,selected", "elm");
> > > 9. add space between void and * and no space between ) and it->:
> > > +   if (it->func) it->func((void*) it->base.data, it->base.widget, it);
> > > 10. more operator precedence reliance here. use ()'s to collect
> statements:
> > > +if (x > w / wd->display_item_num * (wd->item_count +
> > > (wd->display_item_num % 2)))
> > > +   x - w /
> > > wd->display_item_num *
> > > wd->item_count,
> > > +   x + w /
> > > wd->display_item_num *
> > > wd->item_count,
> > > 11. add space between for and (:
> > > +   for(i = 2; i < CEIL(wd->display_item_num); i++)
> > > +   for(i = 3; i <= CEIL(wd->display_item_num); i++)
> > > + for(i = 2; i < CEIL(wd->display_item_num); i++)
> > > + for(i = 3; i <= CEIL(wd->display_item_num); i++)
> > > +   for(idx = 0; idx < sizeof(month_list) / sizeof(month_list[0]);
> idx++)
> > > +   for(idx = 1; idx < 31; idx++)
> > > 12. please declare vars at top of function or {} section where you can:
> > > +   char *month_list[] = {
> > > +   char date[3];
> > >
> > >
> > > > Hi All,
> > > >
> > > > Thanks for your response and suggestion always.
> > > > I have attached new patch file which has following modification.
> > > >
> > > >   - remove warning message
> > > >   - support setting by theme and api
> > > >
> > > > Others are also reasonable suggestion, some of them especially
> vertical
> > > mode
> > > > would be fine. But till now there is no design for that as raster
> > > mentioned.
> > > >

Re: [E-devel] [Patch] Display more than 3 items

2011-04-05 Thread cnook
Hello!

Thank you for your response.
I am thoroughly impressed with your in-depth review.
All of your feedback is reflected on the latest attached patch.
Please verify and review this again. Thanks!


Sincerely,
Shinwoo Kim.

2011/4/4 Carsten Haitzler 

> On Mon, 28 Mar 2011 12:04:19 +0900 cnook  said:
>
> too many problems with this patch :( can you fix the below and re-submit?
>
> 1. fails. malformed patch even.
> patching file src/lib/elm_diskselector.c
> Hunk #5 FAILED at 136.
> Hunk #19 succeeded at 780 with fuzz 2.
> 1 out of 29 hunks FAILED -- saving rejects to file
> src/lib/elm_diskselector.c.rej patching file src/lib/Elementary.h.in
> patching file src/bin/test_diskselector.c
> patching file data/themes/default.edc
> patch:  malformed patch at line 553:
> 2. math relying on operator precedence rather than being explicit with
> ()'s:
> + evas_object_resize(wd->main_box, w / wd->display_item_num *
> (wd->item_count + CEIL(wd->display_item_num) * 2), h);
> + evas_object_resize(wd->main_box, w / wd->display_item_num *
> (wd->item_count + CEIL(wd->display_item_num)), h);
> 3. divide by 0 waiting to happen:
> + (int)(w / wd->display_item_num), 0);
> (you never check the return of atoi so it can happily return 0 or theme
> could
> literally use a 0)
> 4. no space between if and ():
> +   if(!wd->display_item_num_by_api)
> 5. no check of atoi result to stop invalid values (<= 0):
> +if (str) wd->display_item_num = atoi(str);
> 6. no check of atoi() to check for <= -2:
> +   if (str) wd->minw = atoi(str);
> +   if (str) wd->minh = atoi(str);
> 7. no check of atoi result to stop invalid values:
> +   if (str) wd->display_item_num = atoi(str);
> 8. use: if (!strcmp(...)):
> +if (strcmp(item->label, it->label) == 0) edje_object_signal_emit
> (item->base.view, "elm,state,selected", "elm");
> 9. add space between void and * and no space between ) and it->:
> +   if (it->func) it->func((void*) it->base.data, it->base.widget, it);
> 10. more operator precedence reliance here. use ()'s to collect statements:
> +if (x > w / wd->display_item_num * (wd->item_count +
> (wd->display_item_num % 2)))
> +   x - w /
> wd->display_item_num *
> wd->item_count,
> +   x + w /
> wd->display_item_num *
> wd->item_count,
> 11. add space between for and (:
> +   for(i = 2; i < CEIL(wd->display_item_num); i++)
> +   for(i = 3; i <= CEIL(wd->display_item_num); i++)
> + for(i = 2; i < CEIL(wd->display_item_num); i++)
> + for(i = 3; i <= CEIL(wd->display_item_num); i++)
> +   for(idx = 0; idx < sizeof(month_list) / sizeof(month_list[0]); idx++)
> +   for(idx = 1; idx < 31; idx++)
> 12. please declare vars at top of function or {} section where you can:
> +   char *month_list[] = {
> +   char date[3];
>
>
> > Hi All,
> >
> > Thanks for your response and suggestion always.
> > I have attached new patch file which has following modification.
> >
> >   - remove warning message
> >   - support setting by theme and api
> >
> > Others are also reasonable suggestion, some of them especially vertical
> mode
> > would be fine. But till now there is no design for that as raster
> mentioned.
> > setting min/max "display item num" is reasonable also but user can set
> > content size differently. So if elm_diskselector restrict its min/max
> > "display item num", it would occur that user cannot set "display item
> num"
> > more than max value even though there is enough space.
> >
> > Thanks again.
> >
> > Sincerely,
> > Shinwoo Kim.
> >
> > 2011/3/25 Carsten Haitzler 
> >
> > > On Wed, 23 Mar 2011 08:19:13 -0700 Daniel Juyung Seo <
> seojuyu...@gmail.com
> > > >
> > > said:
> > >
> > > you're going to hate me :)
> > >
> > > you did go the right way - theme defines default, code can override...
> > > BUT..
> > > you are ALSO missing a fit POLICY. you are fitting just N items in the
> > > visible
> > > region. i think... you are missing the ability to say "fit as many
> items
> > > ads
> > > you can" either based on largest item in list (homogeneous layout in
> the
> > > box)
> > > or have all items a different size (actually i might argue that this is
> > > dubiously useful except maybe in a case where 

Re: [E-devel] [Patch] Display more than 3 items

2011-03-30 Thread cnook
Hi All,

Please check latest patch set.

Sincerely,
Shinwoo Kim.

2011/3/28 cnook 

> Hi All,
>
> Thanks for your response and suggestion always.
> I have attached new patch file which has following modification.
>
>   - remove warning message
>   - support setting by theme and api
>
> Others are also reasonable suggestion, some of them especially vertical
> mode would be fine. But till now there is no design for that as raster
> mentioned. setting min/max "display item num" is reasonable also but user
> can set content size differently. So if elm_diskselector restrict its
> min/max "display item num", it would occur that user cannot set "display
> item num" more than max value even though there is enough space.
>
> Thanks again.
>
> Sincerely,
> Shinwoo Kim.
>
>
> 2011/3/25 Carsten Haitzler 
>
>> On Wed, 23 Mar 2011 08:19:13 -0700 Daniel Juyung Seo <
>> seojuyu...@gmail.com>
>> said:
>>
>> you're going to hate me :)
>>
>> you did go the right way - theme defines default, code can override...
>> BUT..
>> you are ALSO missing a fit POLICY. you are fitting just N items in the
>> visible
>> region. i think... you are missing the ability to say "fit as many items
>> ads
>> you can" either based on largest item in list (homogeneous layout in the
>> box)
>> or have all items a different size (actually i might argue that this is
>> dubiously useful except maybe in a case where MOST items are small and 1
>> or 2
>> are longer eg a list like: 1,2,3,4,5,NONE).
>>
>> so THEME should provide the default FIT policy (fixed count, best fit,
>> compact
>> fit). fixed count uses the theme number defined as you did already and
>> code can
>> override that, and other policies as above. also code should be allowed to
>> override this too.
>>
>> (and yes a horizontal scrolling list of items where they change size
>> horizontally is not that great as gustavo mentioned... but i know that you
>> didn't design the widget, so not a lot of use going on about that - BUT
>> his
>> point implies that we should have a vertical diskselector mode too... use
>> that
>> for horizontally expanding items, and vice-versa).
>>
>> > I attached a screen shot :)
>> > This is a screen shot from elementary_test "Disk Selector" which cnook
>> > attached.
>> >
>> > Btw, cnook, I have one comment.
>> > _item_click_cb()'s parameter is wrong.
>> > Please check elm_diskselector.c code.
>> >
>> > elm_diskselector.c: In function ‘_item_new’:
>> > elm_diskselector.c:137: warning: passing argument 4 of
>> > ‘edje_object_signal_callback_add’ f
>> > rom incompatible pointer type
>> > /usr/local/include/edje-1/Edje.h:550: note: expected ‘Edje_Signal_Cb’
>> > but argument is of t
>> > ype ‘void (*)(void *, struct Evas_Object *, void *)’
>> >
>> > Thanks.
>> > Daniel Juyung Seo (SeoZ)
>> >
>> >
>> >
>> >
>> > On Wed, Mar 23, 2011 at 7:15 AM, Gustavo Sverzut Barbieri
>> >  wrote:
>> > > On Wed, Mar 23, 2011 at 1:54 PM, cnook  wrote:
>> > >> Dear All,
>> > >>
>> > >> Thanks for your response.
>> > >>
>> > >> I have attached "elm_diskselector" patch using API and getting
>> default
>> > >> value from theme.
>> > >> But the default value from "elementary/themes/default.edc" is applied
>> only.
>> > >> If user wants new default value from his/her own theme file, it will
>> not be
>> > >> applied.
>> > >>
>> > >>
>> > >> Why I have changed like this..  because there is one case I worry
>> about
>> > >
>> > >
>> > > Do you have the screenshot? Nobody replied to my mail.
>> > >
>> > >
>> > > --
>> > > Gustavo Sverzut Barbieri
>> > > http://profusion.mobi embedded systems
>> > > --
>> > > MSN: barbi...@gmail.com
>> > > Skype: gsbarbieri
>> > > Mobile: +55 (19) 9225-2202
>> > >
>> > >
>> --
>> > > Enable your software for Intel(R) Active Management Technology to meet
>> the
>> > > growing manageability and security demands of your customers.
>> Businesses
>> > &g

Re: [E-devel] [Patch] Display more than 3 items

2011-03-27 Thread cnook
Hi All,

Thanks for your response and suggestion always.
I have attached new patch file which has following modification.

  - remove warning message
  - support setting by theme and api

Others are also reasonable suggestion, some of them especially vertical mode
would be fine. But till now there is no design for that as raster mentioned.
setting min/max "display item num" is reasonable also but user can set
content size differently. So if elm_diskselector restrict its min/max
"display item num", it would occur that user cannot set "display item num"
more than max value even though there is enough space.

Thanks again.

Sincerely,
Shinwoo Kim.

2011/3/25 Carsten Haitzler 

> On Wed, 23 Mar 2011 08:19:13 -0700 Daniel Juyung Seo  >
> said:
>
> you're going to hate me :)
>
> you did go the right way - theme defines default, code can override...
> BUT..
> you are ALSO missing a fit POLICY. you are fitting just N items in the
> visible
> region. i think... you are missing the ability to say "fit as many items
> ads
> you can" either based on largest item in list (homogeneous layout in the
> box)
> or have all items a different size (actually i might argue that this is
> dubiously useful except maybe in a case where MOST items are small and 1 or
> 2
> are longer eg a list like: 1,2,3,4,5,NONE).
>
> so THEME should provide the default FIT policy (fixed count, best fit,
> compact
> fit). fixed count uses the theme number defined as you did already and code
> can
> override that, and other policies as above. also code should be allowed to
> override this too.
>
> (and yes a horizontal scrolling list of items where they change size
> horizontally is not that great as gustavo mentioned... but i know that you
> didn't design the widget, so not a lot of use going on about that - BUT his
> point implies that we should have a vertical diskselector mode too... use
> that
> for horizontally expanding items, and vice-versa).
>
> > I attached a screen shot :)
> > This is a screen shot from elementary_test "Disk Selector" which cnook
> > attached.
> >
> > Btw, cnook, I have one comment.
> > _item_click_cb()'s parameter is wrong.
> > Please check elm_diskselector.c code.
> >
> > elm_diskselector.c: In function ‘_item_new’:
> > elm_diskselector.c:137: warning: passing argument 4 of
> > ‘edje_object_signal_callback_add’ f
> > rom incompatible pointer type
> > /usr/local/include/edje-1/Edje.h:550: note: expected ‘Edje_Signal_Cb’
> > but argument is of t
> > ype ‘void (*)(void *, struct Evas_Object *, void *)’
> >
> > Thanks.
> > Daniel Juyung Seo (SeoZ)
> >
> >
> >
> >
> > On Wed, Mar 23, 2011 at 7:15 AM, Gustavo Sverzut Barbieri
> >  wrote:
> > > On Wed, Mar 23, 2011 at 1:54 PM, cnook  wrote:
> > >> Dear All,
> > >>
> > >> Thanks for your response.
> > >>
> > >> I have attached "elm_diskselector" patch using API and getting default
> > >> value from theme.
> > >> But the default value from "elementary/themes/default.edc" is applied
> only.
> > >> If user wants new default value from his/her own theme file, it will
> not be
> > >> applied.
> > >>
> > >>
> > >> Why I have changed like this..  because there is one case I worry
> about
> > >
> > >
> > > Do you have the screenshot? Nobody replied to my mail.
> > >
> > >
> > > --
> > > Gustavo Sverzut Barbieri
> > > http://profusion.mobi embedded systems
> > > --
> > > MSN: barbi...@gmail.com
> > > Skype: gsbarbieri
> > > Mobile: +55 (19) 9225-2202
> > >
> > >
> --
> > > Enable your software for Intel(R) Active Management Technology to meet
> the
> > > growing manageability and security demands of your customers.
> Businesses
> > > are taking advantage of Intel(R) vPro (TM) technology - will your
> software
> > > be a part of the solution? Download the Intel(R) Manageability Checker
> > > today! http://p.sf.net/sfu/intel-dev2devmar
> > > ___
> > > enlightenment-devel mailing list
> > > enlightenment-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> > >
>
>
> --
> - Codito, ergo sum - "I code, therefore I am" --
> 

Re: [E-devel] [Patch] Display more than 3 items

2011-03-23 Thread cnook
Dear All,

Thanks for your response.

I have attached "elm_diskselector" patch using API and getting default value
from theme.
But the default value from "elementary/themes/default.edc" is applied only.
If user wants new default value from his/her own theme file, it will not be
applied.


Why I have changed like this..  because there is one case I worry about

[steps]
1. elm_diskselector_display_item_num_set(disk, 5)
2. elm_object_style_set(disk, "new/style"); // style has data.item
"display_item_num" "7"

In this case elm_diskselector will display 7 items.


By the way.. you mean..
 1. the newly defined default value should be applied?
or
 2. default value of default.edc is applied only? (attached patch)

If you mean the first one, then  both "Value from API" and "Value from
Theme" will be supported. But I worry about above case and I'm not sure two
ways should be coexisted.

The second one.. it is also not meaningful..

Ok, please let me now your opinion upon it. Thanks.


Sincerely,
Shinwoo Kim.

2011/3/22 Tom Hacohen 

> Dear Shinwoo,
>
> Why did you ditch getting the data from the theme? I think my suggestion
> is reasonable: use the data from the theme as the default value, and
> allow people to override it from API. So it's essentially what you did
> with just adding one line to the init of the object, to set
> display_item_num from the theme...
>
> --
> Tom.
>
> On Tue, 2011-03-22 at 19:36 +0900, cnook wrote:
> > Dear All,
> >
> > Hello :)
> >
> > Thanks for your response.
> > I have attached "elm_diskselector" patch using API and example code is
> > also included.
> > Please review this again. Thanks always.
> >
> > Sincerely,
> > Shinwoo Kim.
> >
> > 2011/3/22 Tom Hacohen 
> > You can load default from the theme and modify it with API...
> >
> >
> > On Tue, 2011-03-22 at 13:47 +0900, Daniel Juyung Seo wrote:
> > > Hello.
> > >
> > > > then several different theme file have to be existed. In
> > this case, API
> > > > would be more efficient.
> > >
> > > Hmm... you're right. It will be more flexible to use API for
> > item count.
> > > If we use previously suggested idea, we need to prepare many
> > item
> > > styles for several cases.
> > > And that doesn't look that flexible.
> > >
> > > And one more comment.
> > > You don't need to write separate sample application.
> > > Just add the sample to elementary_test.
> > >
> > > Thanks.
> > > Daniel Juyung Seo (SeoZ)
> > >
> > > On Mon, Mar 21, 2011 at 10:39 PM, cnook 
> > wrote:
> > > > Dear All,
> > > >
> > > > Hi~
> > > > Thanks for your response always!
> > > >
> > > > I have changed the "elm_diskselector" based on your
> > comments.
> > > > The "displayed item count" is described by using theme
> > file.
> > > > And example source - example.tar.gz - have attached.
> > > > (If you have an example of the example :), then please
> > inform and send me.)
> > > >
> > > > By the way, I have something wondering about this way.
> > > > If several "elm_diskselector" are added with different
> > "displayed item
> >     > > count" on one same parent,
> > > > then several different theme file have to be existed. In
> > this case, API
> > > > would be more efficient.
> > > >
> > > > I would like to know more about your opinion. Thanks
> > > >
> > > > Sincerely,
> > > > Shinwoo Kim.
> > > >
> > > >
> > > > 2011/3/19 Daniel Juyung Seo 
> > > >>
> > > >> Check the _theme_hook().
> > > >> :)
> > > >>
> > > >> Thanks.
> > > >> Daniel Juyung Seo (SeoZ)
> > > >>
> > > >> On Sat, Mar 19, 2011 at 1:53 PM, cnook
> >  wrote:
> > > >> > Dear All,
> > > >> &

Re: [E-devel] [Patch] Display more than 3 items

2011-03-22 Thread cnook
Dear All,

Hello :)

Thanks for your response.
I have attached "elm_diskselector" patch using API and example code is also
included.
Please review this again. Thanks always.

Sincerely,
Shinwoo Kim.

2011/3/22 Tom Hacohen 

> You can load default from the theme and modify it with API...
>
> On Tue, 2011-03-22 at 13:47 +0900, Daniel Juyung Seo wrote:
> > Hello.
> >
> > > then several different theme file have to be existed. In this case, API
> > > would be more efficient.
> >
> > Hmm... you're right. It will be more flexible to use API for item count.
> > If we use previously suggested idea, we need to prepare many item
> > styles for several cases.
> > And that doesn't look that flexible.
> >
> > And one more comment.
> > You don't need to write separate sample application.
> > Just add the sample to elementary_test.
> >
> > Thanks.
> > Daniel Juyung Seo (SeoZ)
> >
> > On Mon, Mar 21, 2011 at 10:39 PM, cnook  wrote:
> > > Dear All,
> > >
> > > Hi~
> > > Thanks for your response always!
> > >
> > > I have changed the "elm_diskselector" based on your comments.
> > > The "displayed item count" is described by using theme file.
> > > And example source - example.tar.gz - have attached.
> > > (If you have an example of the example :), then please inform and send
> me.)
> > >
> > > By the way, I have something wondering about this way.
> > > If several "elm_diskselector" are added with different "displayed item
> > > count" on one same parent,
> > > then several different theme file have to be existed. In this case, API
> > > would be more efficient.
> > >
> > > I would like to know more about your opinion. Thanks
> > >
> > > Sincerely,
> > > Shinwoo Kim.
> > >
> > >
> > > 2011/3/19 Daniel Juyung Seo 
> > >>
> > >> Check the _theme_hook().
> > >> :)
> > >>
> > >> Thanks.
> > >> Daniel Juyung Seo (SeoZ)
> > >>
> > >> On Sat, Mar 19, 2011 at 1:53 PM, cnook  wrote:
> > >> > Dear All,
> > >> >
> > >> > Hi~
> > >> >
> > >> > Thanks for your response.
> > >> >
> > >> > I have tried to use "data.item" and edje_object_data_get() API. It
> works
> > >> > fine. :)
> > >> >
> > >> > But I met a problem. When I use a new style for elm_diskselector,
> > >> > edje_object_data_get() cannot retrieve "data.item" of new style.
> > >> >
> > >> > Only original (default) "data.item" value is retrieved.
> > >> >
> > >> > Would you please let me know what I forget?
> > >> >
> > >> > Thanks.
> > >> >
> > >> >
> > >> > Sincerely,
> > >> > Shinwoo Kim.
> > >> >
> > >> >
> > >> > 2011/3/18 Daniel Juyung Seo 
> > >> >>
> > >> >> +3 !
> > >> >> Using group data in theme looks better because it reduces
> source-gui
> > >> >> dependences.
> > >> >>
> > >> >> group { name: "xx";
> > >> >>   data.item: "count" "3";
> > >> >>
> > >> >> You can fetch this data from c source using edje_object_data_get()
> API.
> > >> >> Please check other widgets for a reference.
> > >> >>
> > >> >> I checked the patch very briefly and here are some comments.
> > >> >>
> > >> >> 1. Indentation.
> > >> >> ex) line 250 in elm_diskselector.diff
> > >> >>
> > >> >> 2. Blank lines.
> > >> >>   There are 2 blank lines at the end of diff file. 396, 397 lines.
> > >> >>
> > >> >> 3. Diff file.
> > >> >>   I think there is no rule for this but you can merge two diff
> files
> > >> >> to one diff file
> > >> >>   because they are patches for a one feature and one
> > >> >> library(elementary).
> > >> >>
> > >> >> 4. Sample code.
> > >> >>   It will be better to have a sample code for a new feature in
> > >> >> elementary_test.
> > >> >>
> > >&g

Re: [E-devel] [Patch] Display more than 3 items

2011-03-21 Thread cnook
Dear All,

Hi~
Thanks for your response always!

I have changed the "elm_diskselector" based on your comments.
The "displayed item count" is described by using theme file.
And example source - example.tar.gz - have attached.
(If you have an example of the example :), then please inform and send me.)

By the way, I have something wondering about this way.
If several "elm_diskselector" are added with different "displayed item
count" on one same parent,
then several different theme file have to be existed. In this case, API
would be more efficient.

I would like to know more about your opinion. Thanks

Sincerely,
Shinwoo Kim.


2011/3/19 Daniel Juyung Seo 

> Check the _theme_hook().
> :)
>
> Thanks.
> Daniel Juyung Seo (SeoZ)
>
> On Sat, Mar 19, 2011 at 1:53 PM, cnook  wrote:
> > Dear All,
> >
> > Hi~
> >
> > Thanks for your response.
> >
> > I have tried to use "data.item" and edje_object_data_get() API. It works
> > fine. :)
> >
> > But I met a problem. When I use a new style for elm_diskselector,
> > edje_object_data_get() cannot retrieve "data.item" of new style.
> >
> > Only original (default) "data.item" value is retrieved.
> >
> > Would you please let me know what I forget?
> >
> > Thanks.
> >
> >
> > Sincerely,
> > Shinwoo Kim.
> >
> >
> > 2011/3/18 Daniel Juyung Seo 
> >>
> >> +3 !
> >> Using group data in theme looks better because it reduces source-gui
> >> dependences.
> >>
> >> group { name: "xx";
> >>   data.item: "count" "3";
> >>
> >> You can fetch this data from c source using edje_object_data_get() API.
> >> Please check other widgets for a reference.
> >>
> >> I checked the patch very briefly and here are some comments.
> >>
> >> 1. Indentation.
> >> ex) line 250 in elm_diskselector.diff
> >>
> >> 2. Blank lines.
> >>   There are 2 blank lines at the end of diff file. 396, 397 lines.
> >>
> >> 3. Diff file.
> >>   I think there is no rule for this but you can merge two diff files
> >> to one diff file
> >>   because they are patches for a one feature and one
> library(elementary).
> >>
> >> 4. Sample code.
> >>   It will be better to have a sample code for a new feature in
> >> elementary_test.
> >>
> >> Other than that, looks ok :)
> >>
> >> Thanks.
> >> Daniel Juyung Seo (SeoZ)
> >>
> >> On Fri, Mar 18, 2011 at 5:57 AM, Tiago Falcao <
> develo...@tiagofalcao.com>
> >> wrote:
> >> > +2 !
> >> >
> >> > When had see this widget in first time, I imagined it with option to
> >> > many items but ever configured in theme.
> >> > If i'm right, this widget is a lot dependent of code and less of theme
> >> > :(
> >> >
> >> > What you thing about this, Shinwoo Kim?
> >> > Gustavo suggested the easiest way, use group data.
> >> >
> >> > Thanks.
> >> >
> >> >
> >> > On Thu, Mar 17, 2011 at 4:47 PM, Gustavo Sverzut Barbieri
> >> >  wrote:
> >> >> On Thu, Mar 17, 2011 at 7:42 PM, Bruno Dilly 
> >> >> wrote:
> >> >>> On Thu, Mar 17, 2011 at 10:45 AM, cnook  wrote:
> >> >>>> Dear All,
> >> >>>
> >> >>> Hi Shinwoo Kim,
> >> >>>
> >> >>>>
> >> >>>> This is Shinwoo Kim, learned that I could contribute to EFL! :)
> >> >>>> I'm pleased to inform you that the patch for the
> "elm_diskselector".
> >> >>>>
> >> >>>> Until now, the "elm_diskselector" only display 3 items at once,
> >> >>>> if you accept this patch, the "elm_diskselector" can display more
> >> >>>> than 3
> >> >>>> items.
> >> >>>
> >> >>> Displaying more than 3 items is a nice improvement.
> >> >>> What do you think about the idea of getting the number of items to
> be
> >> >>> displayed from the theme ?
> >> >>>
> >> >>> Anyway, there is a typo on documentation (param num). Maybe a getter
> >> >>> could be useful as well.
> >> >>
> >> >> +1 to get it from theme!
> >> >>
> >> &g

Re: [E-devel] [Patch] Display more than 3 items

2011-03-18 Thread cnook
Dear All,

Hi~

Thanks for your response.

I have tried to use "data.item" and edje_object_data_get() API. It works
fine. :)

But I met a problem. When I use a new style for elm_diskselector,
edje_object_data_get() cannot retrieve "data.item" of new style.

Only original (default) "data.item" value is retrieved.

Would you please let me know what I forget?

Thanks.


Sincerely,
Shinwoo Kim.


2011/3/18 Daniel Juyung Seo 

> +3 !
> Using group data in theme looks better because it reduces source-gui
> dependences.
>
> group { name: "xx";
>   data.item: "count" "3";
>
> You can fetch this data from c source using edje_object_data_get() API.
> Please check other widgets for a reference.
>
> I checked the patch very briefly and here are some comments.
>
> 1. Indentation.
> ex) line 250 in elm_diskselector.diff
>
> 2. Blank lines.
>   There are 2 blank lines at the end of diff file. 396, 397 lines.
>
> 3. Diff file.
>   I think there is no rule for this but you can merge two diff files
> to one diff file
>   because they are patches for a one feature and one library(elementary).
>
> 4. Sample code.
>   It will be better to have a sample code for a new feature in
> elementary_test.
>
> Other than that, looks ok :)
>
> Thanks.
> Daniel Juyung Seo (SeoZ)
>
> On Fri, Mar 18, 2011 at 5:57 AM, Tiago Falcao 
> wrote:
> > +2 !
> >
> > When had see this widget in first time, I imagined it with option to
> > many items but ever configured in theme.
> > If i'm right, this widget is a lot dependent of code and less of theme :(
> >
> > What you thing about this, Shinwoo Kim?
> > Gustavo suggested the easiest way, use group data.
> >
> > Thanks.
> >
> >
> > On Thu, Mar 17, 2011 at 4:47 PM, Gustavo Sverzut Barbieri
> >  wrote:
> >> On Thu, Mar 17, 2011 at 7:42 PM, Bruno Dilly 
> wrote:
> >>> On Thu, Mar 17, 2011 at 10:45 AM, cnook  wrote:
> >>>> Dear All,
> >>>
> >>> Hi Shinwoo Kim,
> >>>
> >>>>
> >>>> This is Shinwoo Kim, learned that I could contribute to EFL! :)
> >>>> I'm pleased to inform you that the patch for the "elm_diskselector".
> >>>>
> >>>> Until now, the "elm_diskselector" only display 3 items at once,
> >>>> if you accept this patch, the "elm_diskselector" can display more than
> 3
> >>>> items.
> >>>
> >>> Displaying more than 3 items is a nice improvement.
> >>> What do you think about the idea of getting the number of items to be
> >>> displayed from the theme ?
> >>>
> >>> Anyway, there is a typo on documentation (param num). Maybe a getter
> >>> could be useful as well.
> >>
> >> +1 to get it from theme!
> >>
> >> I did something similar for ephoto in some older version, it had
> >> couple of swallow parts defined, like "elm.swallow.p%d", and a
> >> data.item: "count" "3", thus it would fill 3 swallows.
> >>
> >> I believe this is something up to the theme as it has the knowledge on
> >> how to pack more items.
> >>
> >>
> >> --
> >> Gustavo Sverzut Barbieri
> >> http://profusion.mobi embedded systems
> >> --
> >> MSN: barbi...@gmail.com
> >> Skype: gsbarbieri
> >> Mobile: +55 (19) 9225-2202
> >>
> >>
> --
> >> Colocation vs. Managed Hosting
> >> A question and answer guide to determining the best fit
> >> for your organization - today and in the future.
> >> http://p.sf.net/sfu/internap-sfd2d
> >> ___
> >> enlightenment-devel mailing list
> >> enlightenment-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >>
> >
> >
> >
> > --
> > Tiago Rezende Campos Falcão
> > http://www.tiagofalcao.com
> > --
> > ProFUSION | embedded systems
> > Computer Systems Laboratory - IC - Unicamp
> > Grupo Pró Software Livre - Unicamp
> > Laboratory of Information Systems - IC - Unicamp
> >
> >
> --
> > Colocation vs. Managed Hosting
> > A question and answer guide to determining the best fit
> > for your organization - today and in the future.
> > http://p.sf.net/sfu/internap-sfd2d
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] [Patch] Display more than 3 items

2011-03-17 Thread cnook
Dear All,

This is Shinwoo Kim, learned that I could contribute to EFL! :)
I'm pleased to inform you that the patch for the "elm_diskselector".

Until now, the "elm_diskselector" only display 3 items at once,
if you accept this patch, the "elm_diskselector" can display more than 3
items.

For this feature, "elm_diskselector_display_item_num_set(Evas_Object *obj,
int num)" is added.
I would like to know more about your opinion about this feature. Thanks.

Sincerely,
Shinwoo Kim
Index: src/lib/elm_diskselector.c
===
--- src/lib/elm_diskselector.c	(revision 57821)
+++ src/lib/elm_diskselector.c	(working copy)
@@ -19,6 +19,10 @@
 # define MAX(a, b) (((a) > (b)) ? (a) : (b))
 #endif
 
+#ifndef CEIL
+#define CEIL(a) (((a) % 2 != 0) ? ((a) / 2 + 1) : ((a) / 2))
+#endif
+
 typedef struct _Widget_Data Widget_Data;
 
 struct _Widget_Data
@@ -35,7 +39,9 @@
Elm_Diskselector_Item *last;
Eina_List *items;
Eina_List *r_items;
-   int item_count, len_threshold, len_side;
+   Eina_List *over_items;
+   Eina_List *under_items;
+   int item_count, len_threshold, len_side, display_item_num;
Ecore_Idler *idler;
Ecore_Idler *check_idler;
Eina_Bool init:1;
@@ -67,6 +73,8 @@
 static void _sub_del(void *data, Evas_Object * obj, void *event_info);
 static void _round_items_del(Widget_Data *wd);
 static void _scroller_move_cb(void *data, Evas_Object *obj, void *event_info);
+static void _item_click_cb(void *data, Evas_Object *obj, void *event_info);
+static void _selected_item_indicate(Elm_Diskselector_Item *it);
 
 static const char SIG_SELECTED[] = "selected";
 static const Evas_Smart_Cb_Description _signals[] = {
@@ -91,12 +99,12 @@
 
evas_object_geometry_get(wd->scroller, NULL, NULL, &w, &h);
if (wd->round)
- evas_object_resize(wd->main_box, w / 3 * (wd->item_count + 4), h);
+ evas_object_resize(wd->main_box, w / wd->display_item_num * (wd->item_count + CEIL(wd->display_item_num) * 2), h);
else
- evas_object_resize(wd->main_box, w / 3 * (wd->item_count + 2), h);
+ evas_object_resize(wd->main_box, w / wd->display_item_num * (wd->item_count + CEIL(wd->display_item_num)), h);
 
elm_smart_scroller_paging_set(wd->scroller, 0, 0,
- (int)(w / 3), 0);
+ (int)(w / wd->display_item_num), 0);
 
if (!wd->idler)
  wd->idler = ecore_idler_add(_move_scroller, data);
@@ -124,7 +132,10 @@
evas_object_show(it->base.view);
 
if (it->label)
+ {
 edje_object_part_text_set(it->base.view, "elm.text", it->label);
+edje_object_signal_callback_add(it->base.view, "elm,action,click", "", _item_click_cb, it);
+ }
if (it->icon)
  {
 evas_object_size_hint_min_set(it->icon, 24, 24);
@@ -167,6 +178,8 @@
 _del_pre_hook(Evas_Object * obj)
 {
Elm_Diskselector_Item *it;
+   Eina_List *l;
+
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
 
@@ -199,6 +212,26 @@
 free(wd->first);
  }
 
+   EINA_LIST_FOREACH(wd->under_items, l, it)
+ {
+if (it)
+  {
+ eina_stringshare_del(it->label);
+ evas_object_del(wd->first->base.view);
+ free(it);
+  }
+ }
+
+   EINA_LIST_FOREACH(wd->over_items, l, it)
+   {
+ if (it)
+{
+   eina_stringshare_del(it->label);
+   evas_object_del(wd->first->base.view);
+   free(it);
+}
+   }
+
EINA_LIST_FREE(wd->items, it) _item_del(it);
eina_list_free(wd->r_items);
 }
@@ -274,6 +307,7 @@
if (!it) return;
Widget_Data *wd = elm_widget_data_get(it->base.widget);
wd->selected_item = it;
+   _selected_item_indicate(wd->selected_item);
if (it->func) it->func((void *)it->base.data, it->base.widget, it);
evas_object_smart_callback_call(it->base.widget, SIG_SELECTED, it);
 }
@@ -438,6 +472,45 @@
 }
 
 static void
+_selected_item_indicate(Elm_Diskselector_Item *it)
+{
+   Elm_Diskselector_Item *item;
+   Eina_List *l;
+   Widget_Data *wd;
+   wd = elm_widget_data_get(it->base.widget);
+
+   if (!wd) return;
+
+   EINA_LIST_FOREACH(wd->r_items, l, item)
+ {
+if (strcmp(item->label, it->label) == 0) edje_object_signal_emit(item->base.view, "elm,state,selected", "elm");
+else
+   edje_object_signal_emit(item->base.view, "elm,state,default", "elm");
+ }
+}
+
+static void
+_item_click_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   Elm_Diskselector_Item *it = data;
+
+   if (!it) return;
+
+   Widget_Data *wd;
+   wd = elm_widget_data_get(it->base.widget);
+
+   if (!wd) return;
+
+   if (wd->selected_item != it)
+ {
+wd->selected_item = it;
+_selected_item_indicate(wd->selected_item);
+ }
+
+   if (it->func) it->func((void*) it->base.data, it->base.widget, it);
+}
+
+static void
 _scroller_move_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 

<    1   2