summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_layout_object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_layout_object.c')
-rw-r--r--src/lib/elementary/efl_ui_layout_object.c61
1 files changed, 37 insertions, 24 deletions
diff --git a/src/lib/elementary/efl_ui_layout_object.c b/src/lib/elementary/efl_ui_layout_object.c
index b7f2052523..76bbd10422 100644
--- a/src/lib/elementary/efl_ui_layout_object.c
+++ b/src/lib/elementary/efl_ui_layout_object.c
@@ -186,7 +186,7 @@ _signals_emit(Eo *obj,
186 snprintf(buf, sizeof(buf), "elm,state,%s,%s", type, 186 snprintf(buf, sizeof(buf), "elm,state,%s,%s", type,
187 set ? "set" : "unset"); 187 set ? "set" : "unset");
188 } 188 }
189 efl_layout_signal_emit(obj, buf, "elm"); 189 efl_layout_signal_emit(obj, buf, "elm");
190} 190}
191 191
192static inline void 192static inline void
@@ -219,16 +219,22 @@ _icon_signal_emit(Efl_Ui_Layout_Object_Data *sd,
219 if (!_efl_ui_layout_swallow_parts[i]) return; 219 if (!_efl_ui_layout_swallow_parts[i]) return;
220 if (!strcmp(sub_d->part, _efl_ui_layout_swallow_parts[i])) break; 220 if (!strcmp(sub_d->part, _efl_ui_layout_swallow_parts[i])) break;
221 } 221 }
222
223 } 222 }
224 223
225 if (elm_widget_is_legacy(sd->obj) && 224 if (elm_widget_is_legacy(sd->obj))
226 !strncmp(sub_d->part, "elm.swallow.", strlen("elm.swallow."))) 225 {
227 type = sub_d->part + strlen("elm.swallow."); 226 if (!strncmp(sub_d->part, "elm.swallow.", strlen("elm.swallow.")))
228 else if (!strncmp(sub_d->part, "efl.", strlen("efl."))) 227 type = sub_d->part + strlen("elm.swallow.");
229 type = sub_d->part + strlen("efl."); 228 else
229 type = sub_d->part;
230 }
230 else 231 else
231 type = sub_d->part; 232 {
233 if (!strncmp(sub_d->part, "efl.", strlen("efl.")))
234 type = sub_d->part + strlen("efl.");
235 else
236 type = sub_d->part;
237 }
232 238
233 _signals_emit(sd->obj, type, visible); 239 _signals_emit(sd->obj, type, visible);
234 240
@@ -246,30 +252,37 @@ _text_signal_emit(Efl_Ui_Layout_Object_Data *sd,
246 252
247 //FIXME: Don't limit to "elm.text" prefix. 253 //FIXME: Don't limit to "elm.text" prefix.
248 //Send signals for all text parts after elm 2.0 254 //Send signals for all text parts after elm 2.0
255 if (sub_d->type != TEXT) return;
249 256
250 if (sub_d->type != TEXT) 257 if (elm_widget_is_legacy(sd->obj))
251 { 258 {
252 if (elm_widget_is_legacy(sd->obj) && 259 if (!((!strcmp("elm.text", sub_d->part)) ||
253 !((!strcmp("elm.text", sub_d->part)) ||
254 (!strncmp("elm.text.", sub_d->part, 9)))) 260 (!strncmp("elm.text.", sub_d->part, 9))))
255 { 261 return;
256 return; 262 }
257 } 263 else
258 else if (!((!strcmp("efl.text", sub_d->part)) || 264 {
259 (!strncmp("efl.text.", sub_d->part, 9)))) 265 if (!((!strcmp("efl.text", sub_d->part)) ||
260 { 266 (!strncmp("efl.text.", sub_d->part, 9))))
261 return; 267 return;
262 }
263 } 268 }
264 269
265 ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd); 270 ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
266 271
267 if (!strncmp(sub_d->part, "elm.text.", strlen("elm.text."))) 272 if (elm_widget_is_legacy(sd->obj))
268 type = sub_d->part + strlen("elm.text."); 273 {
269 else if (!strncmp(sub_d->part, "efl.", strlen("efl."))) 274 if (!strncmp(sub_d->part, "elm.text.", strlen("elm.text.")))
270 type = sub_d->part + strlen("efl."); 275 type = sub_d->part + strlen("elm.text.");
276 else
277 type = sub_d->part;
278 }
271 else 279 else
272 type = sub_d->part; 280 {
281 if (!strncmp(sub_d->part, "efl.", strlen("efl.")))
282 type = sub_d->part + strlen("efl.");
283 else
284 type = sub_d->part;
285 }
273 286
274 _signals_emit(sd->obj, type, visible); 287 _signals_emit(sd->obj, type, visible);
275 288