summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-05-29 11:43:59 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-05-29 11:43:59 +0300
commit67c71f5b307ecaf8088b979181a929fc7132ec27 (patch)
treec0ce0bd0fada59a43417fe590b6c484b3fcf4ab2
parent79e44fd178d6784b05745733e2e1dff0837de6eb (diff)
add checks for ResMan->Images
-rw-r--r--src/bin/egui_gui/rmview.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/bin/egui_gui/rmview.c b/src/bin/egui_gui/rmview.c
index 4d76d9f..9fbc582 100644
--- a/src/bin/egui_gui/rmview.c
+++ b/src/bin/egui_gui/rmview.c
@@ -237,6 +237,7 @@ _bt_save_clicked(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *de
237 } 237 }
238 } 238 }
239 239
240 /* For sequence take data from checkbox. */
240 if (res_type == RESOURCE_SEQUENCE) 241 if (res_type == RESOURCE_SEQUENCE)
241 { 242 {
242 Eina_Bool state; 243 Eina_Bool state;
@@ -244,7 +245,9 @@ _bt_save_clicked(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *de
244 Dep_Id seq_id = gui_context_dep_data_get_id_by_name(ctx, resource_name_get(res)); 245 Dep_Id seq_id = gui_context_dep_data_get_id_by_name(ctx, resource_name_get(res));
245 Gui_Sequence *seq = sequence_get(ctx, seq_id); 246 Gui_Sequence *seq = sequence_get(ctx, seq_id);
246 sequence_public_set(seq, state); 247 sequence_public_set(seq, state);
248 seqview_fill(ctx);
247 } 249 }
250 /* For iamge take data from image. */
248 else if (res_type == RESOURCE_IMAGE) 251 else if (res_type == RESOURCE_IMAGE)
249 { 252 {
250 eo_do(f_data->it_data->en2, str = elm_interface_fileselector_path_get()); 253 eo_do(f_data->it_data->en2, str = elm_interface_fileselector_path_get());
@@ -252,7 +255,12 @@ _bt_save_clicked(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *de
252 { 255 {
253 resource_value_set(res, str); 256 resource_value_set(res, str);
254 } 257 }
258 else
259 {
260 eo_do(f_data->it_data->en2, elm_interface_fileselector_path_set(resource_value_get(res)));
261 }
255 } 262 }
263 /* For CALLBACKS and STRINGS. */
256 else 264 else
257 { 265 {
258 eo_do(f_data->it_data->en2, str = elm_obj_widget_part_text_get(NULL)); 266 eo_do(f_data->it_data->en2, str = elm_obj_widget_part_text_get(NULL));
@@ -265,7 +273,6 @@ _bt_save_clicked(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *de
265 if (status) 273 if (status)
266 eo_do(obj, elm_obj_widget_disabled_set(EINA_TRUE)); 274 eo_do(obj, elm_obj_widget_disabled_set(EINA_TRUE));
267 275
268 seqview_fill(_active_context_get());
269 276
270 return EO_CALLBACK_CONTINUE; 277 return EO_CALLBACK_CONTINUE;
271} 278}
@@ -605,12 +612,20 @@ _rm_add_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Eve
605 } 612 }
606 } 613 }
607 614
615 /* For CALLBACKS and STRINGS: check that value str is not empty. */
608 if ((res_type != RESOURCE_SEQUENCE) && (res_type != RESOURCE_IMAGE)) 616 if ((res_type != RESOURCE_SEQUENCE) && (res_type != RESOURCE_IMAGE))
609 { 617 {
610 eo_do(_g->rm_value_entry, value_str = elm_obj_widget_part_text_get(NULL)); 618 eo_do(_g->rm_value_entry, value_str = elm_obj_widget_part_text_get(NULL));
611 if (!strlen(value_str)) 619 if (!strlen(value_str))
612 return EO_CALLBACK_CONTINUE; 620 return EO_CALLBACK_CONTINUE;
613 } 621 }
622 /* For IMAGES: check that path is not empty. */
623 else if (res_type == RESOURCE_IMAGE)
624 {
625 eo_do(_g->rm_image_fileselector, value_str = elm_interface_fileselector_path_get());
626 if (!strlen(value_str))
627 return EO_CALLBACK_CONTINUE;
628 }
614 629
615 gui_res = gui_context_resource_new((Gui_Context *) ctx, res_type, alias_str); 630 gui_res = gui_context_resource_new((Gui_Context *) ctx, res_type, alias_str);
616 if (!gui_res) 631 if (!gui_res)
@@ -630,7 +645,6 @@ _rm_add_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Eve
630 } 645 }
631 else if (res_type == RESOURCE_IMAGE) 646 else if (res_type == RESOURCE_IMAGE)
632 { 647 {
633 eo_do(_g->rm_image_fileselector, value_str = elm_interface_fileselector_path_get());
634 resource_value_set(gui_res, value_str); 648 resource_value_set(gui_res, value_str);
635 } 649 }
636 else 650 else
@@ -640,6 +654,7 @@ _rm_add_button_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Eve
640 654
641 _rmview_build(_rmview_toolbar_selected_type); 655 _rmview_build(_rmview_toolbar_selected_type);
642 eo_do(_g->rm_seq_pub_check, elm_obj_check_state_set(EINA_FALSE)); 656 eo_do(_g->rm_seq_pub_check, elm_obj_check_state_set(EINA_FALSE));
657 eo_do(_g->rm_image_fileselector, elm_interface_fileselector_path_set(NULL));
643 eo_do(_g->rm_alias_entry, elm_obj_widget_part_text_set(NULL, NULL)); 658 eo_do(_g->rm_alias_entry, elm_obj_widget_part_text_set(NULL, NULL));
644 eo_do(_g->rm_value_entry, elm_obj_widget_part_text_set(NULL, NULL)); 659 eo_do(_g->rm_value_entry, elm_obj_widget_part_text_set(NULL, NULL));
645 return EO_CALLBACK_CONTINUE; 660 return EO_CALLBACK_CONTINUE;