parent
832ae57b30
commit
5bac59d8e3
|
@ -216,7 +216,6 @@ e_menu_new(void)
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_menu_activate_key(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir)
|
e_menu_activate_key(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir)
|
||||||
{
|
{
|
||||||
|
@ -242,11 +241,13 @@ e_menu_activate_key(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir
|
||||||
m->cur.y = y + h - m->cur.h;
|
m->cur.y = y + h - m->cur.h;
|
||||||
_e_menu_activate_first();
|
_e_menu_activate_first();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_RIGHT:
|
case E_MENU_POP_DIRECTION_RIGHT:
|
||||||
m->cur.x = x + w;
|
m->cur.x = x + w;
|
||||||
m->cur.y = y;
|
m->cur.y = y;
|
||||||
_e_menu_activate_first();
|
_e_menu_activate_first();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_UP:
|
case E_MENU_POP_DIRECTION_UP:
|
||||||
_e_menu_realize(m);
|
_e_menu_realize(m);
|
||||||
m->cur.x = x;
|
m->cur.x = x;
|
||||||
|
@ -255,6 +256,7 @@ e_menu_activate_key(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir
|
||||||
m->cur.y = y - m->cur.h;
|
m->cur.y = y - m->cur.h;
|
||||||
_e_menu_activate_last();
|
_e_menu_activate_last();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_DOWN:
|
case E_MENU_POP_DIRECTION_DOWN:
|
||||||
_e_menu_realize(m);
|
_e_menu_realize(m);
|
||||||
m->cur.x = x;
|
m->cur.x = x;
|
||||||
|
@ -265,6 +267,7 @@ e_menu_activate_key(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir
|
||||||
m->cur.y = y + h - m->cur.h;
|
m->cur.y = y + h - m->cur.h;
|
||||||
_e_menu_activate_first();
|
_e_menu_activate_first();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_AUTO:
|
case E_MENU_POP_DIRECTION_AUTO:
|
||||||
{
|
{
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
@ -276,6 +279,7 @@ e_menu_activate_key(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir
|
||||||
_e_menu_activate_first();
|
_e_menu_activate_first();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
m->cur.x = x + w;
|
m->cur.x = x + w;
|
||||||
m->cur.y = y + h;
|
m->cur.y = y + h;
|
||||||
|
@ -310,11 +314,13 @@ e_menu_activate_mouse(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int d
|
||||||
if ((m->cur.y + m->cur.h) > (m->zone->y + m->zone->h))
|
if ((m->cur.y + m->cur.h) > (m->zone->y + m->zone->h))
|
||||||
m->cur.y = y + h - m->cur.h;
|
m->cur.y = y + h - m->cur.h;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_RIGHT:
|
case E_MENU_POP_DIRECTION_RIGHT:
|
||||||
_e_menu_realize(m);
|
_e_menu_realize(m);
|
||||||
m->cur.x = x + w;
|
m->cur.x = x + w;
|
||||||
m->cur.y = y;
|
m->cur.y = y;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_UP:
|
case E_MENU_POP_DIRECTION_UP:
|
||||||
_e_menu_realize(m);
|
_e_menu_realize(m);
|
||||||
m->cur.x = x;
|
m->cur.x = x;
|
||||||
|
@ -322,6 +328,7 @@ e_menu_activate_mouse(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int d
|
||||||
m->cur.x = x + w - m->cur.w;
|
m->cur.x = x + w - m->cur.w;
|
||||||
m->cur.y = y - m->cur.h;
|
m->cur.y = y - m->cur.h;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_DOWN:
|
case E_MENU_POP_DIRECTION_DOWN:
|
||||||
_e_menu_realize(m);
|
_e_menu_realize(m);
|
||||||
m->cur.x = x;
|
m->cur.x = x;
|
||||||
|
@ -331,9 +338,11 @@ e_menu_activate_mouse(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int d
|
||||||
if ((m->cur.y + m->cur.h) > (m->zone->y + m->zone->h))
|
if ((m->cur.y + m->cur.h) > (m->zone->y + m->zone->h))
|
||||||
m->cur.y = y + h - m->cur.h;
|
m->cur.y = y + h - m->cur.h;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_AUTO:
|
case E_MENU_POP_DIRECTION_AUTO:
|
||||||
_e_menu_auto_place(m, x, y, w, h);
|
_e_menu_auto_place(m, x, y, w, h);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
m->cur.x = x + w;
|
m->cur.x = x + w;
|
||||||
m->cur.y = y + h;
|
m->cur.y = y + h;
|
||||||
|
@ -370,12 +379,14 @@ e_menu_activate(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir)
|
||||||
m->cur.y = y + h - m->cur.h;
|
m->cur.y = y + h - m->cur.h;
|
||||||
_e_menu_activate_first();
|
_e_menu_activate_first();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_RIGHT:
|
case E_MENU_POP_DIRECTION_RIGHT:
|
||||||
_e_menu_realize(m);
|
_e_menu_realize(m);
|
||||||
m->cur.x = x + w;
|
m->cur.x = x + w;
|
||||||
m->cur.y = y;
|
m->cur.y = y;
|
||||||
_e_menu_activate_first();
|
_e_menu_activate_first();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_UP:
|
case E_MENU_POP_DIRECTION_UP:
|
||||||
_e_menu_realize(m);
|
_e_menu_realize(m);
|
||||||
m->cur.x = x;
|
m->cur.x = x;
|
||||||
|
@ -384,6 +395,7 @@ e_menu_activate(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir)
|
||||||
m->cur.y = y - m->cur.h;
|
m->cur.y = y - m->cur.h;
|
||||||
_e_menu_activate_last();
|
_e_menu_activate_last();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_DOWN:
|
case E_MENU_POP_DIRECTION_DOWN:
|
||||||
_e_menu_realize(m);
|
_e_menu_realize(m);
|
||||||
m->cur.x = x;
|
m->cur.x = x;
|
||||||
|
@ -394,9 +406,11 @@ e_menu_activate(E_Menu *m, E_Zone *zone, int x, int y, int w, int h, int dir)
|
||||||
m->cur.y = y + h - m->cur.h;
|
m->cur.y = y + h - m->cur.h;
|
||||||
_e_menu_activate_first();
|
_e_menu_activate_first();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_MENU_POP_DIRECTION_AUTO:
|
case E_MENU_POP_DIRECTION_AUTO:
|
||||||
_e_menu_auto_place(m, x, y, w, h);
|
_e_menu_auto_place(m, x, y, w, h);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
m->cur.x = x + w;
|
m->cur.x = x + w;
|
||||||
m->cur.y = y + h;
|
m->cur.y = y + h;
|
||||||
|
@ -963,7 +977,6 @@ e_menu_item_disabled_set(E_Menu_Item *mi, int disable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_menu_idler_before(void)
|
e_menu_idler_before(void)
|
||||||
{
|
{
|
||||||
|
@ -1122,7 +1135,6 @@ e_menu_find_by_window(Ecore_X_Window win)
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static void
|
static void
|
||||||
_e_menu_free(E_Menu *m)
|
_e_menu_free(E_Menu *m)
|
||||||
|
@ -2341,6 +2353,7 @@ _e_menu_activate_nth(int n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static E_Menu *
|
static E_Menu *
|
||||||
|
@ -2524,8 +2537,8 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h)
|
||||||
if ((xr + yr) < 0.99) /* top or left */
|
if ((xr + yr) < 0.99) /* top or left */
|
||||||
{
|
{
|
||||||
if (((1.0 - yr) + xr) <= 1.0)
|
if (((1.0 - yr) + xr) <= 1.0)
|
||||||
/* L */
|
|
||||||
{
|
{
|
||||||
|
/* L */
|
||||||
m->cur.x = x + w;
|
m->cur.x = x + w;
|
||||||
if (y < (m->zone->y + ((m->zone->h * 1) / 3)))
|
if (y < (m->zone->y + ((m->zone->h * 1) / 3)))
|
||||||
m->cur.y = y;
|
m->cur.y = y;
|
||||||
|
@ -2551,8 +2564,8 @@ _e_menu_auto_place(E_Menu *m, int x, int y, int w, int h)
|
||||||
else /* bottom or right */
|
else /* bottom or right */
|
||||||
{
|
{
|
||||||
if (((1.0 - yr) + xr) <= 1.01)
|
if (((1.0 - yr) + xr) <= 1.01)
|
||||||
/* B */
|
|
||||||
{
|
{
|
||||||
|
/* B */
|
||||||
m->cur.y = y - m->cur.h;
|
m->cur.y = y - m->cur.h;
|
||||||
if (x < (m->zone->x + ((m->zone->w * 1) / 3)))
|
if (x < (m->zone->x + ((m->zone->w * 1) / 3)))
|
||||||
m->cur.x = x;
|
m->cur.x = x;
|
||||||
|
@ -2912,7 +2925,6 @@ _e_menu_cb_item_submenu_post_default(void *data __UNUSED__, E_Menu *m __UNUSED__
|
||||||
e_object_del(E_OBJECT(subm));
|
e_object_del(E_OBJECT(subm));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_menu_categories_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__)
|
_e_menu_categories_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__)
|
||||||
{
|
{
|
||||||
|
@ -2925,3 +2937,4 @@ _e_menu_categories_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __U
|
||||||
free(cat);
|
free(cat);
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue