From: Prasoon Singh Date: Fri, 15 Apr 2016 06:43:28 +0000 (-0700) Subject: Merge "popup: add keybinding for popup "block,clicked" action" into tizen X-Git-Tag: accepted/tizen/common/20160421.161517~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf395021baf26c5417d6e1c731fe7a4eea0eb9c5;hp=738913d3cdc1c1b93ee92b95e43475826d4cf9a6;p=platform%2Fupstream%2Felementary.git Merge "popup: add keybinding for popup "block,clicked" action" into tizen --- diff --git a/config/default/base.src.in b/config/default/base.src.in index 188f41f..975529b 100644 --- a/config/default/base.src.in +++ b/config/default/base.src.in @@ -535,6 +535,12 @@ group "Elm_Config" struct { value "action" string: "move"; value "params" string: "down"; } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "Escape"; + value "action" string: "escape"; + value "params" string: ""; + } } } group "Elm_Config_Bindings_Widget" struct { diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in index aea7ae2..0e1e161 100644 --- a/config/mobile/base.src.in +++ b/config/mobile/base.src.in @@ -539,6 +539,12 @@ group "Elm_Config" struct { value "action" string: "move"; value "params" string: "down"; } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "Escape"; + value "action" string: "escape"; + value "params" string: ""; + } } } group "Elm_Config_Bindings_Widget" struct { diff --git a/config/standard/base.src.in b/config/standard/base.src.in index 2d87884..5b41990 100644 --- a/config/standard/base.src.in +++ b/config/standard/base.src.in @@ -536,6 +536,12 @@ group "Elm_Config" struct { value "action" string: "move"; value "params" string: "down"; } + group "Elm_Config_Binding_Key" struct { + value "context" int: 0; + value "key" string: "Escape"; + value "action" string: "escape"; + value "params" string: ""; + } } } group "Elm_Config_Bindings_Widget" struct { diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c index 4ee68f9..01acc87 100644 --- a/src/lib/elc_popup.c +++ b/src/lib/elc_popup.c @@ -55,8 +55,15 @@ static Eina_Bool _hide_effect_finished_cb(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED); +//TIZEN_ONLY(20150709) : add keybinding for elm_popup "block,clicked" action +static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params); +/// + static const Elm_Action key_actions[] = { {"move", _key_action_move}, +//TIZEN_ONLY(20150709) : add keybinding for elm_popup "block,clicked" action + {"escape", _key_action_escape}, +/// {NULL, NULL} }; @@ -1518,6 +1525,15 @@ _elm_popup_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Popup_Data *sd, c return EINA_TRUE; } +//TIZEN_ONLY(20150709) : add keybinding for elm_popup "block,clicked" action +static Eina_Bool +_key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED) +{ + evas_object_smart_callback_call(obj, SIG_BLOCK_CLICKED, NULL); + return EINA_TRUE; +} +// + static Eina_Bool _key_action_move(Evas_Object *obj, const char *params) { @@ -1956,6 +1972,9 @@ EOLIAN const Elm_Atspi_Action * _elm_popup_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Popup_Data *pd EINA_UNUSED) { static Elm_Atspi_Action atspi_actions[] = { +//TIZEN_ONLY(20150709) : add keybinding for elm_popup "block,clicked" action + { "escape", "escape", NULL, _key_action_escape}, +// { "move,previous", "move", "previous", _key_action_move}, { "move,next", "move", "next", _key_action_move}, { "move,left", "move", "left", _key_action_move},