summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYossi Kantor <yossi.kantor@samsung.com>2014-10-28 11:39:30 +0200
committerYossi Kantor <yossi.kantor@samsung.com>2014-10-28 15:30:08 +0200
commiteb64230d982c2e11658fbb729782d9bfaac6d242 (patch)
treeab36ba0c95f7e73e681498ccba3206d7430d86cd
parent58186c4ab88ed0c7b01ba6c6afe7a9d0a6007cf0 (diff)
Naviframe add null value in objects and load save style
-rw-r--r--src/bin/egui_gui/props_helper.c3
-rw-r--r--src/lib/gui_parser.c15
-rw-r--r--src/lib/json_generator.c3
3 files changed, 20 insertions, 1 deletions
diff --git a/src/bin/egui_gui/props_helper.c b/src/bin/egui_gui/props_helper.c
index d8f5675..8915a03 100644
--- a/src/bin/egui_gui/props_helper.c
+++ b/src/bin/egui_gui/props_helper.c
@@ -299,7 +299,8 @@ props_hoversel_objects_add(Eo *box, Eo *hoversel, Eo *hover_parent, const char *
299 299
300 if ((wdg) && 300 if ((wdg) &&
301 (!strcmp(wdg_class_name_get(wdg), DB_DEF_CTXPOPUP_CLASS) || 301 (!strcmp(wdg_class_name_get(wdg), DB_DEF_CTXPOPUP_CLASS) ||
302 !strcmp(wdg_class_name_get(wdg), DB_DEF_DISKSELECTOR_CLASS))) 302 !strcmp(wdg_class_name_get(wdg), DB_DEF_DISKSELECTOR_CLASS) ||
303 !strcmp(wdg_class_name_get(wdg), DB_DEF_NAVIFRAME_CLASS)))
303 { 304 {
304 eo_do(hoversel, elm_obj_hoversel_item_add(PROP_HOVERSEL_NONE_VALUE, NULL, ELM_ICON_NONE, NULL, NULL)); 305 eo_do(hoversel, elm_obj_hoversel_item_add(PROP_HOVERSEL_NONE_VALUE, NULL, ELM_ICON_NONE, NULL, NULL));
305 } 306 }
diff --git a/src/lib/gui_parser.c b/src/lib/gui_parser.c
index dae28ee..924f80e 100644
--- a/src/lib/gui_parser.c
+++ b/src/lib/gui_parser.c
@@ -274,6 +274,7 @@ _read_items_section(const Gui_Context *gui_ctx, Gui_Widget *wdg, Item_Container_
274 Gui_Value *val_parent_it = NULL, *val_label = NULL, *val_icon = NULL, *val_cb = NULL; 274 Gui_Value *val_parent_it = NULL, *val_label = NULL, *val_icon = NULL, *val_cb = NULL;
275 Gui_Type val_icon_type; 275 Gui_Type val_icon_type;
276 Gui_Value *val_prev_btn = NULL, *val_next_btn = NULL, *val_content = NULL; 276 Gui_Value *val_prev_btn = NULL, *val_next_btn = NULL, *val_content = NULL;
277 Gui_Value *val_style = NULL;
277 278
278 if (!strcmp(class_name, DB_DEF_MENU_CLASS)) 279 if (!strcmp(class_name, DB_DEF_MENU_CLASS))
279 { 280 {
@@ -304,6 +305,7 @@ _read_items_section(const Gui_Context *gui_ctx, Gui_Widget *wdg, Item_Container_
304 val_prev_btn = prop_value_nth_get(prop, 1); 305 val_prev_btn = prop_value_nth_get(prop, 1);
305 val_next_btn = prop_value_nth_get(prop, 2); 306 val_next_btn = prop_value_nth_get(prop, 2);
306 val_content = prop_value_nth_get(prop, 3); 307 val_content = prop_value_nth_get(prop, 3);
308 val_style = prop_value_nth_get(prop, 4);
307 } 309 }
308 /* Put 0nt parameter - parent item 310 /* Put 0nt parameter - parent item
309 * this parent exists for Menu widget. */ 311 * this parent exists for Menu widget. */
@@ -398,6 +400,19 @@ _read_items_section(const Gui_Context *gui_ctx, Gui_Widget *wdg, Item_Container_
398 } 400 }
399 } 401 }
400 402
403 tmp = EINA_JSON_OBJECT_VALUE_GET(js_it, "style");
404 if (tmp)
405 {
406 if (eina_json_type_get(tmp) == EINA_JSON_TYPE_STRING)
407 {
408 gui_value_string_set(val_style, strdup(eina_json_string_get(tmp)));
409 }
410 else
411 {
412 gui_value_string_set(val_style, NULL);
413 }
414 }
415
401 /* Read "callback" field from JSON. */ 416 /* Read "callback" field from JSON. */
402 tmp = EINA_JSON_OBJECT_VALUE_GET(js_it, "callback"); 417 tmp = EINA_JSON_OBJECT_VALUE_GET(js_it, "callback");
403 if (tmp) 418 if (tmp)
diff --git a/src/lib/json_generator.c b/src/lib/json_generator.c
index 53fb0b2..8daf9fa 100644
--- a/src/lib/json_generator.c
+++ b/src/lib/json_generator.c
@@ -202,6 +202,7 @@ _item_json_generate(const Gui_Widget *wdg, const Item_Container_Item *wit)
202 202
203 Gui_Value *val_label = NULL, *val_icon = NULL, *val_cb = NULL; 203 Gui_Value *val_label = NULL, *val_icon = NULL, *val_cb = NULL;
204 Gui_Value *val_prev_btn = NULL, *val_next_btn = NULL, *val_content = NULL; 204 Gui_Value *val_prev_btn = NULL, *val_next_btn = NULL, *val_content = NULL;
205 Gui_Value *val_style = NULL;
205 206
206 if (!strcmp(class_name, DB_DEF_MENU_CLASS)) 207 if (!strcmp(class_name, DB_DEF_MENU_CLASS))
207 { 208 {
@@ -228,6 +229,7 @@ _item_json_generate(const Gui_Widget *wdg, const Item_Container_Item *wit)
228 val_prev_btn = prop_value_nth_get(prop, 1); 229 val_prev_btn = prop_value_nth_get(prop, 1);
229 val_next_btn = prop_value_nth_get(prop, 2); 230 val_next_btn = prop_value_nth_get(prop, 2);
230 val_content = prop_value_nth_get(prop, 3); 231 val_content = prop_value_nth_get(prop, 3);
232 val_style = prop_value_nth_get(prop, 4);
231 } 233 }
232 234
233 if (item_container_item_type_get(wit) == ITEM_REGULAR) 235 if (item_container_item_type_get(wit) == ITEM_REGULAR)
@@ -250,6 +252,7 @@ _item_json_generate(const Gui_Widget *wdg, const Item_Container_Item *wit)
250 if (val_prev_btn) eina_json_object_append(obj, "prevbutton", _gui_value_json_get(ctx, val_prev_btn)); 252 if (val_prev_btn) eina_json_object_append(obj, "prevbutton", _gui_value_json_get(ctx, val_prev_btn));
251 if (val_next_btn) eina_json_object_append(obj, "nextbutton", _gui_value_json_get(ctx, val_next_btn)); 253 if (val_next_btn) eina_json_object_append(obj, "nextbutton", _gui_value_json_get(ctx, val_next_btn));
252 if (val_content) eina_json_object_append(obj, "content", _gui_value_json_get(ctx, val_content)); 254 if (val_content) eina_json_object_append(obj, "content", _gui_value_json_get(ctx, val_content));
255 if (val_style) eina_json_object_append(obj, "style", _gui_value_json_get(ctx, val_style));
253 256
254 if (gui_value_type_get(val_cb) == GUI_TYPE_CB) 257 if (gui_value_type_get(val_cb) == GUI_TYPE_CB)
255 { 258 {