From: Enlightenment S. <no-...@en...> - 2012-10-02 17:37:54
|
Log: edje_codegen: Fixing a small problem with programs Generating code even when there is no signal and/or source in a program with SIGNAL_EMIT action. Author: ceolin Date: 2012-10-02 10:37:48 -0700 (Tue, 02 Oct 2012) New Revision: 77330 Trac: http://trac.enlightenment.org/e/changeset/77330 Modified: trunk/edje/src/bin/edje_codegen.c Modified: trunk/edje/src/bin/edje_codegen.c =================================================================== --- trunk/edje/src/bin/edje_codegen.c 2012-10-02 17:06:20 UTC (rev 77329) +++ trunk/edje/src/bin/edje_codegen.c 2012-10-02 17:37:48 UTC (rev 77330) @@ -950,10 +950,31 @@ continue; } + description = edje_edit_program_api_description_get(ed, name); + type = edje_edit_program_action_get(ed, name); + if (type == EDJE_ACTION_TYPE_SIGNAL_EMIT) + { + const char *str, *str2; + str = edje_edit_program_state_get(ed, name); + str2 = edje_edit_program_state2_get(ed, name); + + if (!_write_program_add(apiname, str2, str, description)) + { + ret = EINA_FALSE; + edje_edit_string_free(str); + edje_edit_string_free(str2); + break; + } + + edje_edit_string_free(str); + edje_edit_string_free(str2); + } + signal = edje_edit_program_signal_get(ed, name); if (!signal) { free(apiname); + edje_edit_string_free(description); continue; } @@ -962,35 +983,16 @@ { free(apiname); edje_edit_string_free(signal); + edje_edit_string_free(description); continue; } - description = edje_edit_program_api_description_get(ed, name); if (!_write_program_emit(apiname, source, signal, description)) { ret = EINA_FALSE; break; } - type = edje_edit_program_action_get(ed, name); - if (type == EDJE_ACTION_TYPE_SIGNAL_EMIT) - { - const char *str, *str2; - str = edje_edit_program_state_get(ed, name); - str2 = edje_edit_program_state2_get(ed, name); - - if (!_write_program_add(apiname, str2, str, description)) - { - ret = EINA_FALSE; - edje_edit_string_free(str); - edje_edit_string_free(str2); - break; - } - - edje_edit_string_free(str); - edje_edit_string_free(str2); - } - edje_edit_string_free(description); edje_edit_string_free(signal); edje_edit_string_free(source); |