Revert "Revert "key binding: define Elm_Action function as having a return type of...
authorChunEon Park <hermet@hermet.pe.kr>
Mon, 31 Mar 2014 12:28:05 +0000 (21:28 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Mon, 31 Mar 2014 12:28:05 +0000 (21:28 +0900)
This reverts commit 0c32a3fcf13f0c43747c478f012df259e987c156.

now this can be pushed since second merge window for 1.10 is open

src/lib/elm_button.c
src/lib/elm_config.c
src/lib/elm_panel.c
src/lib/elm_widget.h

index 6a01208..b5c5f80 100644 (file)
@@ -41,7 +41,7 @@ static const Elm_Layout_Part_Alias_Description _text_aliases[] =
    {NULL, NULL}
 };
 
-static void _key_action_activate(Evas_Object *obj, const char *params);
+static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params);
 
 static const Elm_Action key_actions[] = {
    {"activate", _key_action_activate},
@@ -156,10 +156,12 @@ _elm_button_elm_container_content_set(Eo *obj, Elm_Button_Data *_pd EINA_UNUSED,
    return EINA_TRUE;
 }
 
-static void _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
+static Eina_Bool
+_key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
 {
    elm_layout_signal_emit(obj, "elm,anim,activate", "elm");
    _activate(obj);
+   return EINA_TRUE;
 }
 
 EOLIAN static Eina_Bool
index 6eed719..c8d6052 100644 (file)
@@ -2167,10 +2167,7 @@ _elm_config_key_binding_call(Evas_Object *obj,
                   while (actions[i].name)
                     {
                        if (!strcmp(binding->action, actions[i].name))
-                         {
-                            actions[i].func(obj, binding->params);
-                            return EINA_TRUE;
-                         }
+                         return actions[i].func(obj, binding->params);
                        i++;
                     }
                   break;
index 8e9194f..c9fb2c8 100644 (file)
@@ -20,7 +20,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
    {NULL, NULL}
 };
 
-void _key_action_toggle(Evas_Object *obj, const char *params);
+static Eina_Bool _key_action_toggle(Evas_Object *obj, const char *params);
 
 static const Elm_Action key_actions[] = {
    {"toggle", _key_action_toggle},
@@ -237,9 +237,11 @@ _panel_toggle(void *data EINA_UNUSED,
    edje_object_message_signal_process(wd->resize_obj);
 }
 
-void _key_action_toggle(Evas_Object *obj, const char *params EINA_UNUSED)
+static Eina_Bool
+_key_action_toggle(Evas_Object *obj, const char *params EINA_UNUSED)
 {
    _panel_toggle(NULL, obj, NULL, NULL);
+   return EINA_TRUE;
 }
 
 EOLIAN static Eina_Bool
index da8c432..6f2b80e 100644 (file)
@@ -508,7 +508,7 @@ struct _Elm_Access_Info
 struct _Elm_Action
 {
    const char *name;
-   void (*func)(Evas_Object *obj, const char *params);
+   Eina_Bool (*func)(Evas_Object *obj, const char *params);
 };
 
 void                  _elm_access_shutdown();