elementary: switch int to double timeout slideshow in edje_external
authorMichael BOUCHAUD <michael.bouchaud@gmail.com>
Mon, 31 Jan 2011 14:43:34 +0000 (14:43 +0000)
committerMichael BOUCHAUD <michael.bouchaud@gmail.com>
Mon, 31 Jan 2011 14:43:34 +0000 (14:43 +0000)
SVN revision: 56608

src/edje_externals/elm_slideshow.c

index 913dfaa..ca4b7f9 100644 (file)
@@ -3,7 +3,7 @@
 typedef struct _Elm_Params_Slideshow
 {
    Elm_Params base;
-   int timeout;
+   double timeout;
    const char *transition;
    const char *layout;
    Eina_Bool loop:1;
@@ -41,9 +41,9 @@ external_slideshow_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje
 {
    if (!strcmp(param->name, "timeout"))
      {
-       if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+       if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
          {
-            elm_slideshow_timeout_set(obj, param->i);
+            elm_slideshow_timeout_set(obj, param->d);
             return EINA_TRUE;
          }
      }
@@ -83,9 +83,9 @@ external_slideshow_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje
 {
    if (!strcmp(param->name, "timeout"))
      {
-       if (param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+       if (param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
          {
-            param->i = elm_slideshow_timeout_get(obj);
+            param->d = elm_slideshow_timeout_get(obj);
             return EINA_TRUE;
          }
      }
@@ -135,7 +135,7 @@ external_slideshow_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED
      {
        if (!strcmp(param->name, "timeout"))
          {
-            mem->timeout = param->i;
+            mem->timeout = param->d;
             mem->timeout_exists = EINA_TRUE;
          }
        else if (!strcmp(param->name, "loop"))
@@ -171,7 +171,7 @@ external_slideshow_params_free(void *params __UNUSED__)
 
 static Edje_External_Param_Info external_slideshow_params[] = {
    DEFINE_EXTERNAL_COMMON_PARAMS,
-   EDJE_EXTERNAL_PARAM_INFO_INT("timeout"),
+   EDJE_EXTERNAL_PARAM_INFO_DOUBLE("timeout"),
    EDJE_EXTERNAL_PARAM_INFO_BOOL("loop"),
    EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("transition", "fade", transitions),
    EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("layout", "fullscreen", layout),