forked from enlightenment/enlightenment
added pager pop action for next/prev desk
SVN revision: 48514
This commit is contained in:
parent
329940143b
commit
082f1dd1f7
|
@ -2490,6 +2490,7 @@ _pager_popup_cb_action_show(E_Object *obj, const char *params, Ecore_Event_Key *
|
||||||
static void
|
static void
|
||||||
_pager_popup_cb_action_switch(E_Object *obj, const char *params, Ecore_Event_Key *ev)
|
_pager_popup_cb_action_switch(E_Object *obj, const char *params, Ecore_Event_Key *ev)
|
||||||
{
|
{
|
||||||
|
int max_x,max_y, desk_x, desk_y;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
|
|
||||||
|
@ -2500,6 +2501,11 @@ _pager_popup_cb_action_switch(E_Object *obj, const char *params, Ecore_Event_Key
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e_zone_desk_count_get(act_popup->pager->zone, &max_x, &max_y);
|
||||||
|
desk_x = current_desk->x + x;
|
||||||
|
desk_y = current_desk->y + y;
|
||||||
|
|
||||||
if (!strcmp(params, "left"))
|
if (!strcmp(params, "left"))
|
||||||
x = -1;
|
x = -1;
|
||||||
else if (!strcmp(params, "right"))
|
else if (!strcmp(params, "right"))
|
||||||
|
@ -2508,6 +2514,18 @@ _pager_popup_cb_action_switch(E_Object *obj, const char *params, Ecore_Event_Key
|
||||||
y = -1;
|
y = -1;
|
||||||
else if (!strcmp(params, "down"))
|
else if (!strcmp(params, "down"))
|
||||||
y = 1;
|
y = 1;
|
||||||
|
else if (!strcmp(params, "next"))
|
||||||
|
{
|
||||||
|
x = 1;
|
||||||
|
if (desk_x == max_x - 1)
|
||||||
|
y = 1;
|
||||||
|
}
|
||||||
|
else if (!strcmp(params, "prev"))
|
||||||
|
{
|
||||||
|
x = -1;
|
||||||
|
if (desk_x == 0)
|
||||||
|
y = -1;
|
||||||
|
}
|
||||||
|
|
||||||
_pager_popup_desk_switch(x, y);
|
_pager_popup_desk_switch(x, y);
|
||||||
}
|
}
|
||||||
|
@ -2831,6 +2849,10 @@ e_modapi_init(E_Module *m)
|
||||||
"pager_switch", "up", NULL, 0);
|
"pager_switch", "up", NULL, 0);
|
||||||
e_action_predef_name_set(N_("Pager"), N_("Popup Desk Down"),
|
e_action_predef_name_set(N_("Pager"), N_("Popup Desk Down"),
|
||||||
"pager_switch", "down", NULL, 0);
|
"pager_switch", "down", NULL, 0);
|
||||||
|
e_action_predef_name_set(N_("Pager"), N_("Popup Desk Next"),
|
||||||
|
"pager_switch", "next", NULL, 0);
|
||||||
|
e_action_predef_name_set(N_("Pager"), N_("Popup Desk Previous"),
|
||||||
|
"pager_switch", "prev", NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
|
@ -2866,6 +2888,8 @@ e_modapi_shutdown(E_Module *m)
|
||||||
e_action_predef_name_del(N_("Pager"), N_("Popup Desk Left"));
|
e_action_predef_name_del(N_("Pager"), N_("Popup Desk Left"));
|
||||||
e_action_predef_name_del(N_("Pager"), N_("Popup Desk Up"));
|
e_action_predef_name_del(N_("Pager"), N_("Popup Desk Up"));
|
||||||
e_action_predef_name_del(N_("Pager"), N_("Popup Desk Down"));
|
e_action_predef_name_del(N_("Pager"), N_("Popup Desk Down"));
|
||||||
|
e_action_predef_name_del(N_("Pager"), N_("Popup Desk Next"));
|
||||||
|
e_action_predef_name_del(N_("Pager"), N_("Popup Desk Previous"));
|
||||||
|
|
||||||
E_FREE(pager_config);
|
E_FREE(pager_config);
|
||||||
E_CONFIG_DD_FREE(conf_edd);
|
E_CONFIG_DD_FREE(conf_edd);
|
||||||
|
|
Loading…
Reference in New Issue