OMG!

Who did this...

2011년 12월 9일 오후 2:23, ChunEon Park <her...@naver.com>님의 말:

> Maybe the patch file seems be abandoned in the another world.
> Please find it! :p
> ------------------------------------
> -Regards, Hermet-
>
> -----Original Message-----
> From: "Kim Shinwoo"&lt;kimcinoo....@gmail.com&gt;
> To: "Enlightenment developer list"&
> lt;enlightenment-devel@lists.sourceforge.net&gt;
> Cc:
> Sent: 11-12-09(금) 14:03:00
> Subject: Re: [E-devel] [Patch] elc_ctxpopup: using calculated value,
> getting size from the style also.
> Dear Mr. Hermet, Thanks~
> Stupid.. I have to worry about ridicules.. hehe.. ;-]
> I have refined the patch and attached.
> TGIF!! http://www.youtube.com/watch?v=UGmKawTJbjU
> 2011년 12월 5일 오후 5:24, ChunEon Park &lt;her...@naver.com&gt;님의 말:
> > elm_ctxpopup_content_set was deprecated,
> > But now, we use elm_object_content_set instead.
> > So elm_ctxpopup_content_set code should move to elm_object_content_set.
> > You could find the _content_set_hook function which is callback func for
> > the elm_object_content_set.
> > ------------------------------------
> > -Regards, Hermet-
> >
> > -----Original Message-----
> > From: "cnook"&lt;kimci...@gmail.com&gt;
> > To: "EFL"&lt;enlightenment-devel@lists.sourceforge.net&gt;
> > Cc:
> > Sent: 11-12-05(월) 15:20:36
> > Subject: [E-devel] [Patch] elc_ctxpopup: using calculated value, getting
> > size from the style also.
> > Dear All, Hello!
> > As the title, attached patch has followings.
> > 1) Using Calculated Value: The _update_arrow(); had used
> > evas_object_geometry_get(); internally for getting its base size.
> > But the _calc_base_geometry(); already got the base size which
> > is more accurate.
> > 2) Getting Size From The Style Also: If the ctxpopup has content
> > which is composed using the style (means, the size of
> > content can get from *.edc file only), then ctxpopup does not
> > come properly. So resolving this, the patch is using a box,
> > and add a RESIZE callback to the box. When the box is resized,
> > the callback calls elm_box_recalculate();
> > Then, please review this patch and give any feedbacks. Thanks a lot.
> > Sincerely,
> > Shinwoo Kim.
> >
> >
> ------------------------------------------------------------------------------
> > All the data continuously generated in your IT infrastructure
> > contains a definitive record of customers, 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-novd2d_______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> >
> ------------------------------------------------------------------------------
> > All the data continuously generated in your IT infrastructure
> > contains a definitive record of customers, 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-novd2d
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
> ------------------------------------------------------------------------------
> Cloud Services Checklist: Pricing and Packaging Optimization
> This white paper is intended to serve as a reference, checklist and point
> of
> discussion for anyone considering optimizing the pricing and packaging
> model
> of a cloud services business. Read Now!
> http://www.accelacomm.com/jaw/sfnl/114/51491232/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
> ------------------------------------------------------------------------------
> Cloud Services Checklist: Pricing and Packaging Optimization
> This white paper is intended to serve as a reference, checklist and point
> of
> discussion for anyone considering optimizing the pricing and packaging
> model
> of a cloud services business. Read Now!
> http://www.accelacomm.com/jaw/sfnl/114/51491232/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
Index: src/lib/elc_ctxpopup.c
===================================================================
--- src/lib/elc_ctxpopup.c	(revision 66050)
+++ src/lib/elc_ctxpopup.c	(working copy)
@@ -64,7 +64,7 @@ static void _adjust_pos_y(Evas_Coord_Point *pos,
                           Evas_Coord_Rectangle *hover_area);
 static Elm_Ctxpopup_Direction _calc_base_geometry(Evas_Object *obj,
                                                   Evas_Coord_Rectangle *rect);
