billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=070fa1defb683aa664740389725a1f0bb0a19058
commit 070fa1defb683aa664740389725a1f0bb0a19058 Author: Boris Faure <[email protected]> Date: Sun Nov 29 15:52:58 2020 +0100 options: add note on colorschemes about current theme and vice-versa --- src/bin/options_colors.c | 34 ++++++++++++++++++++++++++++++++++ src/bin/options_theme.c | 13 +++++++++++++ 2 files changed, 47 insertions(+) diff --git a/src/bin/options_colors.c b/src/bin/options_colors.c index e6f6223..5cb757c 100644 --- a/src/bin/options_colors.c +++ b/src/bin/options_colors.c @@ -237,6 +237,40 @@ options_colors(Evas_Object *opbox, Evas_Object *term) elm_object_content_set(fr, o); evas_object_show(o); + if (config && config->theme) + { + char theme[4096]; + const char *start = strrchr(config->theme, '/'); + const char *end; + size_t len; + + if (start) + start++; + else + start = config->theme; + + end = strrchr(start, '.'); + if (!end) + end = start + strlen(start) - 1; + len = end - start; + if (len < sizeof(theme)) + { + char buf[4096]; + + strncpy(theme, start, len); + theme[len] = '\0'; + o = elm_label_add(opbox); + evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0); + evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); + snprintf(buf, sizeof(buf), _("Using theme <hilight>%s</hilight>"), + theme); + elm_object_text_set(o, buf); + elm_box_pack_end(box, o); + evas_object_show(o); + } + } + + it_class = elm_gengrid_item_class_new(); it_class->item_style = "thumb"; it_class->func.text_get = _cb_op_cs_name_get; diff --git a/src/bin/options_theme.c b/src/bin/options_theme.c index 6741264..7e84941 100644 --- a/src/bin/options_theme.c +++ b/src/bin/options_theme.c @@ -1,6 +1,7 @@ #include "private.h" #include <Elementary.h> +#include <Elementary_Cursor.h> #include <Efreet.h> #include <assert.h> #include "config.h" @@ -178,6 +179,18 @@ options_theme(Evas_Object *opbox, Evas_Object *term) elm_object_content_set(fr, o); evas_object_show(o); + if (config && config->color_scheme) + { + o = elm_label_add(opbox); + evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0); + evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); + snprintf(buf, sizeof(buf), _("Using colorscheme <hilight>%s</hilight>"), + config->color_scheme->md.name); + elm_object_text_set(o, buf); + elm_box_pack_end(box, o); + evas_object_show(o); + } + it_class = elm_gengrid_item_class_new(); it_class->item_style = "thumb"; it_class->func.text_get = _cb_op_theme_text_get; --
