Beispiel #1
0
static void
_gc_cb_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event)
{
   Instance *inst;
   Evas_Event_Mouse_Down *ev;

   if (!(inst = data)) return;
   ev = event;
   if ((ev->button == 3) && (!inst->menu))
     {
        E_Menu *m;
        E_Menu_Item *mi;
        E_Zone *zone;
        int x = 0, y = 0;

        zone = e_util_zone_current_get(e_manager_current_get());

        m = e_menu_new();

        mi = e_menu_item_new(m);
        e_menu_item_label_set(mi, D_("Settings"));
        e_util_menu_item_theme_icon_set(mi, "configure");
        e_menu_item_callback_set(mi, _menu_cb_configure, inst);

        m = e_gadcon_client_util_menu_items_append(inst->gcc, m, 0);
        e_menu_post_deactivate_callback_set(m, _gc_cb_menu_post, inst);
        inst->menu = m;

        e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &x, &y, NULL, NULL);
        e_menu_activate_mouse(m, zone, x + ev->output.x, y + ev->output.y,
                              1, 1, E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
     }
}
static void
_wlan_cb_mouse_down (void *data, Evas * e, Evas_Object * obj, void *event_info)
{
  Instance *inst;
  Evas_Event_Mouse_Down *ev;

  inst = data;
  ev = event_info;
  if ((ev->button == 3) && (!wlan_config->menu))
    {
      E_Menu *m;
      E_Menu_Item *mi;
      int x, y, w, h;

      m = e_menu_new ();
      mi = e_menu_item_new (m);
      e_menu_item_label_set (mi, D_ ("Settings"));
      e_util_menu_item_theme_icon_set(mi, "preferences-system");
      e_menu_item_callback_set (mi, _wlan_menu_cb_configure, inst);

      m = e_gadcon_client_util_menu_items_append (inst->gcc, m, 0);
      e_menu_post_deactivate_callback_set (m, _wlan_menu_cb_post, inst);
      wlan_config->menu = m;
      e_gadcon_canvas_zone_geometry_get (inst->gcc->gadcon, &x, &y, &w, &h);
      e_menu_activate_mouse (m,
			     e_util_zone_current_get (e_manager_current_get
						      ()), x + ev->output.x,
			     y + ev->output.y, 1, 1,
			     E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
      evas_event_feed_mouse_up (inst->gcc->gadcon->evas, ev->button,
				EVAS_BUTTON_NONE, ev->timestamp, NULL);
    }
}
static void
_cb_item_open(void *data, Evas_Object *obj, const char *emission, const char *source)
{
   News_Item *ni;
   E_Manager *man;
   E_Zone *zone;
   int cx, cy;

   ni = data;

   switch (ni->config->openmethod)
     {
     case NEWS_ITEM_OPENMETHOD_VIEWER:
        if (!ni->viewer)
          news_viewer_create(ni);
        else
          news_viewer_destroy(ni->viewer);
        break;
     case NEWS_ITEM_OPENMETHOD_BROWSER:
        news_menu_browser_show(ni);
        man = e_manager_current_get();
        zone = e_util_zone_current_get(man);
        ecore_x_pointer_xy_get(man->root, &cx, &cy);
        e_menu_activate_mouse(ni->menu_browser, zone,
                              cx, cy, 1, 1,
                              E_MENU_POP_DIRECTION_DOWN, 
                              ecore_x_current_time_get());
        break;
     }
}
static void
_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
   News_Item *ni;
   Evas_Event_Mouse_Down *ev;

   ni = data;
   ev = event_info;

   DITEM(("Mouse down %d", ev->button));

   switch(ev->button)
     {
        int cx, cy, cw, ch;

     case 3:
        if (ni->menu) break;
        news_menu_item_show(ni);
        e_gadcon_canvas_zone_geometry_get(ni->gcc->gadcon,
                                          &cx, &cy, &cw, &ch);
        e_menu_activate_mouse(ni->menu,
                              e_util_zone_current_get(e_manager_current_get()),
                              cx + ev->output.x, cy + ev->output.y, 1, 1,
                              E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
        evas_event_feed_mouse_up(ni->gcc->gadcon->evas, ev->button,
                                 EVAS_BUTTON_NONE, ev->timestamp, NULL);
        break;
     }
}
Beispiel #5
0
static void
_systray_menu_new(Instance *inst, Evas_Event_Mouse_Down *ev)
{
   E_Zone *zone;
   E_Menu *m;
   int x, y;

   zone = e_util_zone_current_get(e_manager_current_get());

   m = e_menu_new();
   m = e_gadcon_client_util_menu_items_append(inst->gcc, m, 0);
   e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon, &x, &y, NULL, NULL);
   e_menu_activate_mouse(m, zone, x + ev->output.x, y + ev->output.y,
                         1, 1, E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
   evas_event_feed_mouse_up(inst->gcc->gadcon->evas, ev->button,
                            EVAS_BUTTON_NONE, ev->timestamp, NULL);
}
Beispiel #6
0
static void
_itask_menu_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
   Evas_Event_Mouse_Down *ev;
   Itask *it;
   E_Menu *m;
   E_Menu_Item *mi;

   int cx, cy, cw, ch;
   Evas_Coord x, y, w, h;
   int dir;

   it = data;
   ev = event_info;

   if (ev->button == 3)
     {
	m = e_menu_new();
	e_menu_post_deactivate_callback_set(m, _itask_menu_cb_config_post, NULL);

	m = e_menu_new();
	mi = e_menu_item_new(m);
	e_menu_item_label_set(mi, D_("Settings"));
	e_util_menu_item_theme_icon_set(mi, "enlightenment/configuration");
	e_menu_item_callback_set(mi, _itask_menu_cb_configuration, it);

	m = e_gadcon_client_util_menu_items_append(it->gcc, m, 0);
     }
   else if (ev->button == 1)
     {
	/* if(it->ci->menu_all_window) */
	m = itask_menu_items_menu(it->items);
	/* else
	 *   m = itask_menu_items_menu(it->items_menu); */
     }
   if (m)
     {
	e_menu_post_deactivate_callback_set(m, _itask_menu_cb_post, NULL);
	evas_object_geometry_get(it->o_button, &x, &y, &w, &h);
	e_gadcon_canvas_zone_geometry_get(it->gcc->gadcon,
					  &cx, &cy, &cw, &ch);
	x += cx;
	y += cy;

	dir = E_MENU_POP_DIRECTION_AUTO;
	switch (it->gcc->gadcon->orient)
	  {
	   case E_GADCON_ORIENT_TOP:
	   case E_GADCON_ORIENT_CORNER_TL:
	   case E_GADCON_ORIENT_CORNER_TR:
	      dir = E_MENU_POP_DIRECTION_DOWN;
	      break;
	   case E_GADCON_ORIENT_BOTTOM:
	   case E_GADCON_ORIENT_CORNER_BL:
	   case E_GADCON_ORIENT_CORNER_BR:
	      dir = E_MENU_POP_DIRECTION_UP;
	      break;
	   case E_GADCON_ORIENT_LEFT:
	   case E_GADCON_ORIENT_CORNER_LT:
	   case E_GADCON_ORIENT_CORNER_LB:
	      dir = E_MENU_POP_DIRECTION_RIGHT;
	      break;
	   case E_GADCON_ORIENT_RIGHT:
	   case E_GADCON_ORIENT_CORNER_RT:
	   case E_GADCON_ORIENT_CORNER_RB:
	      dir = E_MENU_POP_DIRECTION_LEFT;
	      break;
	   case E_GADCON_ORIENT_FLOAT:
	   case E_GADCON_ORIENT_HORIZ:
	   case E_GADCON_ORIENT_VERT:
	   default:
	      dir = E_MENU_POP_DIRECTION_AUTO;
	      break;
	  }
	e_menu_activate_mouse(m,
			      e_util_zone_current_get(e_manager_current_get()),
			      x, y, w, h,
			      dir, ev->timestamp);

     }
}
Beispiel #7
0
/**
 * Handle clicking on the face.
 *
 * While this callback is not a menu callback, currently all face clicks
 * that do anything popup a menu.  This will change as more emu commands
 * are implemented
 *
 * @param   data the pointer you passed to evas_object_event_callback_add().
 * @param   e not used.
 * @param   obj not used.
 * @param   event_info pointer to the event.
 * @ingroup Emu_Module_Menu_Group
 */