-static void _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir);
+static void _update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir, Evas_Coord_Rectangle rect);
 static void _sizing_eval(Evas_Object *obj);
 static void _shift_base_by_arrow(Evas_Object *arrow,
                                  Elm_Ctxpopup_Direction dir,
@@ -105,6 +105,10 @@ static void _ctxpopup_hide(void *data,
                            Evas *e,
                            Evas_Object *obj,
                            void *event_info);
+static void _content_resize(void *data,
+                            Evas *e,
+                            Evas_Object *obj,
+                            void *event_info);
 static void _scroller_resize(void *data,
                              Evas *e,
                              Evas_Object *obj,
@@ -504,11 +508,10 @@ _calc_base_geometry(Evas_Object *obj, Evas_Coord_R
 }
 
 static void
-_update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir)
+_update_arrow(Evas_Object *obj, Elm_Ctxpopup_Direction dir, Evas_Coord_Rectangle base_size)
 {
    Evas_Coord x, y;
    Evas_Coord_Rectangle arrow_size;
-   Evas_Coord_Rectangle base_size;
    Widget_Data *wd;
    double drag;
 
@@ -518,8 +521,6 @@ static void
    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);
 
    edje_object_part_unswallow(wd->base, wd->arrow);
 
@@ -677,7 +678,7 @@ _sizing_eval(Evas_Object *obj)
    //Base
    wd->dir = _calc_base_geometry(obj, &rect);
    _show_signal_emit(obj, wd->dir);
-   _update_arrow(obj, wd->dir);
+   _update_arrow(obj, wd->dir, rect);
    _shift_base_by_arrow(wd->arrow, wd->dir, &rect);
 
    //resize scroller according to final size.
@@ -808,6 +809,7 @@ _content_set_hook(Evas_Object *obj, const char *pa
                   Evas_Object *content)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
+   Evas_Coord min_w = -1, min_h = -1;
 
    Widget_Data *wd;
 
@@ -819,14 +821,28 @@ _content_set_hook(Evas_Object *obj, const char *pa
    if (wd->items) elm_ctxpopup_clear(obj);
    if (wd->content) evas_object_del(wd->content);
 
-   evas_object_event_callback_add(content, EVAS_CALLBACK_DEL, _content_del,
-                                  obj);
+   //Use Box
+   wd->box = elm_box_add(obj);
+   evas_object_size_hint_weight_set(wd->box, EVAS_HINT_EXPAND,
+                                    EVAS_HINT_EXPAND);
+   evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND,
+                                    EVAS_HINT_EXPAND);
+   evas_object_size_hint_fill_set(content, EVAS_HINT_FILL,
+                                  EVAS_HINT_FILL);
+   evas_object_show(content);
+   evas_object_size_hint_min_get(content, &min_w, &min_h);
+   evas_object_size_hint_min_set(wd->box, min_w, min_h);
+   elm_box_pack_end(wd->box, content);
 
-   elm_widget_sub_object_add(obj, content);
-   edje_object_part_swallow(wd->base, "elm.swallow.content", content);
+   evas_object_event_callback_add(wd->box, EVAS_CALLBACK_RESIZE,
+                                  _content_resize, obj);
+   evas_object_event_callback_add(wd->box, EVAS_CALLBACK_DEL,
+                                  _content_del, obj);
 
-   wd->content = content;
+   elm_widget_sub_object_add(obj, wd->box);
+   edje_object_part_swallow(wd->base, "elm.swallow.content", wd->box);
 
+   wd->content = wd->box;
    wd->dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
 
    if (wd->visible)
@@ -1027,6 +1043,19 @@ _ctxpopup_hide(void *data __UNUSED__, Evas *e __UN
 }
 
 static void
+_content_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
+                void *event_info __UNUSED__)
+{
+   Widget_Data *wd;
+
+   wd = elm_widget_data_get(data);
+   if (!wd) return;
+
+   elm_box_recalculate(wd->box);
+   _sizing_eval(data);
+}
+
+static void
 _scroller_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj,
                  void *event_info __UNUSED__)
 {
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to