summaryrefslogtreecommitdiff
path: root/src/edje_externals/elm.c
diff options
context:
space:
mode:
authorMichael BOUCHAUD <michael.bouchaud@gmail.com>2011-12-13 16:47:23 +0000
committerMichael BOUCHAUD <michael.bouchaud@gmail.com>2011-12-13 16:47:23 +0000
commitafd0acc7f0d63d7bacae2c9dec23925dbf178b33 (patch)
tree96b82c4687a3b5346604053214bdb2262c325f36 /src/edje_externals/elm.c
parentf367d19b7f5d85917bc74769ce99bdb7c236e3ec (diff)
elementary: from Jonas M. Gastal, adds a edje property called disabled to every edje external widgets.
SVN revision: 66169
Diffstat (limited to '')
-rw-r--r--src/edje_externals/elm.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/edje_externals/elm.c b/src/edje_externals/elm.c
index 185ec3b57..75f482ca4 100644
--- a/src/edje_externals/elm.c
+++ b/src/edje_externals/elm.c
@@ -112,6 +112,14 @@ external_common_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_Ex
112 return EINA_TRUE; 112 return EINA_TRUE;
113 } 113 }
114 } 114 }
115 else if (!strcmp(param->name, "disabled"))
116 {
117 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
118 {
119 param->i = elm_object_disabled_get(obj);
120 return EINA_TRUE;
121 }
122 }
115 return EINA_FALSE; 123 return EINA_FALSE;
116} 124}
117 125
@@ -126,6 +134,14 @@ external_common_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
126 return EINA_TRUE; 134 return EINA_TRUE;
127 } 135 }
128 } 136 }
137 else if (!strcmp(param->name, "disabled"))
138 {
139 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
140 {
141 elm_object_disabled_set(obj, param->i);
142 return EINA_TRUE;
143 }
144 }
129 return EINA_FALSE; 145 return EINA_FALSE;
130} 146}
131 147
@@ -180,9 +196,11 @@ external_common_params_parse(void *mem, void *data __UNUSED__, Evas_Object *obj
180 EINA_LIST_FOREACH(params, l, param) 196 EINA_LIST_FOREACH(params, l, param)
181 { 197 {
182 if (!strcmp(param->name, "style")) 198 if (!strcmp(param->name, "style"))
199 p->style = eina_stringshare_add(param->s);
200 else if (!strcmp(param->name, "disabled"))
183 { 201 {
184 p->style = eina_stringshare_add(param->s); 202 p->disabled = param->i;
185 break; 203 p->disabled_exists = EINA_TRUE;
186 } 204 }
187 } 205 }
188} 206}
@@ -197,6 +215,8 @@ external_common_state_set(void *data __UNUSED__, Evas_Object *obj, const void *f
197 215
198 if (p->style) 216 if (p->style)
199 elm_object_style_set(obj, p->style); 217 elm_object_style_set(obj, p->style);
218 if (p->disabled_exists)
219 elm_object_disabled_set(obj, p->disabled);
200} 220}
201 221
202Evas_Object * 222Evas_Object *