billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=424ddba2c8a29aa959c440b692715dbf33c9ff52

commit 424ddba2c8a29aa959c440b692715dbf33c9ff52
Author: Boris Faure <[email protected]>
Date:   Sun Oct 6 23:36:28 2019 +0200

    splits: show missed bells when a title tab is shown
---
 data/themes/default.edc | 21 +++++++++++++++++++++
 src/bin/win.c           | 15 ++++++++++++++-
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/data/themes/default.edc b/data/themes/default.edc
index ec3d475..c98e91d 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -7,6 +7,12 @@ color_classes {
 #include "default_colors.in.edc"
 }
 #endif
+#ifndef BG_COLOR_BELL_NO_ALPHA
+#define BG_COLOR_BELL_NO_ALPHA BG_COLOR_NO_ALPHA
+#endif
+#ifndef FG_COLOR_BELL_NO_ALPHA
+#define FG_COLOR_BELL_NO_ALPHA  255 153  51
+#endif
 
 efl_version: 1 20;
 
@@ -1414,6 +1420,21 @@ collections {
                inherit: "default" 0.0;
                visible: 1;
             }
+            description { state: "bell" 0.0;
+               inherit: "tab" 0.0;
+               color: FG_COLOR_BELL_NO_ALPHA 255;
+               color3: BG_COLOR_BELL_NO_ALPHA 18;
+            }
+         }
+         program { name: "tab,bell,on";
+            signal: "tab,bell,on"; source: "terminology";
+            action: STATE_SET "bell" 0.0;
+            target: "tabtitle";
+         }
+         program { name: "tab,bell,off";
+            signal: "tab,bell,off"; source: "terminology";
+            action: STATE_SET "tab" 0.0;
+            target: "tabtitle";
          }
          part { name: "tablimit0"; type: SPACER;
             description { state: "default" 0.0;
diff --git a/src/bin/win.c b/src/bin/win.c
index be771e8..e7e3958 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -536,7 +536,8 @@ _solo_bell(Term_Container *tc,
    solo = (Solo*) tc;
    term = solo->term;
 
-   term->missed_bell = EINA_TRUE;
+   if (!tc->is_focused)
+     term->missed_bell = EINA_TRUE;
 
    if (!tc->wn->config->disable_visual_bell)
      {
@@ -548,6 +549,12 @@ _solo_bell(Term_Container *tc,
              elm_layout_signal_emit(term->base, "bell,ring", "terminology");
           }
      }
+   if ((term->missed_bell) && (term->config->show_tabs)
+       && (tc->parent->type == TERM_CONTAINER_TYPE_SPLIT))
+     {
+        edje_object_signal_emit(term->bg, "tab,bell,on", "terminology");
+     }
+   edje_object_message_signal_process(term->bg);
    tc->parent->bell(tc->parent, tc);
 }
 
@@ -599,6 +606,11 @@ _solo_focus(Term_Container *tc, Term_Container *relative)
      return;
 
    term->missed_bell = EINA_FALSE;
+   if ((term->config->show_tabs)
+       && (tc->parent->type == TERM_CONTAINER_TYPE_SPLIT))
+     {
+        edje_object_signal_emit(term->bg, "tab,bell,off", "terminology");
+     }
 
    if (tc->parent != relative)
      {
@@ -626,6 +638,7 @@ _solo_focus(Term_Container *tc, Term_Container *relative)
 
    if (term->missed_bell)
      term->missed_bell = EINA_FALSE;
+   edje_object_message_signal_process(term->bg);
 }
 
 static Eina_Bool

-- 


Reply via email to