summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-05-26 19:09:15 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-05-26 19:09:15 +0300
commita519a01a0170d6199fecb74574e61e7bd66cfe20 (patch)
tree80acfb47dbea8b3ccbe4ead354e9bc1dd9542154
parent2dc46e43b0c21d4abbf5698610afc4553aaecc4b (diff)
Fix management of resize object in windows
- if some object is already used as resize, don't allow to choose it; - disable possibility of changing resize object (only deletion).
-rw-r--r--src/bin/egui_gui/props_helper.c16
-rw-r--r--src/bin/egui_gui/propview.c6
-rw-r--r--src/lib/database.h1
3 files changed, 23 insertions, 0 deletions
diff --git a/src/bin/egui_gui/props_helper.c b/src/bin/egui_gui/props_helper.c
index eae505f..572a807 100644
--- a/src/bin/egui_gui/props_helper.c
+++ b/src/bin/egui_gui/props_helper.c
@@ -146,6 +146,22 @@ props_hoversel_objects_add(Eo *box, Eo *hover_parent, const char *default_val, c
146 /*check, if wdg is content of w on any level. */ 146 /*check, if wdg is content of w on any level. */
147 (wdg_is_content_of(w, wdg)))) 147 (wdg_is_content_of(w, wdg))))
148 continue; 148 continue;
149
150 /* if widget already has this resize object, don't add it to hoversel*/
151 Eina_List *itr2;
152 Gui_Widget_Property *prop;
153 Eina_Bool dont_add_this_widget = EINA_FALSE;
154 EINA_LIST_FOREACH(wdg_prop_list_get(wdg), itr2, prop)
155 {
156 if (!strcmp(prop_name_get(prop), RESIZE_OBJECT_ADD))
157 {
158 Gui_Value *val = prop_value_nth_get(prop, 0);
159 if (DEP_ID_GET(val) == wdg_dep_id_get(w))
160 dont_add_this_widget = EINA_TRUE;
161 }
162 }
163 if (dont_add_this_widget) continue;
164
149 elm_hoversel_item_add(hoversel, wdg_name_get(w), NULL, ELM_ICON_NONE, NULL, NULL); 165 elm_hoversel_item_add(hoversel, wdg_name_get(w), NULL, ELM_ICON_NONE, NULL, NULL);
150 } 166 }
151 } 167 }
diff --git a/src/bin/egui_gui/propview.c b/src/bin/egui_gui/propview.c
index 9b53d6c..401c160 100644
--- a/src/bin/egui_gui/propview.c
+++ b/src/bin/egui_gui/propview.c
@@ -133,6 +133,12 @@ _property_item_content_get(It_Data *it_data, Eo *box)
133 eo_do(obj, eo_key_data_set(_STR_EDITOR, pfd, free)); 133 eo_do(obj, eo_key_data_set(_STR_EDITOR, pfd, free));
134 evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _pfd_del, NULL); 134 evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _pfd_del, NULL);
135 135
136 /* forbid changing of value in "resize_object_add"*/
137 if (prop && value && (!strcmp(prop_name_get(prop), RESIZE_OBJECT_ADD)))
138 {
139 eo_do(obj, elm_obj_widget_disabled_set(EINA_TRUE));
140 }
141
136 if (eo_isa(obj, ELM_OBJ_HOVERSEL_CLASS)) 142 if (eo_isa(obj, ELM_OBJ_HOVERSEL_CLASS))
137 { 143 {
138 evas_object_smart_callback_add(obj, "selected", _view_cbs->property_update_cb_func, NULL); 144 evas_object_smart_callback_add(obj, "selected", _view_cbs->property_update_cb_func, NULL);
diff --git a/src/lib/database.h b/src/lib/database.h
index 7c79ee5..330550b 100644
--- a/src/lib/database.h
+++ b/src/lib/database.h
@@ -98,6 +98,7 @@ typedef struct _Container_Desc Container_Desc;
98#define SIZE_HINT_WEIGHT_SET "size_hint_weight" 98#define SIZE_HINT_WEIGHT_SET "size_hint_weight"
99#define SIZE_HINT_ALIGN_SET "size_hint_align" 99#define SIZE_HINT_ALIGN_SET "size_hint_align"
100#define POSITION_SET "position" 100#define POSITION_SET "position"
101#define RESIZE_OBJECT_ADD "resize_object_add"
101#define ELM_OBJ_WIN_CONSTRUCTOR "elm_obj_win_constructor" 102#define ELM_OBJ_WIN_CONSTRUCTOR "elm_obj_win_constructor"
102 103
103Eina_Bool 104Eina_Bool