forked from enlightenment/efl
hoversel: add key binding for widget activation
Test Plan: 1. Install previous version of elementary 2. Remove config from homedir 3. Build new config with elemetnary_config app 4. Install patched version of elementary 5. run elementary_test Hoversel test 6. Space end Enter should open hovesel Reviewers: seoz, jaehwan, singh.amitesh, cedric Reviewed By: cedric Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D2787 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
ddc73095b2
commit
456ea179bb
|
@ -1,5 +1,5 @@
|
||||||
group "Elm_Config" struct {
|
group "Elm_Config" struct {
|
||||||
value "config_version" int: 131075;
|
value "config_version" int: 131076;
|
||||||
value "engine" string: "";
|
value "engine" string: "";
|
||||||
value "vsync" uchar: 0;
|
value "vsync" uchar: 0;
|
||||||
value "thumbscroll_enable" uchar: 1;
|
value "thumbscroll_enable" uchar: 1;
|
||||||
|
@ -411,6 +411,24 @@ group "Elm_Config" struct {
|
||||||
value "action" string: "move";
|
value "action" string: "move";
|
||||||
value "params" string: "down";
|
value "params" string: "down";
|
||||||
}
|
}
|
||||||
|
group "Elm_Config_Binding_Key" struct {
|
||||||
|
value "context" int: 0;
|
||||||
|
value "key" string: "KP_Enter";
|
||||||
|
value "action" string: "activate";
|
||||||
|
value "params" string: "";
|
||||||
|
}
|
||||||
|
group "Elm_Config_Binding_Key" struct {
|
||||||
|
value "context" int: 0;
|
||||||
|
value "key" string: "Return";
|
||||||
|
value "action" string: "activate";
|
||||||
|
value "params" string: "";
|
||||||
|
}
|
||||||
|
group "Elm_Config_Binding_Key" struct {
|
||||||
|
value "context" int: 0;
|
||||||
|
value "key" string: "space";
|
||||||
|
value "action" string: "activate";
|
||||||
|
value "params" string: "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group "Elm_Config_Bindings_Widget" struct {
|
group "Elm_Config_Bindings_Widget" struct {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
group "Elm_Config" struct {
|
group "Elm_Config" struct {
|
||||||
value "config_version" int: 131075;
|
value "config_version" int: 131076;
|
||||||
value "engine" string: "";
|
value "engine" string: "";
|
||||||
value "vsync" uchar: 0;
|
value "vsync" uchar: 0;
|
||||||
value "thumbscroll_enable" uchar: 1;
|
value "thumbscroll_enable" uchar: 1;
|
||||||
|
@ -415,6 +415,24 @@ group "Elm_Config" struct {
|
||||||
value "action" string: "move";
|
value "action" string: "move";
|
||||||
value "params" string: "down";
|
value "params" string: "down";
|
||||||
}
|
}
|
||||||
|
group "Elm_Config_Binding_Key" struct {
|
||||||
|
value "context" int: 0;
|
||||||
|
value "key" string: "KP_Enter";
|
||||||
|
value "action" string: "activate";
|
||||||
|
value "params" string: "";
|
||||||
|
}
|
||||||
|
group "Elm_Config_Binding_Key" struct {
|
||||||
|
value "context" int: 0;
|
||||||
|
value "key" string: "Return";
|
||||||
|
value "action" string: "activate";
|
||||||
|
value "params" string: "";
|
||||||
|
}
|
||||||
|
group "Elm_Config_Binding_Key" struct {
|
||||||
|
value "context" int: 0;
|
||||||
|
value "key" string: "space";
|
||||||
|
value "action" string: "activate";
|
||||||
|
value "params" string: "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group "Elm_Config_Bindings_Widget" struct {
|
group "Elm_Config_Bindings_Widget" struct {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
group "Elm_Config" struct {
|
group "Elm_Config" struct {
|
||||||
value "config_version" int: 131075;
|
value "config_version" int: 131076;
|
||||||
value "engine" string: "";
|
value "engine" string: "";
|
||||||
value "vsync" uchar: 0;
|
value "vsync" uchar: 0;
|
||||||
value "thumbscroll_enable" uchar: 0;
|
value "thumbscroll_enable" uchar: 0;
|
||||||
|
@ -412,6 +412,24 @@ group "Elm_Config" struct {
|
||||||
value "action" string: "move";
|
value "action" string: "move";
|
||||||
value "params" string: "down";
|
value "params" string: "down";
|
||||||
}
|
}
|
||||||
|
group "Elm_Config_Binding_Key" struct {
|
||||||
|
value "context" int: 0;
|
||||||
|
value "key" string: "KP_Enter";
|
||||||
|
value "action" string: "activate";
|
||||||
|
value "params" string: "";
|
||||||
|
}
|
||||||
|
group "Elm_Config_Binding_Key" struct {
|
||||||
|
value "context" int: 0;
|
||||||
|
value "key" string: "Return";
|
||||||
|
value "action" string: "activate";
|
||||||
|
value "params" string: "";
|
||||||
|
}
|
||||||
|
group "Elm_Config_Binding_Key" struct {
|
||||||
|
value "context" int: 0;
|
||||||
|
value "key" string: "space";
|
||||||
|
value "action" string: "activate";
|
||||||
|
value "params" string: "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group "Elm_Config_Bindings_Widget" struct {
|
group "Elm_Config_Bindings_Widget" struct {
|
||||||
|
|
|
@ -34,9 +34,11 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
|
static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
|
||||||
|
static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
|
||||||
|
|
||||||
static const Elm_Action key_actions[] = {
|
static const Elm_Action key_actions[] = {
|
||||||
{"move", _key_action_move},
|
{"move", _key_action_move},
|
||||||
|
{"activate", _key_action_activate},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -602,6 +604,13 @@ _key_action_move(Evas_Object *obj, const char *params)
|
||||||
else return EINA_FALSE;
|
else return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
||||||
|
{
|
||||||
|
_activate(obj);
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
_elm_hoversel_elm_widget_event(Eo *obj, Elm_Hoversel_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info)
|
_elm_hoversel_elm_widget_event(Eo *obj, Elm_Hoversel_Data *sd, Evas_Object *src, Evas_Callback_Type type, void *event_info)
|
||||||
{
|
{
|
||||||
|
@ -633,6 +642,7 @@ EOLIAN const Elm_Atspi_Action *
|
||||||
_elm_hoversel_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Hoversel_Data *pd EINA_UNUSED)
|
_elm_hoversel_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Hoversel_Data *pd EINA_UNUSED)
|
||||||
{
|
{
|
||||||
static Elm_Atspi_Action atspi_actions[] = {
|
static Elm_Atspi_Action atspi_actions[] = {
|
||||||
|
{ "activate", "activate", NULL, _key_action_activate},
|
||||||
{ "move,up", "move", "up", _key_action_move},
|
{ "move,up", "move", "up", _key_action_move},
|
||||||
{ "move,down", "move", "down", _key_action_move},
|
{ "move,down", "move", "down", _key_action_move},
|
||||||
{ "move,left", "move", "left", _key_action_move},
|
{ "move,left", "move", "left", _key_action_move},
|
||||||
|
|
|
@ -1752,6 +1752,33 @@ _config_update(void)
|
||||||
_elm_config->transition_duration_factor = tcfg->transition_duration_factor;
|
_elm_config->transition_duration_factor = tcfg->transition_duration_factor;
|
||||||
IFCFGEND
|
IFCFGEND
|
||||||
|
|
||||||
|
IFCFG(0x0004)
|
||||||
|
Elm_Config_Bindings_Widget *wb, *twb = NULL;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(tcfg->bindings, l, wb)
|
||||||
|
{
|
||||||
|
if (wb->name && !strcmp(wb->name, "Elm_Hoversel"))
|
||||||
|
{
|
||||||
|
twb = wb;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (twb)
|
||||||
|
{
|
||||||
|
EINA_LIST_FOREACH(_elm_config->bindings, l, wb)
|
||||||
|
{
|
||||||
|
if (wb->name && !strcmp(wb->name, "Elm_Hoversel"))
|
||||||
|
{
|
||||||
|
// simply swap bindngs for Elm_Hoversel with system ones
|
||||||
|
Eina_List *tmp = wb->key_bindings;
|
||||||
|
wb->key_bindings = twb->key_bindings;
|
||||||
|
twb->key_bindings = tmp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
IFCFGEND
|
||||||
/**
|
/**
|
||||||
* Fix user config for current ELM_CONFIG_EPOCH here.
|
* Fix user config for current ELM_CONFIG_EPOCH here.
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -123,7 +123,7 @@ struct _Elm_Theme
|
||||||
* the users config doesn't need to be wiped - simply new values need
|
* the users config doesn't need to be wiped - simply new values need
|
||||||
* to be put in
|
* to be put in
|
||||||
*/
|
*/
|
||||||
#define ELM_CONFIG_FILE_GENERATION 0x0003
|
#define ELM_CONFIG_FILE_GENERATION 0x0004
|
||||||
#define ELM_CONFIG_VERSION_EPOCH_OFFSET 16
|
#define ELM_CONFIG_VERSION_EPOCH_OFFSET 16
|
||||||
#define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << ELM_CONFIG_VERSION_EPOCH_OFFSET) | \
|
#define ELM_CONFIG_VERSION ((ELM_CONFIG_EPOCH << ELM_CONFIG_VERSION_EPOCH_OFFSET) | \
|
||||||
ELM_CONFIG_FILE_GENERATION)
|
ELM_CONFIG_FILE_GENERATION)
|
||||||
|
|
Loading…
Reference in New Issue