From 13ffef1042479bedf8dfca4c6e3f60ad3ef9c86a Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 10 Feb 2018 20:58:52 +0000 Subject: [PATCH 01/25] theme: roll back for the 0.7 releaes It looks like we won't have an efl major releases soon enough to add this --- NEWS | 2 - src/bin/edi_consolepanel.c | 5 -- src/bin/edi_debugpanel.c | 3 - src/bin/edi_logpanel.c | 3 - src/bin/edi_main.c | 5 -- src/bin/edi_searchpanel.c | 5 -- src/bin/edi_theme.c | 136 ------------------------------ src/bin/edi_theme.h | 73 ---------------- src/bin/editor/edi_editor.c | 5 -- src/bin/mainview/edi_mainview.c | 3 - src/bin/meson.build | 2 - src/bin/screens/edi_settings.c | 142 +------------------------------- 12 files changed, 1 insertion(+), 383 deletions(-) delete mode 100644 src/bin/edi_theme.c delete mode 100644 src/bin/edi_theme.h diff --git a/NEWS b/NEWS index ba45217..5bb52a1 100644 --- a/NEWS +++ b/NEWS @@ -4,8 +4,6 @@ Edi 0.7 Features: - * Added theme support and new themes. - * Added editor translucency option. * Added notification support. * Added split-view option for editors. * Project wizard and new project templates. diff --git a/src/bin/edi_consolepanel.c b/src/bin/edi_consolepanel.c index 42c8765..be5d8d6 100644 --- a/src/bin/edi_consolepanel.c +++ b/src/bin/edi_consolepanel.c @@ -16,7 +16,6 @@ #include "edi_consolepanel.h" #include "mainview/edi_mainview.h" -#include "edi_theme.h" #include "edi_config.h" #include "edi_private.h" @@ -322,13 +321,11 @@ _edi_consolepanel_config_changed(void *data EINA_UNUSED, int type EINA_UNUSED, v EINA_LIST_FOREACH(_edi_console_code->widgets, item, widget) { elm_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); } EINA_LIST_FOREACH(_edi_test_code->widgets, item, widget) { elm_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); } return ECORE_CALLBACK_RENEW; @@ -344,7 +341,6 @@ void edi_consolepanel_add(Evas_Object *parent) widget = elm_code_widget_add(parent, code); elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); elm_obj_code_widget_gravity_set(widget, 0.0, 1.0); efl_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, _edi_consolepanel_line_cb, NULL); efl_event_callback_add(widget, ELM_OBJ_CODE_WIDGET_EVENT_LINE_CLICKED, _edi_consolepanel_clicked_cb, code); @@ -370,7 +366,6 @@ void edi_testpanel_add(Evas_Object *parent) widget = elm_code_widget_add(parent, code); elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); elm_obj_code_widget_gravity_set(widget, 0.0, 1.0); efl_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, _edi_testpanel_line_cb, NULL); efl_event_callback_add(widget, ELM_OBJ_CODE_WIDGET_EVENT_LINE_CLICKED, _edi_consolepanel_clicked_cb, code); diff --git a/src/bin/edi_debugpanel.c b/src/bin/edi_debugpanel.c index 036df9d..c253edf 100644 --- a/src/bin/edi_debugpanel.c +++ b/src/bin/edi_debugpanel.c @@ -7,7 +7,6 @@ #include #include "edi_debug.h" -#include "edi_theme.h" #include "edi_debugpanel.h" #include "edi_config.h" @@ -37,7 +36,6 @@ static Eina_Bool _edi_debugpanel_config_changed(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) { elm_code_widget_font_set(_info_widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme); return ECORE_CALLBACK_RENEW; } @@ -325,7 +323,6 @@ void edi_debugpanel_add(Evas_Object *parent) code = elm_code_create(); widget = elm_code_widget_add(parent, code); elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme); elm_obj_code_widget_gravity_set(widget, 0.0, 1.0); efl_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, _edi_debugpanel_line_cb, NULL); evas_object_size_hint_weight_set(widget, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); diff --git a/src/bin/edi_logpanel.c b/src/bin/edi_logpanel.c index e743ac0..00d2b6f 100644 --- a/src/bin/edi_logpanel.c +++ b/src/bin/edi_logpanel.c @@ -7,7 +7,6 @@ #include #include "edi_logpanel.h" -#include "edi_theme.h" #include "edi_config.h" #include "edi_private.h" @@ -65,7 +64,6 @@ static Eina_Bool _edi_logpanel_config_changed(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) { elm_code_widget_font_set(_info_widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme); return ECORE_CALLBACK_RENEW; } @@ -77,7 +75,6 @@ void edi_logpanel_add(Evas_Object *parent) code = elm_code_create(); widget = elm_code_widget_add(parent, code); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); elm_obj_code_widget_gravity_set(widget, 0.0, 1.0); efl_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, _edi_logpanel_line_cb, NULL); diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c index f09447d..99a5c4e 100644 --- a/src/bin/edi_main.c +++ b/src/bin/edi_main.c @@ -8,12 +8,10 @@ #include #include -#include #include #include "Edi.h" #include "edi_config.h" -#include "edi_theme.h" #include "edi_filepanel.h" #include "edi_file.h" #include "edi_logpanel.h" @@ -1371,7 +1369,6 @@ static Eina_Bool _edi_config_changed(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) { _edi_toolbar_set_visible(!_edi_project_config->gui.toolbar_hidden); - edi_theme_window_alpha_set(); return ECORE_CALLBACK_RENEW; } @@ -1520,8 +1517,6 @@ edi_open(const char *inputpath) elm_win_resize_object_add(win, hbx); evas_object_show(hbx); - edi_theme_window_alpha_set(); - tb = edi_toolbar_setup(hbx); elm_box_pack_start(hbx, tb); _edi_toolbar = tb; diff --git a/src/bin/edi_searchpanel.c b/src/bin/edi_searchpanel.c index 6404119..6983047 100644 --- a/src/bin/edi_searchpanel.c +++ b/src/bin/edi_searchpanel.c @@ -9,7 +9,6 @@ #include #include "edi_file.h" #include "edi_searchpanel.h" -#include "edi_theme.h" #include "edi_config.h" #include "mainview/edi_mainview.h" @@ -26,7 +25,6 @@ static Eina_Bool _edi_searchpanel_config_changed_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) { elm_code_widget_font_set(_info_widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_set(_info_widget, _edi_project_config->gui.theme); return ECORE_CALLBACK_RENEW; } @@ -235,7 +233,6 @@ edi_searchpanel_add(Evas_Object *parent) Elm_Code *code; code = elm_code_create(); widget = elm_code_widget_add(parent, code); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); elm_obj_code_widget_gravity_set(widget, 0.0, 1.0); efl_event_callback_add(widget, ELM_OBJ_CODE_WIDGET_EVENT_LINE_CLICKED, _edi_searchpanel_line_clicked_cb, NULL); @@ -264,7 +261,6 @@ static Eina_Bool _edi_taskspanel_config_changed_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) { elm_code_widget_font_set(_tasks_widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_set(_tasks_widget, _edi_project_config->gui.theme); return ECORE_CALLBACK_RENEW; } @@ -304,7 +300,6 @@ edi_taskspanel_add(Evas_Object *parent) Elm_Code *code; code = elm_code_create(); widget = elm_code_widget_add(parent, code); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); elm_obj_code_widget_gravity_set(widget, 0.0, 1.0); efl_event_callback_add(widget, &ELM_CODE_EVENT_LINE_LOAD_DONE, _edi_taskspanel_line_cb, NULL); diff --git a/src/bin/edi_theme.c b/src/bin/edi_theme.c deleted file mode 100644 index b6cb42f..0000000 --- a/src/bin/edi_theme.c +++ /dev/null @@ -1,136 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include - -#include "Edi.h" -#include "edi_theme.h" -#include "edi_config.h" -#include "edi_private.h" - -static Eina_List *_edi_themes = NULL; - -// we are hooking into Efl for now... -Efl_Ui_Theme_Apply efl_ui_widget_theme_apply(Eo *obj); - -void -edi_theme_window_alpha_set(void) -{ - Evas_Object *win; - Eina_Bool enabled = _edi_project_config->gui.translucent; - - win = edi_main_win_get(); - - elm_win_alpha_set(win, enabled); - - if (enabled) - efl_gfx_color_set(efl_part(win, "background"), 64, 64, 64, _edi_project_config->gui.alpha); - else - efl_gfx_color_set(efl_part(win, "background"), 64, 64, 64, 255); -} - -void edi_theme_elm_code_alpha_set(Evas_Object *obj) -{ - if (_edi_project_config->gui.translucent) - elm_code_widget_alpha_set(obj, _edi_project_config->gui.alpha); - else - elm_code_widget_alpha_set(obj, 255); -} - -void -edi_theme_elm_code_set(Evas_Object *obj, const char *name) -{ - Eina_List *l; - Edi_Theme *theme; - - if (!obj || !name) - return; - - edi_theme_themes_get(); - - EINA_LIST_FOREACH(_edi_themes, l, theme) - { - if (strcmp(theme->name, name)) - continue; - - elm_layout_file_set(obj, theme->path, "elm/code/layout/default"); - efl_ui_widget_theme_apply(obj); - } -} - -Edi_Theme * -edi_theme_theme_by_name(const char *name) -{ - Eina_List *l; - Edi_Theme *theme; - - if (!name) return NULL; - - edi_theme_themes_get(); - - EINA_LIST_FOREACH(_edi_themes, l, theme) - { - if (!strcmp(theme->name, name)) - return theme; - } - - return NULL; -} - -static int -_theme_sort_cb(const void *t1, const void *t2) -{ - const Edi_Theme *theme1 = t1; - const Edi_Theme *theme2 = t2; - - if (!theme1) return 1; - if (!theme2) return -1; - - return strcmp(theme1->title, theme2->title); -} - -Eina_List * -edi_theme_themes_get(void) -{ - Eina_List *files; - char *directory, *file, *name; - Edi_Theme *theme; - - if (_edi_themes) return _edi_themes; - - directory = PACKAGE_DATA_DIR "/themes"; - - theme = malloc(sizeof(Edi_Theme)); - theme->name = strdup("default"); - theme->path = edi_path_append(elm_theme_system_dir_get(), "default.edj"); - theme->title = strdup("Default EFL"); - - _edi_themes = eina_list_append(_edi_themes, theme); - - files = ecore_file_ls(directory); - EINA_LIST_FREE(files, file) - { - if (eina_str_has_extension(file, ".edj") && strcmp(file, "default.edj")) - { - theme = malloc(sizeof(Edi_Theme)); - name = strdup(file); - name[strlen(name) - 4] = '\0'; - theme->name = name; - theme->path = edi_path_append(directory, file); - theme->title = edje_file_data_get(theme->path, "title"); - _edi_themes = eina_list_append(_edi_themes, theme); - } - free(file); - } - - if (files) - eina_list_free(files); - - _edi_themes = eina_list_sort(_edi_themes, eina_list_count(_edi_themes), _theme_sort_cb); - - return _edi_themes; -} - - diff --git a/src/bin/edi_theme.h b/src/bin/edi_theme.h deleted file mode 100644 index d6d3992..0000000 --- a/src/bin/edi_theme.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef __EDI_THEME_H__ -#define __EDI_THEME_H__ - -#include -#include - -typedef struct _Edi_Theme { - char *name; - char *path; - char *title; -} Edi_Theme; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file - * @brief These routines used for managing Edi theme actions. - */ - -/** - * @brief Theme management functions. - * @defgroup Theme - * - * @{ - * - * Management of theming actions. - * - */ - -/** - * Set the Edi theme by name on an Elm_Code_Widget. - * - * @param obj The Elm_Code_Widget object to apply the theme to. - * @param name The name of the theme to apply. - * - * @ingroup Theme - */ -void edi_theme_elm_code_set(Evas_Object *obj, const char *name); - -/** - * Get a list of all themes available. - * - * @return a list of all available themes as Edi_Theme instances. - * - * @ingroup Theme - */ -Eina_List *edi_theme_themes_get(void); - -/** - * Get theme obj by its name. - * - * @return the theme obj matching the name. - * - * @ingroup Theme - */ -Edi_Theme *edi_theme_theme_by_name(const char *name); - -void edi_theme_window_alpha_set(void); -void edi_theme_elm_code_alpha_set(Evas_Object *obj); -/** - * @} - */ - - -#ifdef __cplusplus -} -#endif - - - -#endif diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c index 7d85633..31e56d8 100644 --- a/src/bin/editor/edi_editor.c +++ b/src/bin/editor/edi_editor.c @@ -12,7 +12,6 @@ #include "mainview/edi_mainview.h" #include "edi_filepanel.h" #include "edi_config.h" -#include "edi_theme.h" #include "language/edi_language_provider.h" @@ -1307,8 +1306,6 @@ _edi_editor_config_changed(void *data, int type EINA_UNUSED, void *event EINA_UN code->config.trim_whitespace = _edi_config->trim_whitespace; elm_obj_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_alpha_set(widget); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); elm_obj_code_widget_show_whitespace_set(widget, _edi_project_config->gui.show_whitespace); elm_obj_code_widget_tab_inserts_spaces_set(widget, _edi_project_config->gui.tab_inserts_spaces); elm_obj_code_widget_line_width_marker_set(widget, _edi_project_config->gui.width_marker); @@ -1401,8 +1398,6 @@ edi_editor_add(Evas_Object *parent, Edi_Mainview_Item *item) elm_code_widget_line_numbers_set(widget, EINA_TRUE); _edi_editor_config_changed(widget, 0, NULL); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); - editor = calloc(1, sizeof(*editor)); editor->entry = widget; editor->mimetype = item->mimetype; diff --git a/src/bin/mainview/edi_mainview.c b/src/bin/mainview/edi_mainview.c index b39acb0..ad4e212 100644 --- a/src/bin/mainview/edi_mainview.c +++ b/src/bin/mainview/edi_mainview.c @@ -16,7 +16,6 @@ #include "edi_content_provider.h" #include "edi_searchpanel.h" #include "edi_file.h" -#include "edi_theme.h" #include "edi_private.h" #include "edi_config.h" @@ -291,8 +290,6 @@ _edi_mainview_split_config_changed_cb(void *data, int type EINA_UNUSED, void *ev Elm_Code_Widget *widget = data; elm_code_widget_font_set(widget, _edi_project_config->font.name, _edi_project_config->font.size); - edi_theme_elm_code_alpha_set(widget); - edi_theme_elm_code_set(widget, _edi_project_config->gui.theme); return ECORE_CALLBACK_RENEW; } diff --git a/src/bin/meson.build b/src/bin/meson.build index 20f82e1..96ff1a3 100644 --- a/src/bin/meson.build +++ b/src/bin/meson.build @@ -21,8 +21,6 @@ src = files([ 'edi_private.h', 'edi_searchpanel.c', 'edi_searchpanel.h', - 'edi_theme.c', - 'edi_theme.h', ]) bin_dir = include_directories('.') diff --git a/src/bin/screens/edi_settings.c b/src/bin/screens/edi_settings.c index 05b2795..9926409 100644 --- a/src/bin/screens/edi_settings.c +++ b/src/bin/screens/edi_settings.c @@ -9,7 +9,6 @@ #include "edi_screens.h" #include "edi_config.h" #include "edi_debug.h" -#include "edi_theme.h" #include "edi_private.h" @@ -146,74 +145,11 @@ _edi_settings_font_preview_add(Evas_Object *parent, const char *font_name, int f return widget; } -static void -_edi_settings_display_theme_pressed_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info) -{ - Edi_Theme *theme; - const char *text = elm_object_item_text_get(event_info); - - theme = elm_object_item_data_get(event_info); - - if (_edi_project_config->gui.theme) - eina_stringshare_del(_edi_project_config->gui.theme); - - _edi_project_config->gui.theme = eina_stringshare_add(theme->name); - _edi_project_config_save(); - - elm_object_text_set(obj, text); - elm_combobox_hover_end(obj); -} - -static char * -_edi_settings_display_theme_text_get_cb(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) -{ - Edi_Theme *current; - - current = data; - - return strdup(current->title); -} - -static void -_edi_settings_display_translucent_state_cb(void *data EINA_UNUSED, Evas_Object *obj, - void *event EINA_UNUSED) -{ - Evas_Object *slider, *check; - int state; - - check = obj; - slider = data; - - state = elm_check_state_get(check); - - _edi_project_config->gui.translucent = state; - _edi_project_config_save(); - - elm_object_disabled_set(slider, !state); -} - -static void -_edi_settings_display_alpha_changed_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) -{ - - _edi_project_config->gui.alpha = elm_slider_value_get(obj); - _edi_project_config_save(); -} - -static char * -_edi_settings_display_alpha_format(double value) -{ - return (char*)eina_stringshare_printf("%1.0f%%", (value/255)*100); -} - static Evas_Object * _edi_settings_display_create(Evas_Object *parent) { Evas_Object *container, *box, *frame, *label, *spinner, *check, *button, *preview; - Evas_Object *table, *combobox, *slider; - Elm_Genlist_Item_Class *itc; - Edi_Theme *theme; - Eina_List *themes, *l; + Evas_Object *table; container = elm_box_add(parent); evas_object_size_hint_weight_set(container, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -249,82 +185,6 @@ _edi_settings_display_create(Evas_Object *parent) elm_object_focus_set(button, EINA_TRUE); - label = elm_label_add(table); - elm_object_text_set(label, _("Color theme")); - evas_object_size_hint_align_set(label, EVAS_HINT_EXPAND, 0.5); - elm_table_pack(table, label, 0, 1, 1, 1); - evas_object_show(label); - - // START OF THEME SELECTOR - - combobox = elm_combobox_add(table); - evas_object_size_hint_weight_set(combobox, 0.75, 0.0); - evas_object_size_hint_align_set(combobox, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(combobox); - evas_object_smart_callback_add(combobox, "item,pressed", - _edi_settings_display_theme_pressed_cb, NULL); - - if (!_edi_project_config->gui.theme) - elm_object_text_set(combobox, edi_theme_theme_by_name("default")->title); - else - elm_object_text_set(combobox, edi_theme_theme_by_name(_edi_project_config->gui.theme)->title); - - elm_table_pack(table, combobox, 1, 1, 1, 1); - itc = elm_genlist_item_class_new(); - itc->item_style = "default"; - itc->func.text_get = _edi_settings_display_theme_text_get_cb; - - themes = edi_theme_themes_get(); - - EINA_LIST_FOREACH(themes, l, theme) - { - elm_genlist_item_append(combobox, itc, theme, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); - } - - elm_genlist_realized_items_update(combobox); - elm_genlist_item_class_free(itc); - - // END OF THEME SELECTOR - - // START OF ALPHA SELECTOR - label = elm_label_add(table); - elm_object_text_set(label, _("Translucent")); - evas_object_size_hint_align_set(label, EVAS_HINT_EXPAND, 0.5); - elm_table_pack(table, label, 0, 2, 1, 1); - evas_object_show(label); - - slider = elm_slider_add(table); - check = elm_check_add(box); - elm_check_state_set(check, _edi_project_config->gui.translucent); - evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, 0.0); - evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_table_pack(table, check, 1, 2, 1, 1); - evas_object_show(check); - evas_object_smart_callback_add(check, "changed", - _edi_settings_display_translucent_state_cb, slider); - - label = elm_label_add(table); - elm_object_text_set(label, _("Alpha")); - evas_object_size_hint_align_set(label, EVAS_HINT_EXPAND, 0.5); - elm_table_pack(table, label, 0, 3, 1, 1); - evas_object_show(label); - - elm_object_disabled_set(slider, !_edi_project_config->gui.translucent); - evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5); - evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_slider_min_max_set(slider, 0, 255); - elm_slider_value_set(slider, _edi_project_config->gui.alpha); - elm_slider_span_size_set(slider, 255); - elm_slider_step_set(slider, 0.01); - elm_slider_units_format_function_set(slider, _edi_settings_display_alpha_format, - (void(*)(char*))eina_stringshare_del); - elm_slider_indicator_format_function_set(slider, _edi_settings_display_alpha_format, - (void(*)(char*))eina_stringshare_del); - elm_table_pack(table, slider, 1, 3, 1, 1); - evas_object_show(slider); - evas_object_smart_callback_add(slider, "slider,drag,stop", _edi_settings_display_alpha_changed_cb, NULL); - evas_object_smart_callback_add(slider, "delay,changed", _edi_settings_display_alpha_changed_cb, NULL); - label = elm_label_add(table); elm_object_text_set(label, _("Hide Toolbar")); evas_object_size_hint_align_set(label, EVAS_HINT_EXPAND, 0.5); From 5501a9559b45a3ee87e543af05704fce026b3baa Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 10 Feb 2018 20:59:47 +0000 Subject: [PATCH 02/25] Update for latest feature additions --- NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 5bb52a1..48978cf 100644 --- a/NEWS +++ b/NEWS @@ -6,7 +6,8 @@ Features: * Added notification support. * Added split-view option for editors. - * Project wizard and new project templates. + * Updated project wizard and added new project templates. + * Include EFL examples in project wizard. * Improved debugging support. * Added edi_scm helper command. * Replace all in project. From cac43376a31714b0430f9835dc537737663b39ca Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 10 Feb 2018 21:05:58 +0000 Subject: [PATCH 03/25] theme: We don't need to build a theme until that's supported --- data/meson.build | 1 - data/themes/meson.build | 23 ------------ data/themes/solarized.edc | 64 --------------------------------- data/themes/solarized_dark.edc | 65 ---------------------------------- data/themes/white.edc | 64 --------------------------------- 5 files changed, 217 deletions(-) delete mode 100644 data/themes/meson.build delete mode 100644 data/themes/solarized.edc delete mode 100644 data/themes/solarized_dark.edc delete mode 100644 data/themes/white.edc diff --git a/data/meson.build b/data/meson.build index 881b3c2..31d0bbc 100644 --- a/data/meson.build +++ b/data/meson.build @@ -2,4 +2,3 @@ subdir('desktop') subdir('images') subdir('extra/templates') subdir('extra/examples') -subdir('themes') diff --git a/data/themes/meson.build b/data/themes/meson.build deleted file mode 100644 index fedc214..0000000 --- a/data/themes/meson.build +++ /dev/null @@ -1,23 +0,0 @@ -edje_cc = find_program('edje_cc') - -cmd = [ edje_cc, - '-id', join_paths(meson.source_root(), 'data' , 'themes'), - '@INPUT@', '@OUTPUT@' - ] - -theme_names = ['white', 'solarized', 'solarized_dark'] - -foreach theme_name : theme_names - custom_target('theme ' + theme_name, - input : theme_name + '.edc', - output : theme_name + '.edj', - command: cmd, - install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'edi', 'themes'), - install: true, - ) - - out = join_paths(get_option('prefix'), get_option('datadir'), 'edi', 'themes', theme_name + '.edj') - meson.add_install_script('../../scripts/world_read.sh', out) -endforeach - - diff --git a/data/themes/solarized.edc b/data/themes/solarized.edc deleted file mode 100644 index cfcf9e5..0000000 --- a/data/themes/solarized.edc +++ /dev/null @@ -1,64 +0,0 @@ -data { - item: "title" "Solarized"; -} - -collections { -/* simple layout to pack our scrolling content into an elm_layout */ -group { name: "elm/code/layout/default"; - data { - item: "font.name" "Mono"; - item: "font.size" "10"; - } - parts { - part { name: "elm.swallow.content"; type: SWALLOW; - description { state: "default" 0.0; - align: 0.5 0.0; - fixed: 0 1; - - rel2 { - relative: 1.0 1.0; - offset: 0 0; - } - } - } - } -} - -color_classes { - color_class { name: "elm/code/status/default"; color: 253 246 227 255; } - color_class { name: "elm/code/status/current"; color: 238 232 213 255; } - color_class { name: "elm/code/status/ignored"; color: 36 36 36 255; } - color_class { name: "elm/code/status/note"; color: 221 119 17 255; } - color_class { name: "elm/code/status/warning"; color: 221 119 17 255; } - color_class { name: "elm/code/status/error"; color: 204 17 17 255; } - color_class { name: "elm/code/status/fatal"; color: 204 17 17 255; } - color_class { name: "elm/code/status/added"; color: 36 96 36 255; } - color_class { name: "elm/code/status/removed"; color: 96 36 36 255; } - color_class { name: "elm/code/status/changed"; color: 36 36 96 255; } - color_class { name: "elm/code/status/passed"; color: 54 96 54 255; } - color_class { name: "elm/code/status/failed"; color: 96 54 54 255; } - color_class { name: "elm/code/status/todo"; color: 211 54 130 255; } - - color_class { name: "elm/code/token/default"; color: 88 110 117 255; } - color_class { name: "elm/code/token/comment"; color: 147 161 161 255; } - color_class { name: "elm/code/token/string"; color: 42 161 152 255; } - color_class { name: "elm/code/token/number"; color: 42 161 152 255; } - color_class { name: "elm/code/token/brace"; color: 101 123 131 255; } - color_class { name: "elm/code/token/type"; color: 181 137 0 255; } - color_class { name: "elm/code/token/class"; color: 255 255 255 255; } - color_class { name: "elm/code/token/function"; color: 255 255 255 255; } - color_class { name: "elm/code/token/param"; color: 133 153 0 255; } - color_class { name: "elm/code/token/keyword"; color: 133 153 0 255; } - color_class { name: "elm/code/token/preprocessor"; color: 203 75 22 255; } - color_class { name: "elm/code/token/added"; color: 54 255 54 255; } - color_class { name: "elm/code/token/removed"; color: 255 54 54 255; } - color_class { name: "elm/code/token/changed"; color: 54 54 255 255; } - color_class { name: "elm/code/token/match"; color: 187 187 51 255; } - - color_class { name: "elm/code/widget/color/selection"; color: 133 153 0 255; } - color_class { name: "elm/code/widget/color/gutter/bg"; color: 238 232 213 255; } - color_class { name: "elm/code/widget/color/gutter/fg"; color: 147 161 161 255; } - color_class { name: "elm/code/widget/color/gutter/scope/bg"; color: 54 54 54 255; } - color_class { name: "elm/code/widget/color/whitespace"; color: 50 50 50 127; } -} -} diff --git a/data/themes/solarized_dark.edc b/data/themes/solarized_dark.edc deleted file mode 100644 index a3b728c..0000000 --- a/data/themes/solarized_dark.edc +++ /dev/null @@ -1,65 +0,0 @@ -data { - item: "title" "Solarized Dark"; -} - -collections { - -/* simple layout to pack our scrolling content into an elm_layout */ -group { name: "elm/code/layout/default"; - data { - item: "font.name" "Mono"; - item: "font.size" "10"; - } - parts { - part { name: "elm.swallow.content"; type: SWALLOW; - description { state: "default" 0.0; - align: 0.5 0.0; - fixed: 0 1; - - rel2 { - relative: 1.0 1.0; - offset: 0 0; - } - } - } - } -} - -color_classes { - color_class { name: "elm/code/status/default"; color: 0 43 54 255; } - color_class { name: "elm/code/status/current"; color: 7 54 66 255; } - color_class { name: "elm/code/status/ignored"; color: 36 36 36 255; } - color_class { name: "elm/code/status/note"; color: 221 119 17 255; } - color_class { name: "elm/code/status/warning"; color: 221 119 17 255; } - color_class { name: "elm/code/status/error"; color: 204 17 17 255; } - color_class { name: "elm/code/status/fatal"; color: 204 17 17 255; } - color_class { name: "elm/code/status/added"; color: 36 96 36 255; } - color_class { name: "elm/code/status/removed"; color: 96 36 36 255; } - color_class { name: "elm/code/status/changed"; color: 36 36 96 255; } - color_class { name: "elm/code/status/passed"; color: 54 96 54 255; } - color_class { name: "elm/code/status/failed"; color: 96 54 54 255; } - color_class { name: "elm/code/status/todo"; color: 211 54 130 255; } - - color_class { name: "elm/code/token/default"; color: 147 161 161 255; } - color_class { name: "elm/code/token/comment"; color: 88 110 117 255; } - color_class { name: "elm/code/token/string"; color: 42 161 152 255; } - color_class { name: "elm/code/token/number"; color: 42 161 152 255; } - color_class { name: "elm/code/token/brace"; color: 131 148 150 255; } - color_class { name: "elm/code/token/type"; color: 181 137 0 255; } - color_class { name: "elm/code/token/class"; color: 255 255 255 255; } - color_class { name: "elm/code/token/function"; color: 255 255 255 255; } - color_class { name: "elm/code/token/param"; color: 181 137 0 255; } - color_class { name: "elm/code/token/keyword"; color: 181 137 0 255; } - color_class { name: "elm/code/token/preprocessor"; color: 203 75 22 255; } - color_class { name: "elm/code/token/added"; color: 54 255 54 255; } - color_class { name: "elm/code/token/removed"; color: 255 54 54 255; } - color_class { name: "elm/code/token/changed"; color: 54 54 255 255; } - color_class { name: "elm/code/token/match"; color: 187 187 51 255; } - - color_class { name: "elm/code/widget/color/selection"; color: 38 139 210 255; } - color_class { name: "elm/code/widget/color/gutter/bg"; color: 7 54 66 255; } - color_class { name: "elm/code/widget/color/gutter/fg"; color: 88 110 117 255; } - color_class { name: "elm/code/widget/color/gutter/scope/bg"; color: 54 54 54 255; } - color_class { name: "elm/code/widget/color/whitespace"; color: 50 50 50 127; } -} -} diff --git a/data/themes/white.edc b/data/themes/white.edc deleted file mode 100644 index a8c4389..0000000 --- a/data/themes/white.edc +++ /dev/null @@ -1,64 +0,0 @@ -data { - item: "title" "Black on White"; -} - -collections { -/* simple layout to pack our scrolling content into an elm_layout */ -group { name: "elm/code/layout/default"; - data { - item: "font.name" "Mono"; - item: "font.size" "10"; - } - parts { - part { name: "elm.swallow.content"; type: SWALLOW; - description { state: "default" 0.0; - align: 0.5 0.0; - fixed: 0 1; - - rel2 { - relative: 1.0 1.0; - offset: 0 0; - } - } - } - } -} - -color_classes { - color_class { name: "elm/code/status/default"; color: 255 255 255 255; } - color_class { name: "elm/code/status/current"; color: 211 211 211 255; } - color_class { name: "elm/code/status/ignored"; color: 0 0 0 255; } - color_class { name: "elm/code/status/note"; color: 0 0 0 255; } - color_class { name: "elm/code/status/warning"; color: 0 0 0 255; } - color_class { name: "elm/code/status/error"; color: 0 0 0 255; } - color_class { name: "elm/code/status/fatal"; color: 0 0 0 255; } - color_class { name: "elm/code/status/added"; color: 0 0 0 255; } - color_class { name: "elm/code/status/removed"; color: 0 0 0 255; } - color_class { name: "elm/code/status/changed"; color: 0 0 0 255; } - color_class { name: "elm/code/status/passed"; color: 0 0 0 255; } - color_class { name: "elm/code/status/failed"; color: 0 0 0 255; } - color_class { name: "elm/code/status/todo"; color: 0 0 0 255; } - - color_class { name: "elm/code/token/default"; color: 0 0 0 255; } - color_class { name: "elm/code/token/comment"; color: 0 0 0 255; } - color_class { name: "elm/code/token/string"; color: 0 0 0 255; } - color_class { name: "elm/code/token/number"; color: 0 0 0 255; } - color_class { name: "elm/code/token/brace"; color: 0 0 0 255; } - color_class { name: "elm/code/token/type"; color: 0 0 0 255; } - color_class { name: "elm/code/token/class"; color: 0 0 0 255; } - color_class { name: "elm/code/token/function"; color: 0 0 0 255; } - color_class { name: "elm/code/token/param"; color: 0 0 0 255; } - color_class { name: "elm/code/token/keyword"; color: 0 0 0 255; } - color_class { name: "elm/code/token/preprocessor"; color: 0 0 0 255; } - color_class { name: "elm/code/token/added"; color: 0 0 0 255; } - color_class { name: "elm/code/token/removed"; color: 0 0 0 255; } - color_class { name: "elm/code/token/changed"; color: 0 0 0 255; } - color_class { name: "elm/code/token/match"; color: 0 0 0 255; } - - color_class { name: "elm/code/widget/color/selection"; color: 169 169 169 255; } - color_class { name: "elm/code/widget/color/gutter/bg"; color: 211 211 211 255; } - color_class { name: "elm/code/widget/color/gutter/fg"; color: 21 21 21 255; } - color_class { name: "elm/code/widget/color/gutter/scope/bg"; color: 255 255 255 255; } - color_class { name: "elm/code/widget/color/whitespace"; color: 255 255 255 255; } -} -} From b623d712d116bdf1f90761e42ef47787e7c099df Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 10 Feb 2018 21:06:07 +0000 Subject: [PATCH 04/25] Update EFL version required --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 2800a46..f423cf2 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project( 'edi', 'c', - version : '0.6.99', + version : '0.7.0', default_options: [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.39.0') @@ -22,7 +22,7 @@ config_h.set_quoted('PACKAGE_DOC_DIR', join_paths(get_option('prefix'), get_opti config_h.set_quoted('EFL_BETA_API_SUPPORT' , '1') -elm = dependency('elementary') +elm = dependency('elementary', version : '>=1.20.6') top_inc = include_directories('.') cc = meson.get_compiler('c') From e20fa8bff9fc7bc1c50fcd7a95dc49235430a2f7 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 17 Feb 2018 19:49:07 +0000 Subject: [PATCH 05/25] Fix typo in string constructon --- src/lib/edi_build_provider_make.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/edi_build_provider_make.c b/src/lib/edi_build_provider_make.c index 2f3854c..d62b7ad 100644 --- a/src/lib/edi_build_provider_make.c +++ b/src/lib/edi_build_provider_make.c @@ -150,9 +150,9 @@ _make_run(const char *path, const char *args) return; } - full_len = strlen(path) + strlen(path); + full_len = strlen(path) + strlen(args) + 1; full_cmd = malloc(sizeof(char) * (full_len + 1)); - snprintf(full_cmd, full_len + 2, "%s %s", path, args); + snprintf(full_cmd, full_len + 1, "%s %s", path, args); ecore_exe_pipe_run(full_cmd, ECORE_EXE_PIPE_READ_LINE_BUFFERED | ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_ERROR_LINE_BUFFERED | ECORE_EXE_PIPE_ERROR | From 5e318be09caad8d81df9ec24c9df95db417a9ed9 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 17 Feb 2018 20:02:03 +0000 Subject: [PATCH 06/25] build: Add support for Go building --- NEWS | 1 + src/lib/edi_build_provider.c | 5 ++ src/lib/edi_build_provider_go.c | 109 ++++++++++++++++++++++++++++++++ src/lib/meson.build | 1 + 4 files changed, 116 insertions(+) create mode 100644 src/lib/edi_build_provider_go.c diff --git a/NEWS b/NEWS index 48978cf..2b75cef 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ Features: * Added split-view option for editors. * Updated project wizard and added new project templates. * Include EFL examples in project wizard. + * Add support for Go projects. * Improved debugging support. * Added edi_scm helper command. * Replace all in project. diff --git a/src/lib/edi_build_provider.c b/src/lib/edi_build_provider.c index ecfe700..c2159a1 100644 --- a/src/lib/edi_build_provider.c +++ b/src/lib/edi_build_provider.c @@ -12,6 +12,7 @@ extern Edi_Build_Provider _edi_build_provider_cmake; extern Edi_Build_Provider _edi_build_provider_cargo; extern Edi_Build_Provider _edi_build_provider_python; extern Edi_Build_Provider _edi_build_provider_meson; +extern Edi_Build_Provider _edi_build_provider_go; EAPI Edi_Build_Provider *edi_build_provider_for_project_get() { @@ -31,6 +32,8 @@ EAPI Edi_Build_Provider *edi_build_provider_for_project_path_get(const char *pat return &_edi_build_provider_python; if (_edi_build_provider_meson.path_supported_is(path)) return &_edi_build_provider_meson; + if (_edi_build_provider_go.path_supported_is(path)) + return &_edi_build_provider_go; if (_edi_build_provider_make.path_supported_is(path)) return &_edi_build_provider_make; @@ -49,6 +52,8 @@ EAPI Edi_Build_Provider *edi_build_provider_for_id_get(const char *id) return &_edi_build_provider_python; if (!strcmp("meson", id)) return &_edi_build_provider_meson; + if (!strcmp("go", id)) + return &_edi_build_provider_go; return NULL; } diff --git a/src/lib/edi_build_provider_go.c b/src/lib/edi_build_provider_go.c new file mode 100644 index 0000000..119010b --- /dev/null +++ b/src/lib/edi_build_provider_go.c @@ -0,0 +1,109 @@ +#ifdef HAVE_CONFIG +# include "config.h" +#endif + +#include +#include +#include + +#include "Edi.h" + +#include "edi_private.h" + +static Eina_Bool +_go_project_supported(const char *path) +{ + Eina_List *files, *l; + const char *name; + + files = ecore_file_ls(path); + + EINA_LIST_FOREACH(files, l, name) + { + if (strlen(name) < 4) + continue; + + if (strstr(name, ".go")) + return EINA_TRUE; + } + + return EINA_FALSE; +} + +static Eina_Bool +_go_file_hidden_is(const char *file) +{ + if (!file || strlen(file) == 0) + return EINA_FALSE; + + if (!strcmp(ecore_file_file_get(file), "_obj") || !strcmp(ecore_file_file_get(file), "target") || + eina_str_has_extension(file, ".so")) + return EINA_TRUE; + + return EINA_FALSE; +} + +static Eina_Bool +_go_project_runnable_is(const char *path EINA_UNUSED) +{ + if (!path || !path[0]) + return EINA_FALSE; + + return EINA_TRUE; +} + +static void +_go_build(void) +{ + if (chdir(edi_project_get()) == 0) + edi_exe_notify("edi_build", "go build"); +} + +static void +_go_test(void) +{ + if (chdir(edi_project_get()) == 0) + edi_exe_notify("edi_test", "go test -v ./..."); +} + +static void +_go_run(const char *path EINA_UNUSED, const char *args EINA_UNUSED) +{ + char *full_cmd; + int full_len; + + if (!path) return; + if (chdir(edi_project_get()) !=0) + ERR("Could not chdir"); + + full_len = strlen(path) + 8; + if (args) + full_len += strlen(args); + full_cmd = malloc(sizeof(char) * (full_len + 1)); + snprintf(full_cmd, full_len + 1, "go run %s %s", path, args?args:""); + + ecore_exe_pipe_run(full_cmd, ECORE_EXE_PIPE_READ_LINE_BUFFERED | ECORE_EXE_PIPE_READ | + ECORE_EXE_PIPE_ERROR_LINE_BUFFERED | ECORE_EXE_PIPE_ERROR | + ECORE_EXE_PIPE_WRITE | ECORE_EXE_USE_SH, NULL); + + free(full_cmd); +} + +static void +_go_clean(void) +{ + if (chdir(edi_project_get()) == 0) + edi_exe_notify("edi_clean", "go clean"); +} + +Edi_Build_Provider _edi_build_provider_go = + { + "go", + _go_project_supported, + _go_file_hidden_is, + _go_project_runnable_is, + _go_build, + _go_test, + _go_run, + _go_clean + }; diff --git a/src/lib/meson.build b/src/lib/meson.build index 691a47d..ca5f978 100644 --- a/src/lib/meson.build +++ b/src/lib/meson.build @@ -8,6 +8,7 @@ src = files([ 'edi_build_provider_make.c', 'edi_build_provider_meson.c', 'edi_build_provider_python.c', + 'edi_build_provider_go.c', 'edi_builder.c', 'edi_builder.h', 'edi_create.c', From 263c9b5f1ef848793d7786e0289d44a927219ec3 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Thu, 22 Feb 2018 13:06:33 +0000 Subject: [PATCH 07/25] Load the test results for Golang builds --- src/bin/edi_consolepanel.c | 59 ++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/src/bin/edi_consolepanel.c b/src/bin/edi_consolepanel.c index be5d8d6..4adf74e 100644 --- a/src/bin/edi_consolepanel.c +++ b/src/bin/edi_consolepanel.c @@ -152,6 +152,25 @@ void edi_consolepanel_clear() _edi_test_count = _edi_test_pass = _edi_test_fail = 0; } +static void +_edi_test_output_suite(int count, int pass, int fail) +{ + char *line; + const char *format = _("Total pass %d (%d%%), fail %d)"); + int linemax, percent; + + linemax = strlen(format) - 6 + 30; + line = malloc(sizeof(char) * linemax); + + percent = 0; + if (count > 0) + percent = (int) ((pass / (double) count) * 100); + + snprintf(line, linemax, format, pass, percent, fail); + elm_code_file_line_append(_edi_test_code->file, line, strlen(line), (fail > 0) ? _EDI_SUITE_FAILED : _EDI_SUITE_PASSED); + free(line); +} + static Eina_Bool _exe_data(void *d EINA_UNUSED, int t EINA_UNUSED, void *event_info) { @@ -178,23 +197,15 @@ _exe_error(void *d EINA_UNUSED, int t EINA_UNUSED, void *event_info) return ECORE_CALLBACK_RENEW; } -static void -_edi_test_output_suite(int count, int pass, int fail) +static Eina_Bool +_exe_done(void *d EINA_UNUSED, int t EINA_UNUSED, void *event_info EINA_UNUSED) { - char *line; - const char *format = _("Total pass %d (%d%%), fail %d)"); - int linemax, percent; + if (_edi_test_count == 0) + return ECORE_CALLBACK_RENEW; - linemax = strlen(format) - 6 + 30; - line = malloc(sizeof(char) * linemax); - - percent = 0; - if (count > 0) - percent = (int) ((pass / (double) count) * 100); - - snprintf(line, linemax, format, pass, percent, fail); - elm_code_file_line_append(_edi_test_code->file, line, strlen(line), (fail > 0) ? _EDI_SUITE_FAILED : _EDI_SUITE_PASSED); - free(line); + _edi_test_output_suite(_edi_test_count, _edi_test_pass, _edi_test_fail); + _edi_test_count = 0; + return ECORE_CALLBACK_RENEW; } static Eina_Bool @@ -309,6 +320,23 @@ static void _edi_test_line_callback(const char *content) else if (!strncmp(content, "FAIL:", 5)) { _edi_test_line_parse_suite(content + 6); + + else if (!strncmp(content, "=== RUN", 7)) + { + edi_testpanel_show(); + _edi_test_count++; + } + else if (!strncmp(content, "--- PASS:", 9)) + { + _edi_test_pass++; + + elm_code_file_line_append(_edi_test_code->file, content + 10, strlen(content) - 10, _EDI_SUITE_PASSED); + } + else if (!strncmp(content, "--- FAIL:", 9)) + { + _edi_test_fail++; + + elm_code_file_line_append(_edi_test_code->file, content + 10, strlen(content) - 10, _EDI_SUITE_FAILED); } } @@ -353,6 +381,7 @@ void edi_consolepanel_add(Evas_Object *parent) ecore_event_handler_add(ECORE_EXE_EVENT_DATA, _exe_data, NULL); ecore_event_handler_add(ECORE_EXE_EVENT_ERROR, _exe_error, NULL); + ecore_event_handler_add(ECORE_EXE_EVENT_DEL, _exe_done, NULL); ecore_event_handler_add(EDI_EVENT_CONFIG_CHANGED, _edi_consolepanel_config_changed, NULL); } From a463f1541125aa1e6a81d267adaa3ded49533164 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 3 Mar 2018 11:35:54 +0000 Subject: [PATCH 08/25] Rely on fixes in latest EFL release --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f423cf2..f07034f 100644 --- a/meson.build +++ b/meson.build @@ -22,7 +22,7 @@ config_h.set_quoted('PACKAGE_DOC_DIR', join_paths(get_option('prefix'), get_opti config_h.set_quoted('EFL_BETA_API_SUPPORT' , '1') -elm = dependency('elementary', version : '>=1.20.6') +elm = dependency('elementary', version : '>=1.20.7') top_inc = include_directories('.') cc = meson.get_compiler('c') From 1f1bff5103e4d2ddf7c48a3c4f995f53aeecfe35 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 3 Mar 2018 12:06:43 +0000 Subject: [PATCH 09/25] Fix possible crash on consolepanel --- src/bin/edi_logpanel.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/bin/edi_logpanel.c b/src/bin/edi_logpanel.c index 00d2b6f..19b8b76 100644 --- a/src/bin/edi_logpanel.c +++ b/src/bin/edi_logpanel.c @@ -17,13 +17,18 @@ static Evas_Object *_info_widget; static Elm_Code *_elm_code; static Eina_Bool -_edi_logpanel_ignore(Eina_Log_Level level, const char *fnc) +_edi_logpanel_ignore(Eina_Log_Level level, const char *domain, const char *fnc) { if (level <= EINA_LOG_LEVEL_DBG) - return !strncmp(fnc, "_eo_", 4) || !strncmp(fnc, "_evas_", 6) || + { + if (!strncmp(domain, "eo", 2)) + return EINA_TRUE; + if (!strncmp(fnc, "_eo_", 4) || !strncmp(fnc, "_evas_", 6) || !strncmp(fnc, "_ecore_", 7) || !strncmp(fnc, "_edje_", 6) || !strncmp(fnc, "_elm_", 5) || !strncmp(fnc, "_drm_", 5) || - !strncmp(fnc, "_eina_", 6); + !strncmp(fnc, "_eina_", 6)) + return EINA_TRUE; + } return !strncmp(fnc, "_evas_object_smart_need_recalculate_set", strlen(fnc)); } @@ -38,7 +43,7 @@ _edi_logpanel_print_cb(const Eina_Log_Domain *domain, Eina_Log_Level level, if (_edi_log_dom == -1) return; - if (_edi_logpanel_ignore(level, fnc)) + if (_edi_logpanel_ignore(level, domain->domain_str, fnc)) return; printed = snprintf(buffer, buffer_len, "%s:%s:%s (%d): ", From ca463c691e207e2a85934e2879e3db5e671e807d Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 3 Mar 2018 21:22:24 +0000 Subject: [PATCH 10/25] Default to tab indenting for go projects --- src/bin/edi_config.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/edi_config.c b/src/bin/edi_config.c index 8a0f5ae..3029bb4 100644 --- a/src/bin/edi_config.c +++ b/src/bin/edi_config.c @@ -473,6 +473,7 @@ void _edi_project_config_load() { Eina_Bool save = EINA_FALSE; + Edi_Build_Provider *provider; _edi_project_config = _edi_config_domain_load(_edi_project_config_dir_get(), EDI_PROJECT_CONFIG_NAME, _edi_proj_cfg_edd); if (_edi_project_config) @@ -526,7 +527,11 @@ _edi_project_config_load() IFPCFGEND; IFPCFG(0x0003); - _edi_project_config->gui.tab_inserts_spaces = EINA_TRUE; + provider = edi_build_provider_for_project_get(); + if (provider && !strcmp("go", provider->id)) + _edi_project_config->gui.tab_inserts_spaces = EINA_FALSE; + else + _edi_project_config->gui.tab_inserts_spaces = EINA_TRUE; IFPCFGEND; IFPCFG(0x0004); From ea02efa41662b9f2f114a67fb89ff2741700838f Mon Sep 17 00:00:00 2001 From: Al Poole Date: Tue, 20 Mar 2018 16:34:29 +0000 Subject: [PATCH 11/25] screens: add a dialogue with a button for close and settings panel. When there is user information missing or a change required in settings, display a dialogue with the information and an added button to open the "Settings" window. --- src/bin/edi_main.c | 6 ++-- src/bin/screens/edi_screens.c | 60 +++++++++++++++++++++++++++++++++++ src/bin/screens/edi_screens.h | 12 +++++++ 3 files changed, 75 insertions(+), 3 deletions(-) diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c index 99a5c4e..3010ac8 100644 --- a/src/bin/edi_main.c +++ b/src/bin/edi_main.c @@ -562,7 +562,7 @@ edi_launcher_config_missing() title = _("Unable to launch"); message = _("No launch binary found, please configure in Settings."); - edi_screens_message(_edi_main_win, title, message); + edi_screens_settings_message(_edi_main_win, title, message); } void @@ -573,7 +573,7 @@ edi_debug_exe_missing(void) title = _("Unable to launch debugger"); message = _("No debug binary found, please check system configuration and Settings."); - edi_screens_message(_edi_main_win, title, message); + edi_screens_settings_message(_edi_main_win, title, message); } static void @@ -585,7 +585,7 @@ _edi_project_credentials_missing() title = _("Missing user information"); message = _("No user information found, please configure in Settings."); - edi_screens_message(_edi_main_win, title, message); + edi_screens_settings_message(_edi_main_win, title, message); } static Eina_Bool diff --git a/src/bin/screens/edi_screens.c b/src/bin/screens/edi_screens.c index b825577..f10e383 100644 --- a/src/bin/screens/edi_screens.c +++ b/src/bin/screens/edi_screens.c @@ -125,6 +125,66 @@ void edi_screens_message(Evas_Object *parent, const char *title, const char *mes evas_object_show(popup); } +static void +_edi_screens_settings_display_cb(void *data, Evas_Object *obj, + void *event_info EINA_UNUSED) +{ + Evas_Object *parent = evas_object_data_get(obj, "parent"); + + evas_object_del((Evas_Object *) data); + + edi_settings_show(parent); +} + +void edi_screens_settings_message(Evas_Object *parent, const char *title, const char *message) +{ + Evas_Object *popup, *table, *box, *icon, *sep, *label, *button; + + popup = elm_popup_add(parent); + elm_object_part_text_set(popup, "title,text", title); + + table = elm_table_add(popup); + icon = elm_icon_add(table); + elm_icon_standard_set(icon, "dialog-information"); + evas_object_size_hint_min_set(icon, 48 * elm_config_scale_get(), 48 * elm_config_scale_get()); + evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(icon); + elm_table_pack(table, icon, 0, 0, 1, 1); + + label = elm_label_add(popup); + elm_object_text_set(label, message); + evas_object_show(label); + elm_table_pack(table, label, 1, 0, 1, 1); + evas_object_show(table); + + box = elm_box_add(popup); + sep = elm_separator_add(box); + elm_separator_horizontal_set(sep, EINA_TRUE); + evas_object_show(sep); + elm_box_pack_end(box, sep); + elm_box_pack_end(box, table); + sep = elm_separator_add(box); + elm_separator_horizontal_set(sep, EINA_TRUE); + evas_object_show(sep); + elm_box_pack_end(box, sep); + + elm_object_content_set(popup, box); + + button = elm_button_add(popup); + elm_object_text_set(button, _("OK")); + elm_object_part_content_set(popup, "button1", button); + evas_object_smart_callback_add(button, "clicked", _edi_screens_popup_cancel_cb, popup); + + button = elm_button_add(popup); + elm_object_text_set(button, _("Settings")); + elm_object_part_content_set(popup, "button2", button); + evas_object_data_set(button, "parent", parent); + evas_object_smart_callback_add(button, "clicked", _edi_screens_settings_display_cb, popup); + + evas_object_show(popup); +} + void edi_screens_desktop_notify(const char *title, const char *message) { Eina_Strbuf *command; diff --git a/src/bin/screens/edi_screens.h b/src/bin/screens/edi_screens.h index 9ffa571..2d022e7 100644 --- a/src/bin/screens/edi_screens.h +++ b/src/bin/screens/edi_screens.h @@ -83,6 +83,18 @@ void edi_screens_message_confirm(Evas_Object *parent, const char *message, void */ void edi_screens_message(Evas_Object *parent, const char *title, const char *message); + +/** + * Create an information dialogue with additional button to settings. + * + * @param parent The parent object to display the dialogue in. + * @param title The title for the popup. + * @param message The text to be displayed in the popup. + * + * @ingroup UI + */ +void edi_screens_settings_message(Evas_Object *parent, const char *title, const char *message); + /** * Send a desktop notification message to the window manager. * From d457bfe7546cdd4e59666b614c11d81da09e3128 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Wed, 21 Mar 2018 21:10:40 +0000 Subject: [PATCH 12/25] Oops, fix compile error from merge conflict --- src/bin/edi_consolepanel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/edi_consolepanel.c b/src/bin/edi_consolepanel.c index 4adf74e..98fb6ba 100644 --- a/src/bin/edi_consolepanel.c +++ b/src/bin/edi_consolepanel.c @@ -320,7 +320,7 @@ static void _edi_test_line_callback(const char *content) else if (!strncmp(content, "FAIL:", 5)) { _edi_test_line_parse_suite(content + 6); - + } else if (!strncmp(content, "=== RUN", 7)) { edi_testpanel_show(); From 0b46d1bcf97c43f8af21af9eb99aba4066173de3 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Wed, 21 Mar 2018 21:13:00 +0000 Subject: [PATCH 13/25] Fix EFL version required for release branch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65cb7bf..c799fbd 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ and in creating apps based on the EFL suite. meson ninja -EFL from git master (>= 1.20.99) +EFL latest release (>= 1.20.7) libclang-dev (or llvm-clang-devel) ## Installation From 13fb099e688121ec61ede4296782ed95e3b46331 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Wed, 21 Mar 2018 22:51:27 +0000 Subject: [PATCH 14/25] Fix escaping of names in git parameters Fixes issue #20 --- src/lib/edi_create.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/lib/edi_create.c b/src/lib/edi_create.c index ab09a93..52f8af5 100644 --- a/src/lib/edi_create.c +++ b/src/lib/edi_create.c @@ -194,6 +194,7 @@ _edi_create_filter_file_done(void *data, int type EINA_UNUSED, void *event EINA_ Edi_Create *create; Ecore_Event_Handler *handler; Eina_Strbuf *command; + char *escaped; create = (Edi_Create *)data; @@ -210,15 +211,23 @@ _edi_create_filter_file_done(void *data, int type EINA_UNUSED, void *event EINA_ command = eina_strbuf_new(); - eina_strbuf_append(command, "sh -c 'git init && git add ."); + eina_strbuf_append(command, "sh -c \"git init && git add ."); if (create->user && strlen(create->user)) - eina_strbuf_append_printf(command, " && git config user.name \"%s\"", create->user); + { + escaped = ecore_file_escape_name(create->user); + eina_strbuf_append_printf(command, " && git config user.name %s", escaped); + free(escaped); + } if (create->email && strlen(create->email)) - eina_strbuf_append_printf(command, " && git config user.email \"%s\"", create->email); + { + escaped = ecore_file_escape_name(create->email); + eina_strbuf_append_printf(command, " && git config user.email %s", escaped); + free(escaped); + } - eina_strbuf_append(command, " ' "); + eina_strbuf_append(command, " \" "); ecore_exe_run(eina_strbuf_string_get(command), data); From 983f0a64b80cd3aa39db61441268c5515114702e Mon Sep 17 00:00:00 2001 From: Al Poole Date: Thu, 22 Mar 2018 15:36:57 +0000 Subject: [PATCH 15/25] AUTHORS: update to use my real name. --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 59006b1..0153674 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,5 @@ ajwillia.ms (Andy Williams) -netstar (Al Poole) +netstar (Alastair Poole) okra (Stephen Houston) wilsonk (Kelly Wilson) YOhoho (YeongJong Lee) From 997d1928f8d0b55e97d3729348ac45576c8ceee2 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Sat, 14 Apr 2018 16:58:17 +0100 Subject: [PATCH 16/25] settings: Fix crash with non-SCM project. Settings would crash when launched from a project with no source code management. @fix --- src/bin/screens/edi_settings.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/bin/screens/edi_settings.c b/src/bin/screens/edi_settings.c index 9926409..7429aca 100644 --- a/src/bin/screens/edi_settings.c +++ b/src/bin/screens/edi_settings.c @@ -511,8 +511,19 @@ _edi_settings_project_create(Evas_Object *parent) Evas_Object *box, *frames, *frame, *table, *label, *entry_name, *entry_email; Evas_Object *entry_remote; Eina_Strbuf *text; + const char *remote_name, *remote_email; engine = edi_scm_engine_get(); + if (!engine) + { + remote_name = remote_email = ""; + } + else + { + remote_name = engine->remote_name_get(); + remote_email = engine->remote_email_get(); + } + frames = elm_box_add(parent); frame = _edi_settings_panel_create(frames, _("Project Settings")); elm_box_pack_end(frames, frame); @@ -533,7 +544,7 @@ _edi_settings_project_create(Evas_Object *parent) evas_object_show(label); entry_name = elm_entry_add(table); - elm_object_text_set(entry_name, _edi_project_config->user_fullname ?: engine->remote_name_get()); + elm_object_text_set(entry_name, _edi_project_config->user_fullname ?: remote_name); elm_entry_single_line_set(entry_name, EINA_TRUE); elm_entry_scrollable_set(entry_name, EINA_TRUE); evas_object_size_hint_weight_set(entry_name, 0.75, 0.0); @@ -551,7 +562,7 @@ _edi_settings_project_create(Evas_Object *parent) evas_object_show(label); entry_email = elm_entry_add(table); - elm_object_text_set(entry_email, _edi_project_config->user_email ?: engine->remote_email_get()); + elm_object_text_set(entry_email, _edi_project_config->user_email ?: remote_email); elm_entry_single_line_set(entry_email, EINA_TRUE); elm_entry_scrollable_set(entry_email, EINA_TRUE); evas_object_size_hint_weight_set(entry_email, 0.75, 0.0); From 100a3ecfc0702c8ca38254524bebbc76572b75c4 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Fri, 11 May 2018 13:12:59 +0100 Subject: [PATCH 17/25] Remove duplicate line --- src/bin/editor/edi_editor.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c index 31e56d8..526d52b 100644 --- a/src/bin/editor/edi_editor.c +++ b/src/bin/editor/edi_editor.c @@ -639,8 +639,6 @@ _suggest_hint_popup_add(Edi_Editor *editor, const char *content, Evas_Smart_Cb f unsigned int row, col; Evas_Coord cx, cy, cw, ch; - elm_code_widget_cursor_position_get(editor->entry, &row, &col); - elm_code_widget_cursor_position_get(editor->entry, &row, &col); elm_code_widget_geometry_for_position_get(editor->entry, row, col, &cx, &cy, &cw, &ch); From f9d5289ce6a668265647133afeb2baf900465606 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Fri, 11 May 2018 13:13:35 +0100 Subject: [PATCH 18/25] Display the text position rather than the visual column in info This fixes a bug where compile warnings for lines with tabs do not match. --- src/bin/editor/edi_editor.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c index 526d52b..744e1dd 100644 --- a/src/bin/editor/edi_editor.c +++ b/src/bin/editor/edi_editor.c @@ -856,15 +856,21 @@ _smart_cb_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, static void _edit_cursor_moved(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { + Elm_Code *code; + Elm_Code_Line *line; Elm_Code_Widget *widget; char buf[30]; - unsigned int line; + unsigned int row; unsigned int col; widget = (Elm_Code_Widget *)obj; - elm_code_widget_cursor_position_get(widget, &line, &col); + elm_code_widget_cursor_position_get(widget, &row, &col); - snprintf(buf, sizeof(buf), _("Line:%d, Column:%d"), line, col); + code = elm_code_widget_code_get(widget); + line = elm_code_file_line_get(code->file, row); + + snprintf(buf, sizeof(buf), _("Line:%d, Position:%d"), row, + elm_code_widget_line_text_position_for_column_get(widget, line, col) + 1); elm_object_text_set((Evas_Object *)data, buf); } From a98145046a5322ddb5982676ad136956d1f6a856 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 15 May 2018 15:00:16 +0100 Subject: [PATCH 19/25] Rolling back release numbers for 0.6.1 next --- NEWS | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 2b75cef..54ddedc 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ -======= -Edi 0.7 -======= +--------- +Edi 0.6.1 +--------- Features: @@ -13,6 +13,10 @@ Features: * Added edi_scm helper command. * Replace all in project. +Bug fixes: + + * overall stability of the SCM git integration + ======= Edi 0.6 ======= From ea6b0ab193ac94d24dd0723e8e2cebbeece1b526 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Sun, 13 May 2018 12:50:21 +0100 Subject: [PATCH 20/25] scm: init. Fix a crash on new project initializing SCM. The code was checking for an engine which doesn't exist and thus crashing. This fixes that. @fix --- src/bin/edi_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c index 3010ac8..4733485 100644 --- a/src/bin/edi_main.c +++ b/src/bin/edi_main.c @@ -594,12 +594,13 @@ _edi_project_credentials_check(void) Edi_Scm_Engine *eng; eng = edi_scm_engine_get(); + if ((!_edi_project_config->user_fullname || strlen(_edi_project_config->user_fullname) == 0) && - !eng->remote_name_get()) + eng && !eng->remote_name_get()) return EINA_FALSE; if ((!_edi_project_config->user_email || strlen(_edi_project_config->user_email) == 0) && - !eng->remote_email_get()) + eng && !eng->remote_email_get()) return EINA_FALSE; return EINA_TRUE; From d2d9f7bd05ad1e5e8b9a0a3f1097c64a9781ee61 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Mon, 14 May 2018 00:25:34 +0100 Subject: [PATCH 21/25] credits_check/scm_ui: Fix bugs that crash. I can't believe these are in here! Apologies! :) --- src/bin/edi_main.c | 8 ++++---- src/bin/edi_scm_ui.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c index 4733485..a54357c 100644 --- a/src/bin/edi_main.c +++ b/src/bin/edi_main.c @@ -595,12 +595,12 @@ _edi_project_credentials_check(void) eng = edi_scm_engine_get(); - if ((!_edi_project_config->user_fullname || strlen(_edi_project_config->user_fullname) == 0) && - eng && !eng->remote_name_get()) + if ((!_edi_project_config->user_fullname || !_edi_project_config->user_fullname[0]) && + (!eng || !eng->remote_name_get())) return EINA_FALSE; - if ((!_edi_project_config->user_email || strlen(_edi_project_config->user_email) == 0) && - eng && !eng->remote_email_get()) + if ((!_edi_project_config->user_email || !_edi_project_config->user_email[0]) && + (!eng || !eng->remote_email_get())) return EINA_FALSE; return EINA_TRUE; diff --git a/src/bin/edi_scm_ui.c b/src/bin/edi_scm_ui.c index 5cf723d..947d876 100644 --- a/src/bin/edi_scm_ui.c +++ b/src/bin/edi_scm_ui.c @@ -651,7 +651,7 @@ edi_scm_ui_add(Evas_Object *parent) remote_name = engine->remote_name_get(); remote_email = engine->remote_email_get(); - if (remote_name[0] && remote_email[0]) + if (remote_name && remote_name[0] && remote_email && remote_email[0]) avatar = elm_photo_add(parent); else avatar = elm_icon_add(parent); @@ -678,7 +678,7 @@ edi_scm_ui_add(Evas_Object *parent) string = eina_strbuf_new(); - if (!remote_name[0] && !remote_email[0]) + if ((!remote_name || !remote_name[0]) && (!remote_email || !remote_email[0])) { eina_strbuf_append(string, _("Unable to obtain user information.")); elm_icon_standard_set(avatar, DEFAULT_USER_ICON); From 6be9ee49c6d2c5779d9d1db121bdc766b2900ad5 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Mon, 14 May 2018 00:37:16 +0100 Subject: [PATCH 22/25] scm_git: Allow us to unstage even if there is no remote url. This allows us to use edi_scm fully even if the repo has no remote url. Otherwise business as usual. --- src/lib/edi_scm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/edi_scm.c b/src/lib/edi_scm.c index 8ec5d2b..dfb40b3 100644 --- a/src/lib/edi_scm.c +++ b/src/lib/edi_scm.c @@ -106,7 +106,16 @@ _edi_scm_git_file_unstage(const char *path) int code; Eina_Strbuf *command = eina_strbuf_new(); - eina_strbuf_append_printf(command, "git reset HEAD %s", path); + eina_strbuf_append_printf(command, "git remote get-url origin"); + + code = _edi_scm_exec(eina_strbuf_string_get(command)); + + eina_strbuf_reset(command); + + if (code == 0) + eina_strbuf_append_printf(command, "git reset HEAD %s", path); + else + eina_strbuf_append_printf(command, "git rm --cached %s", path); code = _edi_scm_exec(eina_strbuf_string_get(command)); From 5c7a29b521a23ee2beb8002bdeb6b29aa875d77b Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Mon, 14 May 2018 10:26:20 +0100 Subject: [PATCH 23/25] logpanel: fix crash when appending lots of lines. Surround elm_code_file_line_append() with ecore_main_loop_begin/end. Fixes a crash when there are lots of errors to report. @fix --- src/bin/edi_logpanel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/edi_logpanel.c b/src/bin/edi_logpanel.c index 19b8b76..966b6d8 100644 --- a/src/bin/edi_logpanel.c +++ b/src/bin/edi_logpanel.c @@ -50,8 +50,11 @@ _edi_logpanel_print_cb(const Eina_Log_Domain *domain, Eina_Log_Level level, domain->domain_str, file, fnc, line); vsnprintf(buffer + printed, buffer_len - printed, fmt, args); + ecore_thread_main_loop_begin(); + elm_code_file_line_append(_elm_code->file, buffer, strlen(buffer), (level <= EINA_LOG_LEVEL_ERR) ? _EDI_LOG_ERROR : NULL); + ecore_thread_main_loop_end(); } static void From 210d369cf8360bf03434dc9cf3be89074efc416e Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 15 May 2018 15:39:26 +0100 Subject: [PATCH 24/25] Attempting a meson build fix --- data/extra/templates/meson.build | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/data/extra/templates/meson.build b/data/extra/templates/meson.build index 421cd76..54dddae 100644 --- a/data/extra/templates/meson.build +++ b/data/extra/templates/meson.build @@ -6,11 +6,13 @@ skeleton_names = ['eflproject', 'eflproject_python'] foreach skeleton_name : skeleton_names custom_target('skeleton ' + skeleton_name, - command : [tar, 'zcf', '@OUTPUT@', '-C', '../data/extra/templates/skeletons', skeleton_name], - input : 'skeletons' + '/' + skeleton_name, - output : skeleton_name + '.tar.gz', - install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'edi', 'templates'), - install : true, + command : [tar, 'zcf', '@OUTPUT@', '-C', + join_paths(meson.source_root(), 'data', 'extra', 'templates', 'skeletons'), + skeleton_name], + input : join_paths('skeletons', skeleton_name), + output : skeleton_name + '.tar.gz', + install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'edi', 'templates'), + install : true, ) endforeach From 279c7e66e74d89b8e7dc58b5f5ef8f012b94ac2c Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 15 May 2018 15:39:36 +0100 Subject: [PATCH 25/25] Version down for release --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f07034f..2835476 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project( 'edi', 'c', - version : '0.7.0', + version : '0.6.1', default_options: [ 'c_std=gnu99', 'warning_level=2' ], meson_version : '>= 0.39.0')