rimmed pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=dacbed9b4fd96a5ec71448b85465b99ddd9beba2
commit dacbed9b4fd96a5ec71448b85465b99ddd9beba2 Author: Mykyta Biliavskyi <[email protected]> Date: Thu Mar 16 11:42:52 2017 +0200 Main window: show authors list from AUTHORS file. Remove hardcoded author names string from main_window.c file. Now list of authors received from file AUTHORS. AUTHORS file is installed into <prefix>/share/eflete directory. --- AUTHORS | 8 +++---- Makefile.am | 3 +++ src/bin/ui/main_window.c | 56 ++++++++++++++++++++++++++++-------------------- 3 files changed, 40 insertions(+), 27 deletions(-) diff --git a/AUTHORS b/AUTHORS index 4df26f2..270e311 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,8 +1,6 @@ -Eflete - EFL Edje Theme Editor ------------------------------- - +Engineers: Vyacheslav "rimmed" Reutskiy ([email protected]) -Mykyta Biliavskyi ([email protected]) +Mykyta Biliavskyi "NikaWhite" ([email protected]) Vitalii Vorobiov ([email protected]) Andrii Kroitor ([email protected]) Kateryna Fesyna ([email protected]) @@ -10,8 +8,10 @@ Maksym Volodin ([email protected]) Igor Gala ([email protected]) Tetiana Naumenko ([email protected]) +QA: Olga Kolesnik ([email protected]) +Designers: Yurii Tsivun ([email protected]) Oleg Dotsenko ([email protected]) Dmitriy Samoylov ([email protected]) diff --git a/Makefile.am b/Makefile.am index d5730f4..1f4ded3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,6 +21,9 @@ EXTRA_DIST = \ m4/ewe.m4 \ m4/ewe_binary.m4 +authorsdir = $(datadir)/eflete +authors_DATA = AUTHORS + .PHONY: doc update-po report report_debug coverage if HAVE_DOXYGEN doc: diff --git a/src/bin/ui/main_window.c b/src/bin/ui/main_window.c index a6736e3..0ec3be4 100644 --- a/src/bin/ui/main_window.c +++ b/src/bin/ui/main_window.c @@ -246,32 +246,42 @@ Evas_Object * _about_window_content_get(void *data, Evas_Object *popup __UNUSED__, Evas_Object **to_focus __UNUSED__) { Evas_Object *label = (Evas_Object *) data; - elm_object_text_set(label, - "<color=#b6b6b6>" - "<b><align=center>"PACKAGE_NAME" v."VERSION" (build time "BUILD_TIME")</align></b><br>" - "This application was written for Enlightenment project.<br>" - "It is designed to create and modify styles of Elementary widgets.<br>" - "<br>" - "Copyright (C) 2013 - 2015 Samsung Electronics.<br>" - "<br>" - "<align=center><b>Authors:</b><br>" - "Vyacheslav \"rimmed\" Reutskiy ([email protected])<br>" - "Mykyta Biliavskyi ([email protected])<br>" - "Vitalii Vorobiov ([email protected])<br>" - "Andrii Kroitor ([email protected])<br>" - "Kateryna Fesyna ([email protected])<br>" - "Maksym Volodin ([email protected])<br>" - "Igor Gala ([email protected])<br>" - "<br>" - "Olga Kolesnik ([email protected])<br>" - "<br>" - "Oleg Dotsenko ([email protected])<br>" - "Yurii Tsivun ([email protected])<br>" - "Dmitriy Samoylov ([email protected])<br>" - "</align>"); + Eina_Strbuf *authors_file_path = NULL; + Eina_Strbuf *authors = NULL; + FILE *authors_file = NULL; + char *line = NULL; + size_t len = 0; + ssize_t read = 0; + + authors_file_path = eina_strbuf_new(); + eina_strbuf_prepend_printf(authors_file_path, "%s/AUTHORS", elm_app_data_dir_get()); + + authors_file = fopen(eina_strbuf_string_get(authors_file_path), "r"); + + authors = eina_strbuf_new(); + eina_strbuf_append_printf(authors, + "<color=#b6b6b6>" + "<b><align=center>"PACKAGE_NAME" v."VERSION" (build time "BUILD_TIME")</align></b><br>" + "This application was written for Enlightenment project.<br>" + "It is designed to create and modify styles of Elementary widgets.<br>" + "<br>" + "Copyright (C) 2013 - 2015 Samsung Electronics.<br>" + "<br>" + "<align=center><b>Authors:</b><br>"); + + while ((read = getline(&line, &len, authors_file)) != -1) + { + eina_strbuf_append_printf(authors, "%s<br>", line); + } + + eina_strbuf_append_printf(authors, "</align>"); + elm_object_text_set(label, eina_strbuf_string_get(authors)); elm_object_style_set(label, "slide_about"); elm_layout_signal_emit(label, "elm,state,slide,start", "elm"); + eina_strbuf_free(authors_file_path); + eina_strbuf_free(authors); + fclose(authors_file); return label; } --
