summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2015-12-15 15:33:17 +0200
committerYakov Goldberg <yakov.g@samsung.com>2015-12-29 14:20:16 +0200
commita40b39b90425784d42c9128d77787afb023e81f3 (patch)
tree2b886ee409f02ce5ea5ac517dae02795eccf7d4a
parent1f422ea1ba24d2ae48c79c7683c29e856925368a (diff)
Implement full support for _container_update in updater
Implement both - object and item container reloading mechanism in updater. It works for layout and naviframe in different combinations. Need to check: item container inside item container.
-rw-r--r--src/lib/updater.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/lib/updater.c b/src/lib/updater.c
index 2e92273..f60f2be 100644
--- a/src/lib/updater.c
+++ b/src/lib/updater.c
@@ -129,16 +129,29 @@ _eo_prop_apply(const Eina_List *sessions, Eid *eid, Gui_Widget_Property *prop)
129} 129}
130 130
131static void 131static void
132_obj_container_update(const Eina_List *sessions, Eid *eid) 132_container_update(const Eina_List *sessions, Eid *eid)
133{ 133{
134 const Eina_List *itr; 134 const Eina_List *itr;
135 Gui_Session *s; 135 Gui_Session *s;
136 Gui_Widget *wdg = wdg_get(eid); 136 Gui_Widget *wdg = wdg_get(eid);
137 EINA_LIST_FOREACH(sessions, itr, s) 137 if (wdg_container_type_get(wdg) == OBJ_CONTAINER)
138 {
139 EINA_LIST_FOREACH(sessions, itr, s)
140 {
141 const char *cont_kl_name = wdg_obj_container_class_name_get(wdg);
142 if (cont_kl_name) manager_widget_content_unset_all(s, wdg, cont_kl_name, NULL);
143 manager_widget_configure(s, wdg, NULL);
144 }
145 }
146 else if (wdg_container_type_get(wdg) == ITEM_CONTAINER)
138 { 147 {
139 const char *cont_kl_name = wdg_obj_container_class_name_get(wdg); 148 /* The only way to reload itemed widget - delete it.*/
140 if (cont_kl_name) manager_widget_content_unset_all(s, wdg, cont_kl_name, NULL); 149 _eo_del_apply(sessions, eid);
141 manager_widget_configure(s, wdg, NULL); 150 _eo_add_apply(sessions, eid);
151
152 /* Repack parent after creation. */
153 Eid *parent_container_id = wdg_parent_container_eid_get(wdg);
154 if (parent_container_id) _container_update(sessions, parent_container_id);
142 } 155 }
143} 156}
144 157
@@ -203,7 +216,7 @@ _update_check(void *data EINA_UNUSED)
203 { 216 {
204 _eo_add_apply(sessions, eid); 217 _eo_add_apply(sessions, eid);
205 Eid *parent_container_id = wdg_parent_container_eid_get(wdg); 218 Eid *parent_container_id = wdg_parent_container_eid_get(wdg);
206 if (parent_container_id) _obj_container_update(sessions, parent_container_id); 219 if (parent_container_id) _container_update(sessions, parent_container_id);
207 } 220 }
208 break; 221 break;
209 } 222 }
@@ -217,7 +230,7 @@ _update_check(void *data EINA_UNUSED)
217 _eo_add_apply(sessions, eid); 230 _eo_add_apply(sessions, eid);
218 /* Here separate algorithm for each kind of container can be implemented. */ 231 /* Here separate algorithm for each kind of container can be implemented. */
219 Eid *parent_container_id = wdg_parent_container_eid_get(wdg); 232 Eid *parent_container_id = wdg_parent_container_eid_get(wdg);
220 if (parent_container_id) _obj_container_update(sessions, parent_container_id); 233 if (parent_container_id) _container_update(sessions, parent_container_id);
221 } 234 }
222 else if (to) 235 else if (to)
223 { 236 {
@@ -229,13 +242,13 @@ _update_check(void *data EINA_UNUSED)
229 _eo_add_apply(sessions, eid); 242 _eo_add_apply(sessions, eid);
230 /* Here separate algorithm for each kind of container can be implemented. */ 243 /* Here separate algorithm for each kind of container can be implemented. */
231 Eid *parent_container_id = wdg_parent_container_eid_get(wdg); 244 Eid *parent_container_id = wdg_parent_container_eid_get(wdg);
232 if (parent_container_id) _obj_container_update(sessions, parent_container_id); 245 if (parent_container_id) _container_update(sessions, parent_container_id);
233 } 246 }
234 break; 247 break;
235 } 248 }
236 case MEMENTO_OBJ_CONTAINER: 249 case MEMENTO_OBJ_CONTAINER:
237 { 250 {
238 _obj_container_update(sessions, eid); 251 _container_update(sessions, eid);
239 break; 252 break;
240 } 253 }
241 case MEMENTO_WIDGET_PARENT: 254 case MEMENTO_WIDGET_PARENT:
@@ -258,7 +271,7 @@ _update_check(void *data EINA_UNUSED)
258 _eo_add_apply(sessions, eid); 271 _eo_add_apply(sessions, eid);
259 /* Here separate algorithm for each kind of container can be implemented. */ 272 /* Here separate algorithm for each kind of container can be implemented. */
260 Eid *parent_container_id = wdg_parent_container_eid_get(wdg); 273 Eid *parent_container_id = wdg_parent_container_eid_get(wdg);
261 if (parent_container_id) _obj_container_update(sessions, parent_container_id); 274 if (parent_container_id) _container_update(sessions, parent_container_id);
262 } 275 }
263 break; 276 break;
264 } 277 }
@@ -286,7 +299,7 @@ _update_check(void *data EINA_UNUSED)
286 { 299 {
287 case UPDATER_PROPERTIES_FORCE: 300 case UPDATER_PROPERTIES_FORCE:
288 { 301 {
289 _obj_container_update(sessions, info->eid); 302 _container_update(sessions, info->eid);
290 break; 303 break;
291 } 304 }
292 default: break; 305 default: break;