options_theme: ensure the selected theme is the right one

was not the case when explicitly setting them from command line
terminology-1.9
Boris Faure 2 years ago
parent 2669cc5780
commit a416458ca9
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
  1. 14
      src/bin/options_theme.c

@ -143,6 +143,7 @@ options_theme(Evas_Object *opbox, Evas_Object *term)
Config *config = termio_config_get(term);
Eina_Bool to_skip = EINA_FALSE;
double scale = elm_config_scale_get();
const char *config_theme_name = "";
Theme_Ctx *ctx;
ctx = calloc(1, sizeof(*ctx));
@ -151,6 +152,15 @@ options_theme(Evas_Object *opbox, Evas_Object *term)
ctx->config = config;
ctx->term = term;
if (config && config->theme)
{
config_theme_name = strrchr(config->theme, '/');
if (config_theme_name)
config_theme_name++;
else
config_theme_name = config->theme;
}
fr = o = elm_frame_add(opbox);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -236,9 +246,7 @@ options_theme(Evas_Object *opbox, Evas_Object *term)
_cb_op_theme_sel, t);
if (t->item)
{
ctx->themes = eina_list_append(ctx->themes, t);
if ((config) && (config->theme) &&
(!strcmp(config->theme, t->name)))
if (!strcmp(config_theme_name, t->name))
{
if (ctx->seltimer)
ecore_timer_del(ctx->seltimer);

Loading…
Cancel
Save