billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=33418ffd4187212bd57589ab173a850c025b958b

commit 33418ffd4187212bd57589ab173a850c025b958b
Author: Boris Faure <bill...@gmail.com>
Date:   Sun Apr 17 10:27:31 2022 +0200

    config: remove shine parameter
---
 src/bin/config.c             |  9 +++------
 src/bin/config.h             |  2 +-
 src/bin/options_background.c | 48 --------------------------------------------
 src/bin/options_themepv.c    |  2 --
 src/bin/win.c                | 32 -----------------------------
 src/bin/win.h                |  4 ----
 6 files changed, 4 insertions(+), 93 deletions(-)

diff --git a/src/bin/config.c b/src/bin/config.c
index 5f3813b..2f3fb42 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -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)
diff --git a/src/bin/config.h b/src/bin/config.h
index 866b4d1..e8a2c32 100644
--- a/src/bin/config.h
+++ b/src/bin/config.h
@@ -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;
diff --git a/src/bin/options_background.c b/src/bin/options_background.c
index 3b1ceea..78b2bc5 100644
--- a/src/bin/options_background.c
+++ b/src/bin/options_background.c
@@ -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);
diff --git a/src/bin/options_themepv.c b/src/bin/options_themepv.c
index 4475b45..a48857c 100644
--- a/src/bin/options_themepv.c
+++ b/src/bin/options_themepv.c
@@ -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");
diff --git a/src/bin/win.c b/src/bin/win.c
index bd8c64e..7183462 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -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);
diff --git a/src/bin/win.h b/src/bin/win.h
index 2612c06..bac9598 100644
--- a/src/bin/win.h
+++ b/src/bin/win.h
@@ -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

-- 


Reply via email to