The idea is not to execute the animation when the first element is pushed.
Barbieri
suggested to remove the first animation on all cases instead of being a
configuration,
so I guess it can't be done only with theme, is it right?

I made the suggested changes and here is a new version of the patch.

On Wed, Oct 20, 2010 at 10:57 AM, Iván Briano (Sachiel)
<sachi...@gmail.com>wrote:

> On Wed, Oct 20, 2010 at 10:42 AM, Alex Grilo <abgr...@profusion.mobi>
> wrote:
> > Hi,
> >  This is a patch to configure if the first animation of an elm_pager will
> > be shown or not. There are some applications in which this first
> animation
> > seems weird.
> >
>
> I can't say I like the patch. It looks hackish and the naming of variables
> and functions doesn't really tell what it does. It's to keep the animation
> of an object being added to the pager from happening? Because it looks
> like you are misreading it as a first animation in the pager, when it's
> per item added.
>
> It could be done in theme alone, just having another style that doesn't
> animate with that signal.
>
> > thanks
> >
> > --
> > --
> > Alex Bredariol Grilo
> > ProFUSION embedded systems
> > http://profusion.mobi
> >
> >
> ------------------------------------------------------------------------------
> > Download new Adobe(R) Flash(R) Builder(TM) 4
> > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
> > Flex(R) Builder(TM)) enable the development of rich applications that run
> > across multiple browsers and platforms. Download your free trials today!
> > http://p.sf.net/sfu/adobe-dev2dev
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> >
>



-- 
--
Alex Bredariol Grilo
ProFUSION embedded systems
http://profusion.mobi
Index: src/lib/elm_pager.c
===================================================================
--- src/lib/elm_pager.c	(revision 53651)
+++ src/lib/elm_pager.c	(working copy)
@@ -28,6 +28,7 @@
    Eina_List *stack;
    Item *top, *oldtop;
    Evas_Object *rect, *clip;
+   Eina_Bool first_element;
 };
 
 struct _Item
@@ -141,7 +142,12 @@
 	wd->top = ittop;
 	o = wd->top->base;
 	evas_object_show(o);
-	if (wd->oldtop && wd->oldtop->popme)
+ 	if (wd->first_element)
+	  {
+	     edje_object_signal_emit(o, "elm,action,show,no-animation", "elm");
+	     wd->first_element = EINA_FALSE;
+	  }
+ 	else if (wd->oldtop && wd->oldtop->popme)
 	    edje_object_signal_emit(o, "elm,action,show", "elm");
 	else
 	    edje_object_signal_emit(o, "elm,action,push", "elm");
@@ -246,6 +252,8 @@
    elm_widget_resize_object_set(obj, wd->clip);
    elm_widget_sub_object_add(obj, wd->clip);
 
+   wd->first_element = EINA_TRUE;
+
    wd->rect = evas_object_rectangle_add(e);
    elm_widget_sub_object_add(obj, wd->rect);
    evas_object_color_set(wd->rect, 255, 255, 255, 0); 
@@ -424,4 +432,3 @@
    if (!wd->top) return NULL;
    return wd->top->content;
 }
-
Index: data/themes/default.edc
===================================================================
--- data/themes/default.edc	(revision 53651)
+++ data/themes/default.edc	(working copy)
@@ -22607,6 +22607,13 @@
 	    target: "clip";
             after: "show_end";
 	 }
+     program { name: "show_start_no_animation";
+        signal: "elm,action,show,no-animation";
+	    action:  STATE_SET "visible" 0.0;
+	    target: "base";
+	    target: "clip";
+        after: "show_end";
+	 }
          program { name: "show_end";
             action: SIGNAL_EMIT "elm,action,show,finished" "";
 	 }
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to