bryce scaling action
This commit is contained in:
parent
0d27de5cee
commit
40cf98dfcd
|
@ -2,9 +2,11 @@
|
||||||
#include "gadget.h"
|
#include "gadget.h"
|
||||||
|
|
||||||
#define DEFAULT_LAYER E_LAYER_POPUP
|
#define DEFAULT_LAYER E_LAYER_POPUP
|
||||||
|
#define Z_BRYCE_TYPE 0xE31338
|
||||||
|
|
||||||
typedef struct Bryce
|
typedef struct Bryce
|
||||||
{
|
{
|
||||||
|
E_Object *e_obj_inherit;
|
||||||
Eina_Stringshare *name;
|
Eina_Stringshare *name;
|
||||||
|
|
||||||
Evas_Object *bryce;
|
Evas_Object *bryce;
|
||||||
|
@ -28,6 +30,7 @@ typedef struct Bryce
|
||||||
Ecore_Timer *autohide_timer;
|
Ecore_Timer *autohide_timer;
|
||||||
unsigned int autohide_blocked;
|
unsigned int autohide_blocked;
|
||||||
Eina_List *popups;
|
Eina_List *popups;
|
||||||
|
void *event_info;
|
||||||
|
|
||||||
/* config: do not bitfield! */
|
/* config: do not bitfield! */
|
||||||
Eina_Bool autosize;
|
Eina_Bool autosize;
|
||||||
|
@ -37,6 +40,7 @@ typedef struct Bryce
|
||||||
Eina_Bool animating : 1;
|
Eina_Bool animating : 1;
|
||||||
Eina_Bool mouse_in : 1;
|
Eina_Bool mouse_in : 1;
|
||||||
Eina_Bool noshadow : 1;
|
Eina_Bool noshadow : 1;
|
||||||
|
Eina_Bool size_changed : 1;
|
||||||
} Bryce;
|
} Bryce;
|
||||||
|
|
||||||
typedef struct Bryces
|
typedef struct Bryces
|
||||||
|
@ -47,6 +51,7 @@ typedef struct Bryces
|
||||||
static E_Config_DD *edd_bryces;
|
static E_Config_DD *edd_bryces;
|
||||||
static E_Config_DD *edd_bryce;
|
static E_Config_DD *edd_bryce;
|
||||||
static Bryces *bryces;
|
static Bryces *bryces;
|
||||||
|
static E_Action *resize_act;
|
||||||
|
|
||||||
#define BRYCE_GET(obj) \
|
#define BRYCE_GET(obj) \
|
||||||
Bryce *b; \
|
Bryce *b; \
|
||||||
|
@ -166,11 +171,18 @@ _bryce_autosize(Bryce *b)
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
evas_object_geometry_get(b->parent, NULL, NULL, &w, &h);
|
evas_object_geometry_get(b->parent, NULL, NULL, &w, &h);
|
||||||
if (z_gadget_site_orient_get(b->site) == Z_GADGET_SITE_ORIENT_HORIZONTAL)
|
if (b->size_changed)
|
||||||
|
elm_object_content_unset(b->scroller);
|
||||||
|
if (b->orient == Z_GADGET_SITE_ORIENT_HORIZONTAL)
|
||||||
evas_object_resize(b->bryce, w, b->size);
|
evas_object_resize(b->bryce, w, b->size);
|
||||||
else if (z_gadget_site_orient_get(b->site) == Z_GADGET_SITE_ORIENT_VERTICAL)
|
else if (b->orient == Z_GADGET_SITE_ORIENT_VERTICAL)
|
||||||
evas_object_resize(b->bryce, b->size, h);
|
evas_object_resize(b->bryce, b->size, h);
|
||||||
_bryce_position(b, lw + sw, lh + sh);
|
evas_object_smart_need_recalculate_set(b->site, 1);
|
||||||
|
evas_object_size_hint_min_set(b->site, -1, -1);
|
||||||
|
if (b->size_changed)
|
||||||
|
elm_object_content_set(b->scroller, b->site);
|
||||||
|
_bryce_position(b, w, h);
|
||||||
|
b->size_changed = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (b->parent == e_comp->elm) //screen-based bryce
|
if (b->parent == e_comp->elm) //screen-based bryce
|
||||||
|
@ -182,13 +194,23 @@ _bryce_autosize(Bryce *b)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
evas_object_geometry_get(b->parent, NULL, NULL, &maxw, &maxh);
|
evas_object_geometry_get(b->parent, NULL, NULL, &maxw, &maxh);
|
||||||
|
if (b->size_changed)
|
||||||
|
{
|
||||||
|
elm_object_content_unset(b->scroller);
|
||||||
|
if (b->orient == Z_GADGET_SITE_ORIENT_HORIZONTAL)
|
||||||
|
evas_object_resize(b->bryce, maxw, b->size);
|
||||||
|
else if (b->orient == Z_GADGET_SITE_ORIENT_VERTICAL)
|
||||||
|
evas_object_resize(b->bryce, b->size, maxh);
|
||||||
|
elm_object_content_set(b->scroller, b->site);
|
||||||
|
}
|
||||||
evas_object_size_hint_min_get(b->layout, &lw, &lh);
|
evas_object_size_hint_min_get(b->layout, &lw, &lh);
|
||||||
evas_object_size_hint_min_get(b->site, &sw, &sh);
|
evas_object_size_hint_min_get(b->site, &sw, &sh);
|
||||||
if (z_gadget_site_orient_get(b->site) == Z_GADGET_SITE_ORIENT_HORIZONTAL)
|
if (b->orient == Z_GADGET_SITE_ORIENT_HORIZONTAL)
|
||||||
evas_object_resize(b->bryce, MIN(lw + sw, maxw), b->size);
|
evas_object_resize(b->bryce, MIN(lw + sw, maxw), b->size);
|
||||||
else if (z_gadget_site_orient_get(b->site) == Z_GADGET_SITE_ORIENT_VERTICAL)
|
else if (b->orient == Z_GADGET_SITE_ORIENT_VERTICAL)
|
||||||
evas_object_resize(b->bryce, b->size, MIN(lh + sh, maxh));
|
evas_object_resize(b->bryce, b->size, MIN(lh + sh, maxh));
|
||||||
_bryce_position(b, lw + sw, lh + sh);
|
_bryce_position(b, lw + sw, lh + sh);
|
||||||
|
b->size_changed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
@ -387,6 +409,69 @@ _bryce_moveresize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
|
||||||
b->zone = zone->num;
|
b->zone = zone->num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_bryce_mouse_down_post(void *data, Evas *e EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Bryce *b = data;
|
||||||
|
Evas_Event_Mouse_Down *ev;
|
||||||
|
|
||||||
|
ev = b->event_info;
|
||||||
|
b->event_info = NULL;
|
||||||
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
|
||||||
|
return !!e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_ANY, b->e_obj_inherit, ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_bryce_mouse_down(void *data, Evas *e, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||||
|
{
|
||||||
|
Bryce *b = data;
|
||||||
|
|
||||||
|
b->event_info = event_info;
|
||||||
|
evas_post_event_callback_push(e, _bryce_mouse_down_post, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_bryce_mouse_up_post(void *data, Evas *e EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Bryce *b = data;
|
||||||
|
Evas_Event_Mouse_Up *ev;
|
||||||
|
|
||||||
|
ev = b->event_info;
|
||||||
|
b->event_info = NULL;
|
||||||
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
|
||||||
|
return !!e_bindings_mouse_up_evas_event_handle(E_BINDING_CONTEXT_ANY, b->e_obj_inherit, ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_bryce_mouse_up(void *data, Evas *e, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||||
|
{
|
||||||
|
Bryce *b = data;
|
||||||
|
|
||||||
|
b->event_info = event_info;
|
||||||
|
evas_post_event_callback_push(e, _bryce_mouse_up_post, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_bryce_mouse_wheel_post(void *data, Evas *e EINA_UNUSED)
|
||||||
|
{
|
||||||
|
Bryce *b = data;
|
||||||
|
Evas_Event_Mouse_Wheel *ev;
|
||||||
|
|
||||||
|
ev = b->event_info;
|
||||||
|
b->event_info = NULL;
|
||||||
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
|
||||||
|
return !!e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_ANY, b->e_obj_inherit, ev);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_bryce_mouse_wheel(void *data, Evas *e, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||||
|
{
|
||||||
|
Bryce *b = data;
|
||||||
|
|
||||||
|
b->event_info = event_info;
|
||||||
|
evas_post_event_callback_push(e, _bryce_mouse_wheel_post, b);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_bryce_popup_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
_bryce_popup_hide(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
@ -414,7 +499,16 @@ _bryce_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
|
||||||
EINA_LIST_FREE(b->popups, p)
|
EINA_LIST_FREE(b->popups, p)
|
||||||
evas_object_event_callback_del(p, EVAS_CALLBACK_HIDE, _bryce_popup_hide);
|
evas_object_event_callback_del(p, EVAS_CALLBACK_HIDE, _bryce_popup_hide);
|
||||||
eina_stringshare_del(b->style);
|
eina_stringshare_del(b->style);
|
||||||
free(data);
|
E_FREE(b->e_obj_inherit);
|
||||||
|
free(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_bryce_object_free(E_Object *eobj)
|
||||||
|
{
|
||||||
|
Bryce *b = e_object_data_get(eobj);
|
||||||
|
evas_object_hide(b->bryce);
|
||||||
|
evas_object_del(b->bryce);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -522,6 +616,8 @@ _bryce_orient(Bryce *b)
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "__bryce%s", b->name);
|
snprintf(buf, sizeof(buf), "__bryce%s", b->name);
|
||||||
b->site = z_gadget_site_add(b->orient, buf);
|
b->site = z_gadget_site_add(b->orient, buf);
|
||||||
|
E_EXPAND(b->site);
|
||||||
|
E_FILL(b->site);
|
||||||
evas_object_data_set(b->site, "__bryce", b);
|
evas_object_data_set(b->site, "__bryce", b);
|
||||||
elm_object_content_set(b->scroller, b->site);
|
elm_object_content_set(b->scroller, b->site);
|
||||||
z_gadget_site_owner_setup(b->site, b->anchor, _bryce_style);
|
z_gadget_site_owner_setup(b->site, b->anchor, _bryce_style);
|
||||||
|
@ -550,6 +646,8 @@ _bryce_create(Bryce *b, Evas_Object *parent)
|
||||||
{
|
{
|
||||||
Evas_Object *ly, *bryce, *scr;
|
Evas_Object *ly, *bryce, *scr;
|
||||||
|
|
||||||
|
b->e_obj_inherit = E_OBJECT_ALLOC(E_Object, Z_BRYCE_TYPE, _bryce_object_free);
|
||||||
|
e_object_data_set(b->e_obj_inherit, b);
|
||||||
b->layout = ly = elm_layout_add(parent);
|
b->layout = ly = elm_layout_add(parent);
|
||||||
_bryce_style_apply(b);
|
_bryce_style_apply(b);
|
||||||
|
|
||||||
|
@ -576,6 +674,9 @@ _bryce_create(Bryce *b, Evas_Object *parent)
|
||||||
evas_object_event_callback_add(bryce, EVAS_CALLBACK_RESTACK, _bryce_restack, b);
|
evas_object_event_callback_add(bryce, EVAS_CALLBACK_RESTACK, _bryce_restack, b);
|
||||||
evas_object_event_callback_add(bryce, EVAS_CALLBACK_MOVE, _bryce_moveresize, b);
|
evas_object_event_callback_add(bryce, EVAS_CALLBACK_MOVE, _bryce_moveresize, b);
|
||||||
evas_object_event_callback_add(bryce, EVAS_CALLBACK_RESIZE, _bryce_moveresize, b);
|
evas_object_event_callback_add(bryce, EVAS_CALLBACK_RESIZE, _bryce_moveresize, b);
|
||||||
|
evas_object_event_callback_add(bryce, EVAS_CALLBACK_MOUSE_DOWN, _bryce_mouse_down, b);
|
||||||
|
evas_object_event_callback_add(bryce, EVAS_CALLBACK_MOUSE_UP, _bryce_mouse_up, b);
|
||||||
|
evas_object_event_callback_add(bryce, EVAS_CALLBACK_MOUSE_WHEEL, _bryce_mouse_wheel, b);
|
||||||
evas_object_event_callback_add(b->site, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _bryce_site_hints, b);
|
evas_object_event_callback_add(b->site, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _bryce_site_hints, b);
|
||||||
|
|
||||||
evas_object_smart_callback_add(b->site, "gadget_style_menu", _bryce_style_menu, b);
|
evas_object_smart_callback_add(b->site, "gadget_style_menu", _bryce_style_menu, b);
|
||||||
|
@ -587,6 +688,36 @@ _bryce_create(Bryce *b, Evas_Object *parent)
|
||||||
_bryce_autosize(b);
|
_bryce_autosize(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_bryce_act_resize(E_Object *obj, const char *params, E_Binding_Event_Wheel *ev)
|
||||||
|
{
|
||||||
|
Bryce *b;
|
||||||
|
int step = 4;
|
||||||
|
char buf[64];
|
||||||
|
|
||||||
|
if (obj->type != Z_BRYCE_TYPE) return;
|
||||||
|
if (params && params[0])
|
||||||
|
{
|
||||||
|
step = strtol(params, NULL, 10);
|
||||||
|
step = MAX(step, 4);
|
||||||
|
}
|
||||||
|
b = e_object_data_get(obj);
|
||||||
|
if (ev->z < 0)//up
|
||||||
|
b->size += step;
|
||||||
|
else
|
||||||
|
b->size -= step;
|
||||||
|
if (dblequal(e_scale, 1.0))
|
||||||
|
snprintf(buf, sizeof(buf), "%dpx", b->size);
|
||||||
|
else
|
||||||
|
snprintf(buf, sizeof(buf), "%dpx (%ldpx scaled)", b->size, lround(b->size * e_scale));
|
||||||
|
elm_object_part_text_set(b->layout, "e.text", buf);
|
||||||
|
elm_object_signal_emit(b->layout, "e,action,resize", "e");
|
||||||
|
e_config_save_queue();
|
||||||
|
b->size_changed = 1;
|
||||||
|
if (!b->calc_job)
|
||||||
|
b->calc_job = ecore_job_add((Ecore_Cb)_bryce_autosize, b);
|
||||||
|
}
|
||||||
|
|
||||||
Z_API Evas_Object *
|
Z_API Evas_Object *
|
||||||
z_bryce_add(Evas_Object *parent, const char *name, Z_Gadget_Site_Orient orient, Z_Gadget_Site_Anchor an)
|
z_bryce_add(Evas_Object *parent, const char *name, Z_Gadget_Site_Orient orient, Z_Gadget_Site_Anchor an)
|
||||||
{
|
{
|
||||||
|
@ -712,6 +843,10 @@ bryce_save(void)
|
||||||
Z_API void
|
Z_API void
|
||||||
z_bryce_init(void)
|
z_bryce_init(void)
|
||||||
{
|
{
|
||||||
|
resize_act = e_action_add("bryce_resize");
|
||||||
|
e_action_predef_name_set(D_("Bryces"), D_("Resize Bryce"), "bryce_resize", NULL, "syntax: step, example: 4", 1);
|
||||||
|
resize_act->func.go_wheel = _bryce_act_resize;
|
||||||
|
|
||||||
edd_bryce = E_CONFIG_DD_NEW("Bryce", Bryce);
|
edd_bryce = E_CONFIG_DD_NEW("Bryce", Bryce);
|
||||||
E_CONFIG_VAL(edd_bryce, Bryce, name, STR);
|
E_CONFIG_VAL(edd_bryce, Bryce, name, STR);
|
||||||
E_CONFIG_VAL(edd_bryce, Bryce, style, STR);
|
E_CONFIG_VAL(edd_bryce, Bryce, style, STR);
|
||||||
|
@ -761,6 +896,7 @@ z_bryce_shutdown(void)
|
||||||
eina_stringshare_del(b->style);
|
eina_stringshare_del(b->style);
|
||||||
ecore_job_del(b->calc_job);
|
ecore_job_del(b->calc_job);
|
||||||
ecore_timer_del(b->autohide_timer);
|
ecore_timer_del(b->autohide_timer);
|
||||||
|
free(b->e_obj_inherit);
|
||||||
free(b);
|
free(b);
|
||||||
}
|
}
|
||||||
E_FREE(bryces);
|
E_FREE(bryces);
|
||||||
|
|
|
@ -17,6 +17,7 @@ static void _editor_add_right(void *data, Evas_Object *obj, const char *sig, con
|
||||||
static void
|
static void
|
||||||
setup_exists(Evas_Object *editor, Evas_Object *parent, Z_Gadget_Site_Anchor an)
|
setup_exists(Evas_Object *editor, Evas_Object *parent, Z_Gadget_Site_Anchor an)
|
||||||
{
|
{
|
||||||
|
/* FIXME: eliminate existing shelf areas during location step */
|
||||||
if (z_bryce_exists(parent, Z_GADGET_SITE_ORIENT_HORIZONTAL, Z_GADGET_SITE_ANCHOR_BOTTOM | an))
|
if (z_bryce_exists(parent, Z_GADGET_SITE_ORIENT_HORIZONTAL, Z_GADGET_SITE_ANCHOR_BOTTOM | an))
|
||||||
elm_object_signal_emit(editor, "e,bryce,exists,bottom", "e");
|
elm_object_signal_emit(editor, "e,bryce,exists,bottom", "e");
|
||||||
if (z_bryce_exists(parent, Z_GADGET_SITE_ORIENT_HORIZONTAL, Z_GADGET_SITE_ANCHOR_TOP | an))
|
if (z_bryce_exists(parent, Z_GADGET_SITE_ORIENT_HORIZONTAL, Z_GADGET_SITE_ANCHOR_TOP | an))
|
||||||
|
|
|
@ -186,7 +186,6 @@ _gadget_object_free(E_Object *eobj)
|
||||||
evas_object_event_callback_del_full(zgc->gadget, EVAS_CALLBACK_DEL, _gadget_del, zgc);
|
evas_object_event_callback_del_full(zgc->gadget, EVAS_CALLBACK_DEL, _gadget_del, zgc);
|
||||||
if (zgc->gadget != zgc->display)
|
if (zgc->gadget != zgc->display)
|
||||||
evas_object_event_callback_del_full(zgc->display, EVAS_CALLBACK_DEL, _gadget_del, zgc);
|
evas_object_event_callback_del_full(zgc->display, EVAS_CALLBACK_DEL, _gadget_del, zgc);
|
||||||
evas_object_event_callback_del_full(zgc->gadget, EVAS_CALLBACK_DEL, _gadget_del, zgc);
|
|
||||||
E_FREE_FUNC(zgc->gadget, evas_object_del);
|
E_FREE_FUNC(zgc->gadget, evas_object_del);
|
||||||
E_FREE_FUNC(zgc->cfg_object, evas_object_del);
|
E_FREE_FUNC(zgc->cfg_object, evas_object_del);
|
||||||
E_FREE_FUNC(zgc->style.obj, evas_object_del);
|
E_FREE_FUNC(zgc->style.obj, evas_object_del);
|
||||||
|
@ -992,7 +991,9 @@ _site_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_
|
||||||
zgc = _gadget_at_xy(zgs, ev->output.x, ev->output.y, NULL);
|
zgc = _gadget_at_xy(zgs, ev->output.x, ev->output.y, NULL);
|
||||||
if (!zgc) return;
|
if (!zgc) return;
|
||||||
act = e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_ANY, zgc->e_obj_inherit, event_info);
|
act = e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_ANY, zgc->e_obj_inherit, event_info);
|
||||||
if (act && act->func.end_mouse)
|
if (!act) return;
|
||||||
|
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||||
|
if (act->func.end_mouse)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
|
@ -1001,7 +1002,6 @@ _site_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_
|
||||||
if (!zgs->mouse_up_handler)
|
if (!zgs->mouse_up_handler)
|
||||||
zgs->mouse_up_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, (Ecore_Event_Handler_Cb)_site_mouse_up, zgs);
|
zgs->mouse_up_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, (Ecore_Event_Handler_Cb)_site_mouse_up, zgs);
|
||||||
|
|
||||||
|
|
||||||
evas_object_geometry_get(zgc->display, &x, &y, NULL, NULL);
|
evas_object_geometry_get(zgc->display, &x, &y, NULL, NULL);
|
||||||
zgc->offset.x = ev->canvas.x - x;
|
zgc->offset.x = ev->canvas.x - x;
|
||||||
zgc->offset.y = ev->canvas.y - y;
|
zgc->offset.y = ev->canvas.y - y;
|
||||||
|
@ -1189,7 +1189,7 @@ _site_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_site_style(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
_site_style(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Z_Gadget_Site *zgs = data;
|
Z_Gadget_Site *zgs = data;
|
||||||
Z_Gadget_Config *zgc;
|
Z_Gadget_Config *zgc;
|
||||||
|
|
|
@ -838,8 +838,8 @@ static void
|
||||||
_ibar_cb_resize_job(void *data)
|
_ibar_cb_resize_job(void *data)
|
||||||
{
|
{
|
||||||
Instance *inst = data;
|
Instance *inst = data;
|
||||||
//evas_object_smart_need_recalculate_set(inst->ibar->o_outerbox, 1);
|
|
||||||
//evas_object_smart_need_recalculate_set(inst->ibar->o_box, 1);
|
evas_object_size_hint_min_set(inst->ibar->o_box, 0, 0);
|
||||||
//_ibar_resize_handle(inst->ibar);
|
//_ibar_resize_handle(inst->ibar);
|
||||||
_ibar_instance_drop_zone_recalc(inst);
|
_ibar_instance_drop_zone_recalc(inst);
|
||||||
inst->ibar->resize_job = NULL;
|
inst->ibar->resize_job = NULL;
|
||||||
|
|
|
@ -127,9 +127,6 @@ _menu_cb_post(void *data, E_Menu *m)
|
||||||
fin = m == inst->main_menu;
|
fin = m == inst->main_menu;
|
||||||
e_object_del(E_OBJECT(m));
|
e_object_del(E_OBJECT(m));
|
||||||
if (!fin) return;
|
if (!fin) return;
|
||||||
/* FIXME
|
|
||||||
e_gadcon_locked_set(inst->gcc->gadcon, 0);
|
|
||||||
*/
|
|
||||||
elm_layout_signal_emit(inst->o_button, "e,state,unfocused", "e");
|
elm_layout_signal_emit(inst->o_button, "e,state,unfocused", "e");
|
||||||
inst->main_menu = NULL;
|
inst->main_menu = NULL;
|
||||||
}
|
}
|
||||||
|
@ -155,12 +152,11 @@ _button_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNU
|
||||||
if (!inst->main_menu) return;
|
if (!inst->main_menu) return;
|
||||||
e_menu_post_deactivate_callback_set(inst->main_menu,
|
e_menu_post_deactivate_callback_set(inst->main_menu,
|
||||||
_menu_cb_post, inst);
|
_menu_cb_post, inst);
|
||||||
/* FIXME
|
|
||||||
e_gadcon_locked_set(inst->gcc->gadcon, 1);
|
|
||||||
*/
|
|
||||||
e_menu_activate_mouse(inst->main_menu,
|
e_menu_activate_mouse(inst->main_menu,
|
||||||
e_zone_current_get(),
|
e_zone_current_get(),
|
||||||
x, y, w, h, E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
|
x, y, w, h, E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
|
||||||
|
evas_object_smart_callback_call(z_gadget_site_get(inst->o_button),
|
||||||
|
"gadget_popup", inst->main_menu->comp_object);
|
||||||
elm_layout_signal_emit(inst->o_button, "e,state,focused", "e");
|
elm_layout_signal_emit(inst->o_button, "e,state,focused", "e");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue