Properly handle context menu item callbacks on desktop.
authorAntonio Gomes <a1.gomes@samsung.com>
Wed, 18 Feb 2015 16:06:40 +0000 (12:06 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
In ContextMenuControllerEfl::ContextMenuItemSelectedCallback
there is desktop only ifdef that at somepoint made it possible
to get context menu items callbacks working.
Today, the assumption and workaround in that block of code do
not apply anymore, and was making in fact breaing context menu
items' callbacks to work.

Patch removes it and unifies mobile, tv and desktop code paths.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=8773
Reviewed by: Antonio Gomes, Piotr Grad, Piotr Tworek, arno renevier

Change-Id: I4230f336430b9e97478c9efa1f1592a5d3d18b5e
Signed-off-by: Antonio Gomes <a1.gomes@samsung.com>
tizen_src/impl/context_menu_controller_efl.cc

index 6e37d68..7f66197 100644 (file)
@@ -358,14 +358,6 @@ void ContextMenuControllerEfl::ContextMenuCancelCallback(void* data, Evas_Object
 void ContextMenuControllerEfl::ContextMenuItemSelectedCallback(void* data,
     Evas_Object* obj, void* event_info) {
   Evas_Object* pop_up = obj;
-#if !defined(OS_TIZEN)
-  // In desktop evas_object_data_get(obj) is not working because obj is not the object to which data was attached.
-  // So get the parent, obj parent is internal box, box parent is the popup to which object was attached.
-  // On target the obj that is obtained is the popup so the data is proper. Need to find why this difference?
-  // Temp added this patch so as to work both on target and device.
-  Evas_Object* list = elm_object_parent_widget_get(obj);
-  pop_up = elm_object_parent_widget_get(list);
-#endif
   ContextMenuControllerEfl* menu_controller =
       static_cast<ContextMenuControllerEfl*>
       (evas_object_data_get(pop_up, "ContextMenuContollerEfl"));