config: remove shine parameter

pull/4/head
Boris Faure 4 months ago
parent 40bd9a0161
commit 33418ffd41
Signed by: borisfaure
GPG Key ID: EAA9CD729F522998
  1. 9
      src/bin/config.c
  2. 2
      src/bin/config.h
  3. 48
      src/bin/options_background.c
  4. 2
      src/bin/options_themepv.c
  5. 32
      src/bin/win.c
  6. 4
      src/bin/win.h

@ -193,8 +193,8 @@ config_init(void)
(edd_base, Config, "changedir_to_current", changedir_to_current, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "emoji_dbl_width", emoji_dbl_width, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "shine", shine, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC /* DEPRECATED, NO LONGER USED */
(edd_base, Config, "shine", _shine, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC
(edd_base, Config, "hide_cursor", hide_cursor, EET_T_DOUBLE);
EET_DATA_DESCRIPTOR_ADD_BASIC
@ -322,7 +322,6 @@ config_sync(const Config *config_src, Config *config)
config->ty_escapes = config_src->ty_escapes;
config->changedir_to_current = config_src->changedir_to_current;
config->emoji_dbl_width = config_src->emoji_dbl_width;
config->shine = config_src->shine;
config->translucent = config_src->translucent;
config->opacity = config_src->opacity;
config->group_all = config_src->group_all;
@ -602,7 +601,6 @@ config_new(void)
}
}
_add_default_keys(config);
config->shine = 255;
config->hide_cursor = 5.0;
config->group_all = EINA_FALSE;
config_compute_color_scheme(config);
@ -708,7 +706,7 @@ config_load(void)
EINA_FALLTHROUGH;
/*pass through*/
case 16:
config->shine = 255;
config->_shine = 255;
EINA_FALLTHROUGH;
/*pass through*/
case 17:
@ -884,7 +882,6 @@ config_fork(const Config *config)
CPY(ty_escapes);
CPY(changedir_to_current);
CPY(emoji_dbl_width);
CPY(shine);
CPY(group_all);
EINA_LIST_FOREACH(config->keys, l, key)

@ -66,7 +66,7 @@ struct tag_Config
double hide_cursor;
int _vidmod; /* DEPRECATED */
int opacity;
int shine;
int _shine; /* DEPRECATED */
int cg_width;
int cg_height;
Eina_Bool jump_on_keypress;

@ -22,7 +22,6 @@ typedef struct tag_Background_Ctx {
Evas_Object *bubble;
Evas_Object *op_trans;
Evas_Object *op_opacity;
Evas_Object *op_shine_slider;
Eina_Stringshare *system_path;
Eina_Stringshare *user_path;
@ -43,29 +42,6 @@ typedef struct tag_Insert_Gen_Grid_Item_Notify
Background_Item *item;
} Insert_Gen_Grid_Item_Notify;
static void
_cb_op_shine_sel(void *data,
Evas_Object *obj,
void *_event EINA_UNUSED)
{
Background_Ctx *ctx = data;
Config *config = ctx->config;
Term *term = termio_term_get(ctx->term);
Win *wn = term_win_get(term);
int shine = elm_slider_value_get(obj);
Eina_List *l, *wn_list;
if (config->shine == shine)
return;
wn_list = win_terms_get(wn);
EINA_LIST_FOREACH(wn_list, l, term)
{
term_apply_shine(term, shine);
}
}
static void
_cb_op_video_trans_chg(void *data,
Evas_Object *obj,
@ -575,30 +551,6 @@ options_background(Evas_Object *opbox, Evas_Object *term)
elm_object_content_set(ctx->frame, bx);
evas_object_show(o);
o = elm_label_add(opbox);
evas_object_size_hint_weight_set(o, 0.0, 0.0);
evas_object_size_hint_align_set(o, 0.0, 0.5);
elm_object_text_set(o, _("Shine:"));
elm_box_pack_end(bx, o);
evas_object_show(o);
ctx->op_shine_slider = o = elm_slider_add(opbox);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
elm_slider_span_size_set(o, 40);
elm_slider_unit_format_set(o, "%1.0f");
elm_slider_indicator_format_set(o, "%1.0f");
elm_slider_min_max_set(o, 0, 255);
elm_slider_step_set(o, 1);
elm_slider_value_set(o, config->shine);
elm_box_pack_end(bx, o);
evas_object_show(o);
evas_object_smart_callback_add(o, "delay,changed",
_cb_op_shine_sel, ctx);
ctx->op_trans = o = elm_check_add(opbox);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);

@ -256,8 +256,6 @@ options_theme_preview_add(Evas_Object *parent,
else
elm_layout_signal_emit(o, "translucent,off", "terminology");
background_set_shine(config, elm_layout_edje_get(o));
elm_layout_signal_emit(o, "focus,in", "terminology");
elm_layout_signal_emit(o, "tabcount,on", "terminology");
elm_layout_signal_emit(o, "tabmissed,on", "terminology");

@ -4449,7 +4449,6 @@ _cb_tab_selector_show(Tabs *tabs, Tab_Item *to_item)
else
msg.val = 100;
edje_object_message_send(tabs->selector_bg, EDJE_MESSAGE_INT, 1, &msg);
background_set_shine(wn->config, tabs->selector_bg);
edje_object_signal_emit(tabs->selector_bg, "begin", "terminology");
tabs->selector = sel_add(wn->win);
@ -5881,34 +5880,6 @@ term_is_visible(const Term *term)
return tc->is_visible(tc, tc);
}
void
background_set_shine(const Config *config, Evas_Object *bg_edj)
{
Edje_Message_Int msg;
if (config)
msg.val = config->shine;
else
msg.val = 255;
if (bg_edj)
edje_object_message_send(bg_edj, EDJE_MESSAGE_INT, 2, &msg);
}
void
term_apply_shine(Term *term, int shine)
{
Config *config = term->config;
if (config->shine != shine)
{
config->shine = shine;
background_set_shine(config, term->bg_edj);
config_save(config);
}
}
static void
_term_config_set(Term *term, Config *config)
{
@ -7155,7 +7126,6 @@ static void
_term_bg_config(Term *term)
{
_term_trans(term);
background_set_shine(term->config, term->bg_edj);
termio_theme_set(term->termio, term->bg_edj);
elm_layout_signal_callback_add(term->bg, "popmedia,done", "terminology",
@ -7450,8 +7420,6 @@ term_new(Win *wn, Config *config, const char *cmd,
_term_trans(term);
background_set_shine(term->config, term->bg_edj);
term->termio = o = termio_add(wn->win, config, cmd, login_shell, cd,
size_w, size_h, term, title);
evas_object_data_set(o, "term", term);

@ -88,10 +88,6 @@ typedef Eina_Bool (*For_Each_Term)(Term *term, void *data);
Eina_Bool
for_each_term_do(Win *wn, For_Each_Term cb, void *data);
void
term_apply_shine(Term *term, int shine);
void background_set_shine(const Config *config, Evas_Object *bg);
void main_trans_update(void);
#endif

Loading…
Cancel
Save