remove hover code entirely
This commit is contained in:
parent
26445b9a81
commit
0667c3dca4
|
@ -119,8 +119,6 @@ static void _forecasts_convert_pressures(float *value, int dir);
|
|||
static void _forecasts_display_set(Instance *inst, int ok);
|
||||
static void _forecasts_popup_content_create(Instance *inst);
|
||||
static void _cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static void _cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info);
|
||||
static Evas_Object *_forecasts_popup_icon_create(Evas *evas, const char *code);
|
||||
static void _forecasts_popup_destroy(Instance *inst);
|
||||
|
||||
|
@ -151,10 +149,6 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
|||
inst->forecasts_obj = o;
|
||||
evas_object_event_callback_add(inst->forecasts_obj, EVAS_CALLBACK_MOUSE_UP,
|
||||
_cb_mouse_up, inst);
|
||||
evas_object_event_callback_add(inst->forecasts_obj, EVAS_CALLBACK_MOUSE_IN,
|
||||
_cb_mouse_in, inst);
|
||||
evas_object_event_callback_add(inst->forecasts_obj, EVAS_CALLBACK_MOUSE_OUT,
|
||||
_cb_mouse_out, inst);
|
||||
|
||||
if (!inst->url_data_handler)
|
||||
inst->url_data_handler =
|
||||
|
@ -1124,42 +1118,17 @@ _cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
||||
if (ev->button == 1)
|
||||
{
|
||||
if (!inst->ci->popup_on_hover)
|
||||
if (!inst->popup)
|
||||
{
|
||||
if (!inst->popup)
|
||||
{
|
||||
_forecasts_popup_content_create(inst);
|
||||
e_gadcon_popup_show(inst->popup);
|
||||
e_gadcon_popup_toggle_pinned(inst->popup);
|
||||
}
|
||||
else
|
||||
{
|
||||
_forecasts_popup_destroy(inst);
|
||||
inst->popup = NULL;
|
||||
}
|
||||
_forecasts_popup_content_create(inst);
|
||||
e_gadcon_popup_show(inst->popup);
|
||||
e_gadcon_popup_toggle_pinned(inst->popup);
|
||||
}
|
||||
else
|
||||
{
|
||||
_forecasts_popup_destroy(inst);
|
||||
inst->popup = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Instance *inst = data;
|
||||
|
||||
if (!inst->ci->popup_on_hover) return;
|
||||
if (!inst->popup) _forecasts_popup_content_create(inst);
|
||||
e_gadcon_popup_show(inst->popup);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Instance *inst = data;
|
||||
|
||||
if (!(inst->popup)) return;
|
||||
if (inst->popup->pinned) return;
|
||||
_forecasts_popup_destroy(inst);
|
||||
inst->popup = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue