Rename some parametes, use defaults, use info
authorIván Briano <sachieru@gmail.com>
Tue, 8 Dec 2009 05:53:12 +0000 (05:53 +0000)
committerIván Briano <sachieru@gmail.com>
Tue, 8 Dec 2009 05:53:12 +0000 (05:53 +0000)
SVN revision: 44274

src/edje_externals/elm_check.c
src/edje_externals/elm_radio.c
src/edje_externals/elm_slider.c
src/edje_externals/elm_toggle.c
src/edje_externals/private.h

index 53cb08ee8193667af33b2a60be1c4a7a42c2003a..321aa4d47d271dbf85235e8cf1361022ea53bc0c 100644 (file)
@@ -60,6 +60,7 @@ external_check_params_free(void *params)
 static Edje_External_Param_Info external_check_params[] = {
    DEFINE_EXTERNAL_COMMON_PARAMS,
    EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+   EDJE_EXTERNAL_PARAM_INFO_INT("state"),
    EDJE_EXTERNAL_PARAM_INFO_SENTINEL
 };
 
index b91c6852985bac4690b6a6a3fe5c697dbc67ef8d..c74f82ae13db6f55d1bc7469b68abc8fabe08a65 100644 (file)
@@ -25,7 +25,8 @@ external_radio_state_set(void *data, Evas_Object *obj, const void *from_params,
       {
      Evas_Object *ed = evas_object_smart_parent_get(obj);
      Evas_Object *group = edje_object_part_swallow_get(ed, p1->group_name);
-     elm_radio_group_add(obj, group);
+     if (group)
+       elm_radio_group_add(obj, group);
       }
     return;
      }
@@ -53,7 +54,7 @@ external_radio_params_parse(void *data, Evas_Object *obj, const Eina_List *param
 
    external_common_icon_param_parse(&mem->icon, obj, params);
 
-   param = edje_external_param_find(params, "param group");
+   param = edje_external_param_find(params, "group");
    if (param)
      mem->group_name = eina_stringshare_add(param->s);
 
@@ -79,6 +80,8 @@ external_radio_params_free(void *params)
 static Edje_External_Param_Info external_radio_params[] = {
    DEFINE_EXTERNAL_COMMON_PARAMS,
    EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+   EDJE_EXTERNAL_PARAM_INFO_STRING("group"),
+   EDJE_EXTERNAL_PARAM_INFO_INT("state"),
    EDJE_EXTERNAL_PARAM_INFO_SENTINEL
 };
 
index f3736226a8bc5065c9089825a23112425df34325..188a7d2318f723d158e2c18e1c5dc55e0567b3d1 100644 (file)
@@ -77,11 +77,11 @@ external_slider_params_parse(void *data, Evas_Object *obj, const Eina_List *para
    if (param)
      mem->horizontal = param->i;
 
-   param = edje_external_param_find(params, "unit");
+   param = edje_external_param_find(params, "unit format");
    if (param)
      mem->unit = eina_stringshare_add(param->s);
 
-   param = edje_external_param_find(params, "indicator");
+   param = edje_external_param_find(params, "indicator format");
    if (param)
      mem->indicator = eina_stringshare_add(param->s);
 
@@ -105,6 +105,14 @@ external_slider_params_free(void *params)
 static Edje_External_Param_Info external_slider_params[] = {
    DEFINE_EXTERNAL_COMMON_PARAMS,
    EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+   EDJE_EXTERNAL_PARAM_INFO_DOUBLE("min"),
+   EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT("max", 10.0),
+   EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"),
+   EDJE_EXTERNAL_PARAM_INFO_INT("horizontal"),
+   EDJE_EXTERNAL_PARAM_INFO_INT("inverted"),
+   EDJE_EXTERNAL_PARAM_INFO_INT("span"),
+   EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"),
+   EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("indicator format", "%1.2f"),
    EDJE_EXTERNAL_PARAM_INFO_SENTINEL
 };
 
index 2230d0feea2e06783477e0beaaea89e2dc994575..5106a3048e9af6dd9bf092da7bea59ce696ec19a 100644 (file)
@@ -48,11 +48,11 @@ external_toggle_params_parse(void *data, Evas_Object *obj, const Eina_List *para
    if (param)
      mem->state = param->i;
 
-   param = edje_external_param_find(params, "state label from");
+   param = edje_external_param_find(params, "label on");
    if (param)
      mem->st_label_from = eina_stringshare_add(param->s);
 
-   param = edje_external_param_find(params, "state label to");
+   param = edje_external_param_find(params, "label off");
    if (param)
      mem->st_label_to = eina_stringshare_add(param->s);
 
@@ -76,6 +76,9 @@ external_toggle_params_free(void *params)
 static Edje_External_Param_Info external_toggle_params[] = {
    DEFINE_EXTERNAL_COMMON_PARAMS,
    EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
+   EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("label on", "ON"),
+   EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("label off", "OFF"),
+   EDJE_EXTERNAL_PARAM_INFO_INT("state"),
    EDJE_EXTERNAL_PARAM_INFO_SENTINEL
 };
 
index 35a7b772be5cf5f258851d1173a32e9f224e7ea4..2f440d935496c580b0c40b430e6fa31245f2b88f 100644 (file)
@@ -71,4 +71,4 @@ DEFINE_EXTERNAL_TYPE(type_name, name)
 
 
 #define DEFINE_EXTERNAL_COMMON_PARAMS           \
-    EDJE_EXTERNAL_PARAM_INFO_STRING("label")
+    EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("label", "label goes here")