From c7b7128f2d3db886b51a46b36b3bfdd38d2c0e79 Mon Sep 17 00:00:00 2001 From: Yakov Goldberg Date: Mon, 6 Oct 2014 16:07:51 +0300 Subject: Cleanup after RESIZE_OBJECT gone to Content --- src/bin/egui_gui/editor.c | 37 ------------------------------------- src/bin/egui_gui/props_helper.c | 17 ----------------- src/lib/database.h | 1 - 3 files changed, 55 deletions(-) diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c index b280bc2..ee99d1f 100644 --- a/src/bin/egui_gui/editor.c +++ b/src/bin/egui_gui/editor.c @@ -1856,17 +1856,6 @@ _prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Descr /* and change dependencies. */ gui_value_name_id_set(val, type, new_dep_id); - /* Special case, change widget's parent if property : RESIZE_OBJECT_ADD */ - if (!strcmp(db_op_desc_op_name_get(op), RESIZE_OBJECT_ADD)) - { - const Gui_Widget* parent_win = wdg_main_wdg_get(new_param_wdg); - if (cur_param_wdg) - { - wdg_parent_set(cur_param_wdg, wdg_name_get(parent_win)); - } - wdg_parent_set(new_param_wdg, wdg_name_get(wdg)); - objtree_item_selected_set(wdg); - } if (cur_param) reload_win = EINA_TRUE; } else if (type == GUI_TYPE_FILE) @@ -1943,9 +1932,6 @@ _prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Descr Gui_Session *session = (Gui_Session *) gui_context_editor_session_get(ctx); manager_widget_property_add(session, wdg, prop, MODE_EDITOR, NULL); } - /* Special case, rebuild propview if property: RESIZE_OBJECT_ADD */ - if (!strcmp(db_op_desc_op_name_get(op), RESIZE_OBJECT_ADD)) - propview_build(wdg); } return EO_CALLBACK_CONTINUE; /* FIXME: add return here? */ @@ -1958,29 +1944,6 @@ _prop_del_from_propview(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Descript { const Gui_Widget *wdg = _editor_wdg_selected_get(); Gui_Widget_Property *prop = data; - const Op_Desc *op = prop_op_desc_get(prop); - Gui_Value *val; - Eina_List *l; - - /* Special case, change widget's parent if property: RESIZE_OBJECT_ADD */ - if (!strcmp(db_op_desc_op_name_get(op), RESIZE_OBJECT_ADD)) - { - EINA_LIST_FOREACH(prop_value_get(prop), l, val) - { - if (gui_value_type_get(val) == GUI_TYPE_OBJECT) - { - Dep_Id *dep_id = DEP_ID_GET(val); - Gui_Widget *param_wdg = wdg_get(dep_id); - if (param_wdg) - { - const Gui_Widget *parent_win = wdg_main_wdg_get(param_wdg); - /* Do it to update list. */ - wdg_parent_set(param_wdg, wdg_name_get(parent_win)); - objtree_item_selected_set(wdg); - } - } - } - } wdg_prop_remove((Gui_Widget *) wdg, prop); diff --git a/src/bin/egui_gui/props_helper.c b/src/bin/egui_gui/props_helper.c index 154dad2..333b682 100644 --- a/src/bin/egui_gui/props_helper.c +++ b/src/bin/egui_gui/props_helper.c @@ -157,23 +157,6 @@ props_hoversel_objects_add(Eo *box, Eo *hover_parent, const char *default_val, c if (found) continue; } - /* if widget already has this resize object, don't add it to hoversel*/ - Eina_List *itr2; - Gui_Widget_Property *prop; - Eina_Bool dont_add_this_widget = EINA_FALSE; - if (wdg) - { - EINA_LIST_FOREACH(wdg_prop_list_get(wdg), itr2, prop) - { - if (!strcmp(prop_name_get(prop), RESIZE_OBJECT_ADD)) - { - Gui_Value *val = prop_value_nth_get(prop, 0); - if (DEP_ID_GET(val) == wdg_dep_id_get(w)) - dont_add_this_widget = EINA_TRUE; - } - } - } - if (dont_add_this_widget) continue; eo_do(hoversel, elm_obj_hoversel_item_add(wdg_name_get(w), NULL, ELM_ICON_NONE, NULL, NULL)); } } diff --git a/src/lib/database.h b/src/lib/database.h index 45fdcf7..cf52e9f 100644 --- a/src/lib/database.h +++ b/src/lib/database.h @@ -118,7 +118,6 @@ typedef struct _Container_Desc Container_Desc; #define SIZE_HINT_WEIGHT_SET "size_hint_weight" #define SIZE_HINT_ALIGN_SET "size_hint_align" #define POSITION_SET "position" -#define RESIZE_OBJECT_ADD "resize_object_add" #define ELM_OBJ_WIN_CONSTRUCTOR "constructor" #define FILE_SET "file" #define CONTENT_SET "content_set" -- cgit v1.2.1