summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-10-06 16:07:51 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-10-06 16:07:51 +0300
commitc7b7128f2d3db886b51a46b36b3bfdd38d2c0e79 (patch)
treedc707627f36e9557f92db2c6ee4d1f10c44e872c
parentf0afd901e3e9c98771d70ed761cce164bbf4c589 (diff)
Cleanup after RESIZE_OBJECT gone to Content
-rw-r--r--src/bin/egui_gui/editor.c37
-rw-r--r--src/bin/egui_gui/props_helper.c17
-rw-r--r--src/lib/database.h1
3 files changed, 0 insertions, 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
1856 /* and change dependencies. */ 1856 /* and change dependencies. */
1857 gui_value_name_id_set(val, type, new_dep_id); 1857 gui_value_name_id_set(val, type, new_dep_id);
1858 1858
1859 /* Special case, change widget's parent if property : RESIZE_OBJECT_ADD */
1860 if (!strcmp(db_op_desc_op_name_get(op), RESIZE_OBJECT_ADD))
1861 {
1862 const Gui_Widget* parent_win = wdg_main_wdg_get(new_param_wdg);
1863 if (cur_param_wdg)
1864 {
1865 wdg_parent_set(cur_param_wdg, wdg_name_get(parent_win));
1866 }
1867 wdg_parent_set(new_param_wdg, wdg_name_get(wdg));
1868 objtree_item_selected_set(wdg);
1869 }
1870 if (cur_param) reload_win = EINA_TRUE; 1859 if (cur_param) reload_win = EINA_TRUE;
1871 } 1860 }
1872 else if (type == GUI_TYPE_FILE) 1861 else if (type == GUI_TYPE_FILE)
@@ -1943,9 +1932,6 @@ _prop_update_from_propview(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Descr
1943 Gui_Session *session = (Gui_Session *) gui_context_editor_session_get(ctx); 1932 Gui_Session *session = (Gui_Session *) gui_context_editor_session_get(ctx);
1944 manager_widget_property_add(session, wdg, prop, MODE_EDITOR, NULL); 1933 manager_widget_property_add(session, wdg, prop, MODE_EDITOR, NULL);
1945 } 1934 }
1946 /* Special case, rebuild propview if property: RESIZE_OBJECT_ADD */
1947 if (!strcmp(db_op_desc_op_name_get(op), RESIZE_OBJECT_ADD))
1948 propview_build(wdg);
1949 } 1935 }
1950 return EO_CALLBACK_CONTINUE; 1936 return EO_CALLBACK_CONTINUE;
1951 /* FIXME: add return here? */ 1937 /* FIXME: add return here? */
@@ -1958,29 +1944,6 @@ _prop_del_from_propview(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Descript
1958{ 1944{
1959 const Gui_Widget *wdg = _editor_wdg_selected_get(); 1945 const Gui_Widget *wdg = _editor_wdg_selected_get();
1960 Gui_Widget_Property *prop = data; 1946 Gui_Widget_Property *prop = data;
1961 const Op_Desc *op = prop_op_desc_get(prop);
1962 Gui_Value *val;
1963 Eina_List *l;
1964
1965 /* Special case, change widget's parent if property: RESIZE_OBJECT_ADD */
1966 if (!strcmp(db_op_desc_op_name_get(op), RESIZE_OBJECT_ADD))
1967 {
1968 EINA_LIST_FOREACH(prop_value_get(prop), l, val)
1969 {
1970 if (gui_value_type_get(val) == GUI_TYPE_OBJECT)
1971 {
1972 Dep_Id *dep_id = DEP_ID_GET(val);
1973 Gui_Widget *param_wdg = wdg_get(dep_id);
1974 if (param_wdg)
1975 {
1976 const Gui_Widget *parent_win = wdg_main_wdg_get(param_wdg);
1977 /* Do it to update list. */
1978 wdg_parent_set(param_wdg, wdg_name_get(parent_win));
1979 objtree_item_selected_set(wdg);
1980 }
1981 }
1982 }
1983 }
1984 1947
1985 wdg_prop_remove((Gui_Widget *) wdg, prop); 1948 wdg_prop_remove((Gui_Widget *) wdg, prop);
1986 1949
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
157 if (found) continue; 157 if (found) continue;
158 } 158 }
159 159
160 /* if widget already has this resize object, don't add it to hoversel*/
161 Eina_List *itr2;
162 Gui_Widget_Property *prop;
163 Eina_Bool dont_add_this_widget = EINA_FALSE;
164 if (wdg)
165 {
166 EINA_LIST_FOREACH(wdg_prop_list_get(wdg), itr2, prop)
167 {
168 if (!strcmp(prop_name_get(prop), RESIZE_OBJECT_ADD))
169 {
170 Gui_Value *val = prop_value_nth_get(prop, 0);
171 if (DEP_ID_GET(val) == wdg_dep_id_get(w))
172 dont_add_this_widget = EINA_TRUE;
173 }
174 }
175 }
176 if (dont_add_this_widget) continue;
177 eo_do(hoversel, elm_obj_hoversel_item_add(wdg_name_get(w), NULL, ELM_ICON_NONE, NULL, NULL)); 160 eo_do(hoversel, elm_obj_hoversel_item_add(wdg_name_get(w), NULL, ELM_ICON_NONE, NULL, NULL));
178 } 161 }
179 } 162 }
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;
118#define SIZE_HINT_WEIGHT_SET "size_hint_weight" 118#define SIZE_HINT_WEIGHT_SET "size_hint_weight"
119#define SIZE_HINT_ALIGN_SET "size_hint_align" 119#define SIZE_HINT_ALIGN_SET "size_hint_align"
120#define POSITION_SET "position" 120#define POSITION_SET "position"
121#define RESIZE_OBJECT_ADD "resize_object_add"
122#define ELM_OBJ_WIN_CONSTRUCTOR "constructor" 121#define ELM_OBJ_WIN_CONSTRUCTOR "constructor"
123#define FILE_SET "file" 122#define FILE_SET "file"
124#define CONTENT_SET "content_set" 123#define CONTENT_SET "content_set"