static void
_emu_face_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
   Emu_Face *emu_face;
   Evas_Event_Mouse_Down *ev;

   emu_face = data;
   ev = event_info;
//   if ((ev->button == 3) && emu_face->face->menu)
//     {                          /* Right click configuration menu. */
//        e_menu_activate_mouse(emu_face->face->menu,
//                              e_zone_current_get(emu_face->face->con), ev->output.x, ev->output.y, 1, 1, E_MENU_POP_DIRECTION_AUTO,
//                              ev->timestamp);
//     }
   /*else*/ if (ev->button == 1)
     {                          /* Left click default menu. */
        Easy_Menu *menu;
	Evas_Coord x, y, w, h;
	int cx, cy, cw, ch;
	
	evas_object_geometry_get(emu_face->o_button, &x, &y, &w, &h); 
	e_gadcon_canvas_zone_geometry_get(emu_face->gcc->gadcon, &cx, &cy, &cw, &ch);
	x += cx;
	y += cy;

        /* Find the default menu, if there is one. */
        menu = eina_hash_find(emu_face->menus, "");
        if (menu && menu->valid)
          {
	     int dir;
	     
             e_menu_post_deactivate_callback_set(menu->menu->menu, _emu_menu_cb_post_deactivate, emu_face);
	     dir = E_MENU_POP_DIRECTION_AUTO;
	     switch (emu_face->gcc->gadcon->orient)
	       {
		case E_GADCON_ORIENT_TOP:
		  dir = E_MENU_POP_DIRECTION_DOWN;
		  break;
		case E_GADCON_ORIENT_BOTTOM:
		  dir = E_MENU_POP_DIRECTION_UP;
		  break;
		case E_GADCON_ORIENT_LEFT:
		  dir = E_MENU_POP_DIRECTION_RIGHT;
		  break;
		case E_GADCON_ORIENT_RIGHT:
		  dir = E_MENU_POP_DIRECTION_LEFT;
		  break;
		case E_GADCON_ORIENT_CORNER_TL:
		  dir = E_MENU_POP_DIRECTION_DOWN;
		  break;
		case E_GADCON_ORIENT_CORNER_TR:
		  dir = E_MENU_POP_DIRECTION_DOWN;
		  break;
		case E_GADCON_ORIENT_CORNER_BL:
		  dir = E_MENU_POP_DIRECTION_UP;
		  break;
		case E_GADCON_ORIENT_CORNER_BR:
		  dir = E_MENU_POP_DIRECTION_UP;
		  break;
		case E_GADCON_ORIENT_CORNER_LT:
		  dir = E_MENU_POP_DIRECTION_RIGHT;
		  break;
		case E_GADCON_ORIENT_CORNER_RT:
		  dir = E_MENU_POP_DIRECTION_LEFT;
		  break;
		case E_GADCON_ORIENT_CORNER_LB:
		  dir = E_MENU_POP_DIRECTION_RIGHT;
		  break;
		case E_GADCON_ORIENT_CORNER_RB:
		  dir = E_MENU_POP_DIRECTION_LEFT;
		  break;
		case E_GADCON_ORIENT_FLOAT:
		case E_GADCON_ORIENT_HORIZ:
		case E_GADCON_ORIENT_VERT:
		default:
		  dir = E_MENU_POP_DIRECTION_AUTO;
		  break;
	       }
//             e_menu_activate_mouse(menu->menu->menu, e_zone_current_get(emu_face->face->con), ev->output.x, ev->output.y, 1, 1, E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
	     e_menu_activate_mouse(menu->menu->menu, e_util_zone_current_get(e_manager_current_get()), x, y, w, h, dir, ev->timestamp);
	     edje_object_signal_emit(emu_face->o_button, "active", "");
	     evas_event_feed_mouse_up(emu_face->gcc->gadcon->evas, ev->button, EVAS_BUTTON_NONE, ev->timestamp, NULL);
          }
     }
}
static void
_button_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
   Instance *inst;
   Evas_Event_Mouse_Down *ev;
   
   inst = data;
   ev = event_info;
   if ((ev->button == 3) && (!alarm_config->menu))
     {
	E_Menu *m;
	E_Menu_Item *mi;
	int cx, cy, cw, ch;
        int nb_snoozed = 0;
	
	m = e_menu_new();
	mi = e_menu_item_new(m);
	e_menu_item_label_set(mi, D_("Add an alarm"));
	e_menu_item_callback_set(mi, _menu_cb_alarm_add, NULL);
        if (!alarm_config->theme) e_util_menu_item_theme_icon_set(mi, THEME_ICON_ALARM_ON);
        else e_menu_item_icon_edje_set(mi, alarm_config->theme, THEME_ICON_ALARM_ON);
        mi = e_menu_item_new(m);
        e_menu_item_separator_set(mi, 1);
	mi = e_menu_item_new(m);
	e_menu_item_label_set(mi, D_("Settings"));
	e_util_menu_item_theme_icon_set(mi, "preferences-system");
	e_menu_item_callback_set(mi, _menu_cb_configure, NULL);
	
	m = e_gadcon_client_util_menu_items_append(inst->gcc, m, 0);

        /* snooze menu */
        if (alarm_config->alarms_state == ALARM_STATE_RINGING)
          {
             Eina_List *l;

             for (l=alarm_config->alarms; l; l=eina_list_next(l))
               {
                  Alarm *al;
                  al = eina_list_data_get(l);
                  if (al->state == ALARM_STATE_RINGING)
                    {
                       char buf[30];
                       snprintf(buf, sizeof(buf), D_("Snooze %s"), al->name);
                       mi = e_menu_item_new_relative(m, NULL);
                       e_menu_item_label_set(mi, buf);
                       e_menu_item_callback_set(mi, _menu_cb_alarm_snooze, al);
                       if (!alarm_config->theme) e_util_menu_item_theme_icon_set(mi, THEME_ICON_SNOOZE);
                       else e_menu_item_icon_edje_set(mi, alarm_config->theme, THEME_ICON_SNOOZE);
                       if (al->snooze.remember)
                         {
                            snprintf(buf, sizeof(buf), D_("Snooze %.14s of %.2d:%.2d"),
                                     al->name, al->snooze.hour, al->snooze.minute);
                            mi = e_menu_item_new_relative(m, NULL);
                            e_menu_item_label_set(mi, buf);
                            e_menu_item_callback_set(mi, _menu_cb_alarm_snooze, al);
                         }
                       nb_snoozed = 1;
                    }
               }
          }

        if (!nb_snoozed)
          {
             mi = e_menu_item_new_relative(m, NULL);
             e_menu_item_label_set(mi, D_("Snooze (No alarm to delay)"));
             if (!alarm_config->theme) e_util_menu_item_theme_icon_set(mi, THEME_ICON_SNOOZE);
             else e_menu_item_icon_edje_set(mi, alarm_config->theme, THEME_ICON_SNOOZE);
          }

	e_menu_post_deactivate_callback_set(m, _menu_cb_deactivate_post, inst);
	alarm_config->menu = m;	
	e_gadcon_canvas_zone_geometry_get(inst->gcc->gadcon,
					  &cx, &cy, &cw, &ch);
	e_menu_activate_mouse(m,
			      e_util_zone_current_get(e_manager_current_get()),
			      cx + ev->output.x, cy + ev->output.y, 1, 1,
			      E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
	evas_event_feed_mouse_up(inst->gcc->gadcon->evas, ev->button,
				 EVAS_BUTTON_NONE, ev->timestamp, NULL);
     }
}
static void
_mail_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
		     void *event_info)
{
  Instance *inst = data;
  Evas_Event_Mouse_Down *ev = event_info;
  Eina_List *l;

  if (!inst)
    return;
  if ((ev->button == 3) && (!mail_config->menu))
    {
      E_Menu *m;
      E_Menu_Item *mi;
      int x, y, w, h;
      char buf[1024];

      m = e_menu_new ();
      mi = e_menu_item_new (m);
      e_menu_item_label_set (mi, D_("Settings"));
      e_util_menu_item_theme_icon_set(mi, "preferences-system");
      e_menu_item_callback_set (mi, _mail_menu_cb_configure, inst);

      m = e_gadcon_client_util_menu_items_append (inst->gcc, m, 0);
      e_menu_post_deactivate_callback_set (m, _mail_menu_cb_post, inst);
      mail_config->menu = m;

      if ((inst->ci->boxes) && (eina_list_count (inst->ci->boxes) > 0))
	{
	   mi = NULL;
	   snprintf (buf, sizeof (buf), "%s/module.edj",
		     e_module_dir_get (mail_config->module));

	   for (l = inst->ci->boxes; l; l = l->next)
	     {
		Config_Box *cb;

		cb = l->data;
		if (!cb)
		  continue;
		mi = e_menu_item_new_relative (m, mi);
		snprintf (buf, sizeof (buf), "%s: %d/%d", cb->name, cb->num_new,
			  cb->num_total);
		e_menu_item_label_set (mi, buf);
		if ((cb->exec) && (cb->use_exec))
		  e_menu_item_callback_set (mi, _mail_menu_cb_exec, cb);
	     }
	   if (mi)
	     {
		mi = e_menu_item_new_relative(m, mi);
		e_menu_item_separator_set(mi, 1); 
	     }
	}

      e_gadcon_canvas_zone_geometry_get (inst->gcc->gadcon, &x, &y, &w, &h);
      e_menu_activate_mouse (m,
			     e_util_zone_current_get (e_manager_current_get
						      ()), x + ev->output.x,
			     y + ev->output.y, 1, 1,
			     E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
      evas_event_feed_mouse_up (inst->gcc->gadcon->evas, ev->button,
				EVAS_BUTTON_NONE, ev->timestamp, NULL);
    }
  else if (ev->button == 1)
    _mail_cb_check (inst);
}
void
ngi_border_menu_show(Ngi_Box *box, E_Border *bd, Evas_Coord x, Evas_Coord y, int dir, Ecore_X_Time timestamp)
{
   E_Menu *m;
   E_Menu_Item *mi;
   Ng *ng = box->ng;

   if (bd->border_menu)
      return;

   m = e_menu_new();
   e_menu_category_set(m,"border");
   e_menu_category_data_set("border",bd);
   e_object_data_set(E_OBJECT(m), bd);
   bd->border_menu = m;
   e_menu_post_deactivate_callback_set(m, _ng_border_cb_border_menu_end, ng); /* FIXME */

   if ((!bd->lock_user_fullscreen) && (!bd->shaded))
     {
        mi = e_menu_item_new(m);
        e_menu_item_label_set(mi, D_("Fullscreen"));
        e_menu_item_check_set(mi, 1);
        e_menu_item_toggle_set(mi, bd->fullscreen);
        e_menu_item_callback_set(mi, _ng_border_menu_cb_fullscreen, bd);
        e_menu_item_icon_edje_set(mi,
                                  e_theme_edje_file_get("base/theme/borders",
                                                        "e/widgets/border/default/fullscreen"),
                                  "e/widgets/border/default/fullscreen");
     }

   mi = e_menu_item_new(m);
   e_menu_item_separator_set(mi, 1);
   if (!bd->lock_close)
     {
        mi = e_menu_item_new(m);
        e_menu_item_label_set(mi, D_("Close"));
        e_menu_item_callback_set(mi, _ng_border_menu_cb_close, bd);
        e_menu_item_icon_edje_set(mi,
                                  e_theme_edje_file_get("base/theme/borders",
                                                        "e/widgets/border/default/close"),
                                  "e/widgets/border/default/close");
     }

   if (!bd->internal)
     {
        mi = e_menu_item_new(m);
        e_menu_item_separator_set(mi, 1);

        if (!(((bd->client.icccm.min_w == bd->client.icccm.max_w) &&
               (bd->client.icccm.min_h == bd->client.icccm.max_h)) ||
              (bd->lock_user_maximize)))
          {
             if ((!bd->lock_user_maximize) && (!bd->shaded) &&
                 ((bd->layer == 50) || (bd->layer == 100) || (bd->layer == 150)))
               {
                  mi = e_menu_item_new(m);
                  e_menu_item_label_set(mi, D_("Maximized"));
                  e_menu_item_check_set(mi, 1);
                  e_menu_item_toggle_set(mi, (bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH);
                  if((bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)
                     e_menu_item_callback_set(mi, _ng_border_menu_cb_unmaximize, bd);
                  else
                     e_menu_item_callback_set(mi, _ng_border_menu_cb_maximize, bd);

                  e_menu_item_icon_edje_set(mi,
                                            e_theme_edje_file_get("base/theme/borders",
                                                                  "e/widgets/border/default/maximize"),
                                            "e/widgets/border/default/maximize");
               }
          }
     }

   if (!bd->lock_user_iconify)
     {
        mi = e_menu_item_new(m);
        if(bd->iconic)
           e_menu_item_label_set(mi, D_("Uniconify"));
        else
           e_menu_item_label_set(mi, D_("Iconify"));

        e_menu_item_callback_set(mi, _ng_border_menu_cb_iconify, bd);
        e_menu_item_icon_edje_set(mi,
                                  e_theme_edje_file_get("base/theme/borders",
                                                        "e/widgets/border/default/minimize"),
                                  "e/widgets/border/default/minimize");
     }

   e_menu_activate_mouse(m, ng->zone, ng->zone->x + x, ng->zone->y + y, 1, 1,
                         dir, timestamp);
}
Beispiel #11
0
static void
_itask_item_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
   Evas_Event_Mouse_Down *ev;
   Itask_Item *ic;
   Evas_Coord x, y, w, h;
   E_Menu *mn = NULL;
   int cx, cy, cw, ch, dir;

   ev = event_info;
   ic = data;

   if (ev->button == 1)
     {
	ic->drag.x = ev->output.x;
	ic->drag.y = ev->output.y;
	ic->drag.start = 1;
	ic->drag.dnd = 0;
	ic->time_press = ecore_loop_time_get();
     }
   else if (ev->button == 3)
     {
	if (ic->border)
	  {
	     evas_object_geometry_get(ic->o_holder, &x, &y, &w, &h);
	     e_gadcon_canvas_zone_geometry_get(ic->itask->gcc->gadcon,
					       &cx, &cy, &cw, &ch);
	     x += cx;
	     y += cy;

	     e_int_border_menu_show(ic->border, x, y, 0, ev->timestamp);
	  }
     }
   else if (ev->button == 2)
     {
     }
   if (mn)
     {
	e_menu_post_deactivate_callback_set(mn, _itask_item_cb_menu_post, NULL);

	evas_object_geometry_get(ic->o_holder, &x, &y, &w, &h);
	e_gadcon_canvas_zone_geometry_get(ic->itask->gcc->gadcon,
					  &cx, &cy, &cw, &ch);
	x += cx;
	y += cy;

	dir = E_MENU_POP_DIRECTION_AUTO;
	switch (ic->itask->gcc->gadcon->orient)
	  {
	   case E_GADCON_ORIENT_TOP:
	   case E_GADCON_ORIENT_CORNER_TL:
	   case E_GADCON_ORIENT_CORNER_TR:
	      dir = E_MENU_POP_DIRECTION_DOWN;
	      break;
	   case E_GADCON_ORIENT_BOTTOM:
	   case E_GADCON_ORIENT_CORNER_BL:
	   case E_GADCON_ORIENT_CORNER_BR:
	      dir = E_MENU_POP_DIRECTION_UP;
	      break;
	   case E_GADCON_ORIENT_LEFT:
	   case E_GADCON_ORIENT_CORNER_LT:
	   case E_GADCON_ORIENT_CORNER_LB:
	      dir = E_MENU_POP_DIRECTION_RIGHT;
	      break;
	   case E_GADCON_ORIENT_RIGHT:
	   case E_GADCON_ORIENT_CORNER_RT:
	   case E_GADCON_ORIENT_CORNER_RB:
	      dir = E_MENU_POP_DIRECTION_LEFT;
	      break;
	   case E_GADCON_ORIENT_FLOAT:
	   case E_GADCON_ORIENT_HORIZ:
	   case E_GADCON_ORIENT_VERT:
	   default:
	      dir = E_MENU_POP_DIRECTION_AUTO;
	      break;
	  }
	e_menu_activate_mouse(mn,
			      e_util_zone_current_get(e_manager_current_get()),
			      x, y, w, h, dir, ev->timestamp);
     }
}