summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-01-20 11:52:52 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-01-20 11:52:24 -0500
commit75224784bd5fde6420e6a4e67f61ab12a2eaf573 (patch)
tree09224d38154611f75f222dfa2b22a76bfd670d90
parent6ebb68777c1f78ade034d3e5d7b506a290165c33 (diff)
reset demo gadget id before deleting gadget object during drop operation
ensure that the gadget is marked as usable so that the config isn't deleted
-rw-r--r--src/bin/e_gadget.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/e_gadget.c b/src/bin/e_gadget.c
index 957096fd8..ebd1a6c9c 100644
--- a/src/bin/e_gadget.c
+++ b/src/bin/e_gadget.c
@@ -1056,12 +1056,12 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
1056 EINA_LIST_REVERSE_FOREACH(drop->gadgets, ll, dzgc) 1056 EINA_LIST_REVERSE_FOREACH(drop->gadgets, ll, dzgc)
1057 { 1057 {
1058 evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget); 1058 evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget);
1059 if (dzgc->id == -1) dzgc->id = 0;
1059 evas_object_del(dzgc->gadget); 1060 evas_object_del(dzgc->gadget);
1060 zgs->gadget_list = eina_inlist_prepend_relative(zgs->gadget_list, 1061 zgs->gadget_list = eina_inlist_prepend_relative(zgs->gadget_list,
1061 EINA_INLIST_GET(dzgc), EINA_INLIST_GET(zgc)); 1062 EINA_INLIST_GET(dzgc), EINA_INLIST_GET(zgc));
1062 zgs->gadgets = eina_list_prepend_relative_list(zgs->gadgets, dzgc, l); 1063 zgs->gadgets = eina_list_prepend_relative_list(zgs->gadgets, dzgc, l);
1063 dzgc->site = zgs; 1064 dzgc->site = zgs;
1064 if (dzgc->id == -1) dzgc->id = 0;
1065 dzgc->zone = -1; 1065 dzgc->zone = -1;
1066 _gadget_object_finalize(dzgc); 1066 _gadget_object_finalize(dzgc);
1067 } 1067 }
@@ -1069,12 +1069,12 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
1069 EINA_LIST_REVERSE_FOREACH(drop->gadgets, ll, dzgc) 1069 EINA_LIST_REVERSE_FOREACH(drop->gadgets, ll, dzgc)
1070 { 1070 {
1071 evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget); 1071 evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget);
1072 if (dzgc->id == -1) dzgc->id = 0;
1072 evas_object_del(dzgc->gadget); 1073 evas_object_del(dzgc->gadget);
1073 zgs->gadget_list = eina_inlist_append_relative(zgs->gadget_list, 1074 zgs->gadget_list = eina_inlist_append_relative(zgs->gadget_list,
1074 EINA_INLIST_GET(dzgc), EINA_INLIST_GET(zgc)); 1075 EINA_INLIST_GET(dzgc), EINA_INLIST_GET(zgc));
1075 zgs->gadgets = eina_list_append_relative_list(zgs->gadgets, dzgc, l); 1076 zgs->gadgets = eina_list_append_relative_list(zgs->gadgets, dzgc, l);
1076 dzgc->site = zgs; 1077 dzgc->site = zgs;
1077 if (dzgc->id == -1) dzgc->id = 0;
1078 dzgc->zone = -1; 1078 dzgc->zone = -1;
1079 _gadget_object_finalize(dzgc); 1079 _gadget_object_finalize(dzgc);
1080 } 1080 }
@@ -1123,12 +1123,12 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
1123 EINA_LIST_FOREACH(drop->gadgets, l, dzgc) 1123 EINA_LIST_FOREACH(drop->gadgets, l, dzgc)
1124 { 1124 {
1125 evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget); 1125 evas_object_smart_callback_call(zgs->layout, "gadget_moved", dzgc->gadget);
1126 if (dzgc->id == -1) dzgc->id = 0;
1126 evas_object_del(dzgc->gadget); 1127 evas_object_del(dzgc->gadget);
1127 zgs->gadget_list = eina_inlist_append(zgs->gadget_list, 1128 zgs->gadget_list = eina_inlist_append(zgs->gadget_list,
1128 EINA_INLIST_GET(dzgc)); 1129 EINA_INLIST_GET(dzgc));
1129 zgs->gadgets = eina_list_append(zgs->gadgets, dzgc); 1130 zgs->gadgets = eina_list_append(zgs->gadgets, dzgc);
1130 dzgc->site = zgs; 1131 dzgc->site = zgs;
1131 if (dzgc->id == -1) dzgc->id = 0;
1132 dzgc->zone = -1; 1132 dzgc->zone = -1;
1133 _gadget_object_finalize(dzgc); 1133 _gadget_object_finalize(dzgc);
1134 } 1134 }
@@ -1169,6 +1169,7 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
1169 } 1169 }
1170 else 1170 else
1171 dzgc->zone = -1; 1171 dzgc->zone = -1;
1172 if (dzgc->id == -1) dzgc->id = 0;
1172 evas_object_del(dzgc->gadget); 1173 evas_object_del(dzgc->gadget);
1173 zgs->gadget_list = eina_inlist_append(zgs->gadget_list, 1174 zgs->gadget_list = eina_inlist_append(zgs->gadget_list,
1174 EINA_INLIST_GET(dzgc)); 1175 EINA_INLIST_GET(dzgc));
@@ -1178,7 +1179,6 @@ _site_drop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
1178 dzgc->w = gw / (double)w; 1179 dzgc->w = gw / (double)w;
1179 dzgc->h = gh / (double)h; 1180 dzgc->h = gh / (double)h;
1180 dzgc->site = zgs; 1181 dzgc->site = zgs;
1181 if (dzgc->id == -1) dzgc->id = 0;
1182 _gadget_object_finalize(dzgc); 1182 _gadget_object_finalize(dzgc);
1183 } 1183 }
1184 } 1184 }