summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2014-12-29 13:56:23 +0200
committerYakov Goldberg <yakov.g@samsung.com>2014-12-29 13:56:23 +0200
commitb3d591eaaefcda15fcc71973fb8c4208ca0d0e95 (patch)
treec66c2e95e7619d10680711e84c0ee992ffd42034 /src/bin
parent1281c35b26737f6e23636f920d6a77e58faa1732 (diff)
Adding tooltip for factory items
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/egui_gui/egui_logic.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/bin/egui_gui/egui_logic.c b/src/bin/egui_gui/egui_logic.c
index d6884d9..18934c8 100644
--- a/src/bin/egui_gui/egui_logic.c
+++ b/src/bin/egui_gui/egui_logic.c
@@ -676,14 +676,25 @@ _toolbar_simulate_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info
676 } 676 }
677} 677}
678 678
679/* Callback to hide tooltip from factory, when mouse_down on it for dragging. */
680static Eina_Bool
681_factory_tt_mouse_down(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
682{
683 elm_object_tooltip_hide(obj);
684 return EO_CALLBACK_CONTINUE;
685}
686
679static void 687static void
680_factory_item_finalize(Eo *item_box, char *image_name, char *egui_class_name) 688_factory_item_finalize(Eo *item_box, char *image_name, const char *egui_class_name)
681{ 689{
682 if (!item_box) return; 690 if (!item_box) return;
683 evas_object_size_hint_align_set(item_box, 0, EVAS_HINT_FILL); 691 evas_object_size_hint_align_set(item_box, 0, EVAS_HINT_FILL);
684 692
685 Eina_List *lst = elm_box_children_get(item_box); 693 Eina_List *lst = elm_box_children_get(item_box);
686 694
695 elm_object_tooltip_text_set(item_box, egui_class_name);
696 eo_do(item_box, eo_event_callback_add(EVAS_OBJECT_EVENT_MOUSE_DOWN, _factory_tt_mouse_down, NULL));
697
687 // update of the image icon 698 // update of the image icon
688 Eo *o = eina_list_data_get(lst); 699 Eo *o = eina_list_data_get(lst);
689 char path[100] = {'\0'}; 700 char path[100] = {'\0'};