From: Lukasz Stanislawski Date: Fri, 10 Jul 2015 15:21:18 +0000 (+0200) Subject: popup: add keybinding for popup "block,clicked" action X-Git-Tag: accepted/tizen/common/20160421.161517~14^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c856367d97020002d9a8a9e26914de8469653a86;p=platform%2Fupstream%2Felementary.git popup: add keybinding for popup "block,clicked" action @tizen_feature Conflicts: src/lib/elc_popup.c Change-Id: I50e46127e937525ea9057cb08314d8c2d8757db9 --- 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 6e75868..d02014a 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) { @@ -1957,6 +1973,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},