summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-11-18 11:03:37 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-11-18 11:05:27 -0500
commit06db737a23f28ba878577a761f7f3aceef3276ec (patch)
treedb56bd738f04f6c2c3cc4ebcb301a4ce445d044d
parent7d720f5edecdd15df0162a6c486ab696bc66724b (diff)
elm_cursor: restore compat with previous theme api
adding new theme groups/parts is fine, but compat must be maintained for released theme api: anything which is namespaced ref 1422e61e6207ed6fe21063a15a8fb8475eef9865
-rw-r--r--data/elementary/themes/edc/elm/cursor.edc6
-rw-r--r--src/lib/elementary/els_cursor.c11
2 files changed, 16 insertions, 1 deletions
diff --git a/data/elementary/themes/edc/elm/cursor.edc b/data/elementary/themes/edc/elm/cursor.edc
index 67e374a8c8..f836f9da4b 100644
--- a/data/elementary/themes/edc/elm/cursor.edc
+++ b/data/elementary/themes/edc/elm/cursor.edc
@@ -98,6 +98,8 @@ group { name: "elm/cursor/hand1/default";
98 rel2.offset: 0 0; 98 rel2.offset: 0 0;
99 } 99 }
100 } 100 }
101 /* elm.content.hotspot is the old name for the above part */
102 alias: "elm.content.hotspot" "elm.swallow.hotspot";
101 } 103 }
102} 104}
103 105
@@ -109,6 +111,8 @@ group { name: "elm/cursor/blank/default";
109 max: 1 1; 111 max: 1 1;
110 } 112 }
111 } 113 }
114 /* elm.content.hotspot is the old name for the above part */
115 alias: "elm.content.hotspot" "elm.swallow.hotspot";
112 } 116 }
113} 117}
114 118
@@ -137,6 +141,8 @@ group { name: "elm/cursor/xterm/default";
137 rel2.offset: 0 0; 141 rel2.offset: 0 0;
138 } 142 }
139 } 143 }
144 /* elm.content.hotspot is the old name for the above part */
145 alias: "elm.content.hotspot" "elm.swallow.hotspot";
140 part { name: "shine"; 146 part { name: "shine";
141 description { state: "default" 0.0; 147 description { state: "default" 0.0;
142 rel1.to: "base"; 148 rel1.to: "base";
diff --git a/src/lib/elementary/els_cursor.c b/src/lib/elementary/els_cursor.c
index 9ffc4b768a..3bb29bf62e 100644
--- a/src/lib/elementary/els_cursor.c
+++ b/src/lib/elementary/els_cursor.c
@@ -277,7 +277,16 @@ _elm_cursor_obj_add(Evas_Object *obj, Elm_Cursor *cur)
277 _elm_cursor_hot_change, cur); 277 _elm_cursor_hot_change, cur);
278 evas_object_event_callback_add(cur->hotobj, EVAS_CALLBACK_RESIZE, 278 evas_object_event_callback_add(cur->hotobj, EVAS_CALLBACK_RESIZE,
279 _elm_cursor_hot_change, cur); 279 _elm_cursor_hot_change, cur);
280 edje_object_part_swallow(cur->obj, "elm.swallow.hotspot", cur->hotobj); 280 if (edje_object_part_exists(cur->obj, "elm.swallow.hotspot"))
281 edje_object_part_swallow(cur->obj, "elm.swallow.hotspot", cur->hotobj);
282 else if (edje_object_part_exists(cur->obj, "elm.content.hotspot"))
283 edje_object_part_swallow(cur->obj, "elm.content.hotspot", cur->hotobj);
284 else
285 {
286 ELM_SAFE_FREE(cur->hotobj, evas_object_del);
287 ELM_SAFE_FREE(cur->obj, evas_object_del);
288 return EINA_FALSE;
289 }
281 290
282 evas_object_event_callback_add(cur->obj, EVAS_CALLBACK_DEL, 291 evas_object_event_callback_add(cur->obj, EVAS_CALLBACK_DEL,
283 _elm_cursor_obj_del, cur); 292 _elm_cursor_obj_del, cur);