Thanks... I'm going to update.. ;)

Regards...

2012/1/20 Carsten Haitzler <[email protected]>

> On Thu, 12 Jan 2012 08:35:40 -0200 Guilherme Silveira <[email protected]>
> said:
>
> f0xed. rev 67368.
>
> > Hi All,
> >
> > I think I found a bug when I changing button's style. The problem is
> when I
> > change style on clicked callback of button, i wrote a little test to
> > simulate that..
> > In my test I have a timer (1 sec) that it change style of a button
> (obj1),
> > and another button (obj2) that it only change when i click it!
> > The example is not big, and I'm going to paste here..
> >
> > O problem is when I change style throght clicked event, label and icon
> > becomes empty..
> >
> > -- code
> >
> > #include <stdio.h>
> > #include <glib.h>
> > #include <Elementary.h>
> >
> > static Ecore_Timer *test = NULL;
> > static Eina_Bool style1 = EINA_TRUE;
> > static Eina_Bool style2 = EINA_TRUE;
> >
> > static Eina_Bool
> > _change_style1(void *data)
> > {
> >     Evas_Object *obj = (Evas_Object *) data;
> >
> >     if (style1 == EINA_TRUE) {
> >         elm_object_style_set(obj, "anchor");
> >     } else {
> >         elm_object_style_set(obj, "default");
> >     }
> >     style1 = !style1;
> >
> >     return EINA_TRUE;
> > }
> >
> > static void
> > _change_style2(void *data, Evas_Object *obj, void *event_info)
> > {
> >     if (style2 == EINA_TRUE) {
> >         elm_object_style_set(obj, "anchor");
> >     } else {
> >         elm_object_style_set(obj, "default");
> >     }
> >     style2 = !style2;
> > }
> >
> > EAPI int
> > elm_main(int argc, char **argv)
> > {
> >     Evas_Object *parent;
> >     Evas_Object *obj1, *obj2;
> >
> >     parent = elm_win_add(NULL, "tip05-gui", ELM_WIN_BASIC);
> >     if (!parent) goto out;
> >     evas_object_resize(parent, 350, 150);
> >     evas_object_show(parent);
> >     elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
> >     elm_win_autodel_set(parent, EINA_TRUE);
> >
> >     obj1 = elm_button_add(parent);
> >     evas_object_resize(obj1, 100, 50);
> >     evas_object_move(obj1, 50, 50);
> >     elm_object_text_set(obj1, "Obj 1");
> >     evas_object_show(obj1);
> >
> >     obj2 = elm_button_add(parent);
> >     evas_object_resize(obj2, 100, 50);
> >     evas_object_move(obj2, 200, 50);
> >     elm_object_text_set(obj2, "Obj 2");
> >     evas_object_show(obj2);
> >
> >     test = ecore_timer_add(1.0, _change_style1, obj2);
> >     evas_object_smart_callback_add(obj1, "clicked", _change_style2,
> NULL);
> >
> >     elm_run();
> >     elm_shutdown();
> >
> > out:
> >     evas_object_del(parent);
> >
> >     return 0;
> > }
> > ELM_MAIN()
> >
> >
> > Regards,
> >
> > --
> > Guilherme Silveira
> > E-mail: [email protected]
> >
> ------------------------------------------------------------------------------
> > RSA(R) Conference 2012
> > Mar 27 - Feb 2
> > Save $400 by Jan. 27
> > Register now!
> > http://p.sf.net/sfu/rsa-sfdev2dev2
> > _______________________________________________
> > enlightenment-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
>
> --
> ------------- Codito, ergo sum - "I code, therefore I am" --------------
> The Rasterman (Carsten Haitzler)    [email protected]
>
>


-- 
Eng. Guilherme Silveira
E-mail: [email protected]
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to