elementary/pager - get rid of elm_pager_animation_disabled_set
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 14 Oct 2011 02:30:44 +0000 (02:30 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 14 Oct 2011 02:30:44 +0000 (02:30 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64055 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/edje_externals/Makefile.am
src/edje_externals/elm_pager.c [deleted file]
src/lib/Elementary.h.in
src/lib/elm_pager.c

index 3bacdca..63ced97 100644 (file)
@@ -49,7 +49,6 @@ elm_label.c \
 elm_list.c \
 elm_map.c \
 elm_notify.c \
-elm_pager.c \
 elm_panes.c \
 elm_photocam.c \
 elm_progressbar.c \
diff --git a/src/edje_externals/elm_pager.c b/src/edje_externals/elm_pager.c
deleted file mode 100644 (file)
index 4ca39cb..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#include <assert.h>
-
-#include "private.h"
-
-typedef struct _Elm_Params_Pager
-{
-   Eina_Bool disable_animation_exists:1;
-   Eina_Bool disable_animation:1;
-} Elm_Params_Pager;
-
-
-static void
-external_pager_state_set(void *data __UNUSED__, Evas_Object *obj,
-                         const void *from_params, const void *to_params,
-                         float pos __UNUSED__)
-{
-   const Elm_Params_Pager *p;
-
-   if (to_params) p = to_params;
-   else if (from_params) p = from_params;
-   else return;
-
-   if (p->disable_animation_exists)
-     elm_pager_animation_disabled_set(obj, p->disable_animation);
-}
-
-static Eina_Bool
-external_pager_param_set(void *data __UNUSED__, Evas_Object *obj,
-                         const Edje_External_Param *param)
-{
-   if (!strcmp(param->name, "disable animation"))
-     {
-        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
-          {
-             elm_pager_animation_disabled_set(obj, param->i);
-             return EINA_TRUE;
-          }
-     }
-   ERR("unknown parameter '%s' of type '%s'",
-       param->name, edje_external_param_type_str(param->type));
-
-   return EINA_FALSE;
-}
-
-static Eina_Bool
-external_pager_param_get(void *data __UNUSED__,
-                         const Evas_Object *obj __UNUSED__,
-                         Edje_External_Param *param)
-{
-   ERR("unknown parameter '%s' of type '%s'",
-       param->name, edje_external_param_type_str(param->type));
-
-   return EINA_FALSE;
-}
-
-static void *
-external_pager_params_parse(void *data __UNUSED__,
-                            Evas_Object *obj __UNUSED__,
-                            const Eina_List *params)
-{
-   Elm_Params_Pager *mem;
-   Edje_External_Param *param;
-   const Eina_List *l;
-
-   mem = calloc(1, sizeof(Elm_Params_Pager));
-   if (!mem)
-     return NULL;
-
-   EINA_LIST_FOREACH(params, l, param)
-     {
-        if (!strcmp(param->name, "disable animation"))
-          {
-             mem->disable_animation = !!param->i;
-             mem->disable_animation_exists = EINA_TRUE;
-          }
-     }
-
-   return mem;
-}
-
-static Evas_Object *
-external_pager_content_get(void *data __UNUSED__,
-                           const Evas_Object *obj __UNUSED__,
-                           const char *content __UNUSED__)
-{
-   ERR("so content");
-   return NULL;
-}
-
-static void
-external_pager_params_free(void *params)
-{
-   Elm_Params_Pager* mem = params;
-   free(mem);
-}
-
-static Edje_External_Param_Info external_pager_params[] = {
-   EDJE_EXTERNAL_PARAM_INFO_BOOL("disable animation"),
-   EDJE_EXTERNAL_PARAM_INFO_SENTINEL
-};
-
-DEFINE_EXTERNAL_ICON_ADD(pager, "pager");
-DEFINE_EXTERNAL_TYPE_SIMPLE(pager, "Pager");
index 39a8719..cdcfcea 100644 (file)
@@ -19748,13 +19748,6 @@ extern "C" {
     * @return The top object or NULL if none
     */
    EAPI Evas_Object *elm_pager_content_top_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
-   /**
-    * @brief  Enable or disable pager animations
-    *
-    * @param obj The pager object
-    * @param disable True if the animation should be disabled
-    */
-   EAPI void         elm_pager_animation_disabled_set(Evas_Object *obj, Eina_Bool disable); EINA_ARG_NONNULL(1);
 
    /**
     * @}
index 802a77b..0bf33bc 100644 (file)
@@ -9,7 +9,6 @@ struct _Widget_Data
    Eina_List *stack;
    Item *top, *oldtop;
    Evas_Object *rect, *clip;
-   Eina_Bool disable_animation: 1;
 };
 
 struct _Item
@@ -145,7 +144,6 @@ static void
 _eval_top(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   Eina_Bool show_noanimate = EINA_TRUE;
    Item *ittop;
    if (!wd) return;
    if (!wd->stack) return;
@@ -158,13 +156,7 @@ _eval_top(Evas_Object *obj)
         if (wd->top)
           {
              o = wd->top->base;
-             if(wd->disable_animation)
-               {
-                  edje_object_signal_emit(o, "elm,action,hide,noanimate", "elm");
-                  if (wd->top->popme)
-                    wd->stack = eina_list_remove(wd->stack, wd->top);
-               }
-             else if (wd->top->popme)
+             if (wd->top->popme)
                {
                   edje_object_signal_emit(o, "elm,action,pop", "elm");
                   wd->stack = eina_list_remove(wd->stack, wd->top);
@@ -178,19 +170,11 @@ _eval_top(Evas_Object *obj)
                   else if (!strcmp(onhide, "lower")) evas_object_lower(o);
                }
           }
-        else
-          {
-             show_noanimate = EINA_FALSE;
-          }
         wd->oldtop = wd->top;
         wd->top = ittop;
         o = wd->top->base;
         evas_object_show(o);
-        if ((!show_noanimate)||(wd->disable_animation))
-          {
-             edje_object_signal_emit(o, "elm,action,show,noanimate", "elm");
-          }
-        else if (wd->oldtop)
+        if (wd->oldtop)
           {
              if (elm_object_focus_get(wd->oldtop->content))
                elm_widget_focused_object_clear(wd->oldtop->content);
@@ -448,20 +432,4 @@ elm_pager_content_top_get(const Evas_Object *obj)
    if (!wd) return NULL;
    if (!wd->top) return NULL;
    return wd->top->content;
-}
-
-/**
- * This disables content animation on push/pop.
- *
- * @param obj The pager object
- * @param disable  if EINA_TRUE animation is disabled.
- *
- * @ingroup Pager
- */
-EAPI void
-elm_pager_animation_disabled_set(Evas_Object *obj, Eina_Bool disable)
-{
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-   wd->disable_animation = disable;
-}
+}
\ No newline at end of file