billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=826801b60732f398a84ee707120b051a30acfbb5

commit 826801b60732f398a84ee707120b051a30acfbb5
Author: Boris Faure <[email protected]>
Date:   Mon Apr 13 20:27:35 2020 +0200

    group input: show it on active tabs
---
 ChangeLog.theme                       |   2 +
 THEME.md                              |   2 +
 data/themes/default/background.edc    |  71 ++++++++++++++++++++++++++++---
 data/themes/images/tab_grouped_16.png | Bin 0 -> 409 bytes
 data/themes/images/tab_grouped_32.png | Bin 0 -> 733 bytes
 data/themes/images/tab_grouped_8.png  | Bin 0 -> 230 bytes
 data/themes/mild.edc                  |  77 ++++++++++++++++++++++++++++++----
 src/bin/options_behavior.c            |   2 +-
 src/bin/win.c                         |   4 ++
 9 files changed, 144 insertions(+), 14 deletions(-)

diff --git a/ChangeLog.theme b/ChangeLog.theme
index 4a9816f..dbf84b8 100644
--- a/ChangeLog.theme
+++ b/ChangeLog.theme
@@ -27,6 +27,8 @@ Changes since 1.6.0:
   * In group "terminology/background", signals "drag_over_tabs,on",
   "drag_over_tabs,off" are received when the mouse, while dragging a tab,
   enters the tab region.
+  * In group "terminology/background", signals "grouped,on",
+  "grouped,off" are received when input is broadcast to multiple terms.
 
 Changes since 1.5.0:
 --------------------
diff --git a/THEME.md b/THEME.md
index 978b297..cd02440 100644
--- a/THEME.md
+++ b/THEME.md
@@ -77,6 +77,8 @@ dragging a tab.
 When to stop an animation started by the related `*,on` signals.
 ### `drag_over_tabs,on` and `drag_over_tabs,off`
 When the mouse, while dragging a tab, enters or leaves the tab region.
+### `grouped,on` and `grouped,off`
+When input is broadcast to multiple terminals.
 
 ### TODO
 
diff --git a/data/themes/default/background.edc 
b/data/themes/default/background.edc
index 13f8fa0..0331268 100644
--- a/data/themes/default/background.edc
+++ b/data/themes/default/background.edc
@@ -48,6 +48,11 @@ group { name: "terminology/background";
       image { image: "tab_close_8.png" COMP; size: 0 0 8 8; }
       image { image: "tab_close_16.png" COMP; size: 8 8 99999 99999; }
    }
+   set { name: "tab_grouped";
+      image { image: "tab_grouped_8.png" COMP; size: 0 0 8 8; }
+      image { image: "tab_grouped_16.png" COMP; size: 8 8 16 16; }
+      image { image: "tab_grouped_32.png" COMP; size: 16 16 99999 99999; }
+   }
    sounds {
       sample { name: "bell" LOSSY 64;
          source: "bell.wav";
@@ -1483,6 +1488,56 @@ group { name: "terminology/background";
          }
       }
 
+      part { name: "tabgrouped"; type: IMAGE;
+         scale: 1;
+         description { state: "default" 0.0;
+            aspect: 1.0 1.0; aspect_preference: BOTH;
+            align: 0.0 0.5;
+            min: 0 0;
+            max: 0 0;
+            fixed: 1 1;
+            rel1 {
+               to_x: "tab_bevel_top2";
+               to_y: "tabmiddle";
+               relative: 0.0 0.3;
+            }
+            rel2 {
+               to_x: "tab_bevel_top2";
+               to_y: "tabmiddle";
+               relative: 1.0 0.7;
+            }
+            visible: 0;
+         }
+         description { state: "grouped" 0.0;
+            inherit: "default" 0.0;
+            min: 8 8;
+            max: 32 32;
+            image.normal: "tab_grouped";
+            rel1 {
+               to_y: "tabmiddle";
+               to_x: "tab_bevel_top2";
+               relative: 0.0 0.3;
+            }
+            rel2 {
+               to_y: "tabmiddle";
+               to_x: "tab_bevel_top2";
+               relative: 1.0 0.7;
+            }
+            color: FG_COLOR;
+            visible: 1;
+         }
+      }
+      program {
+         signal: "grouped,on"; source: "terminology";
+         action: STATE_SET "grouped" 0.0;
+         target: "tabgrouped";
+      }
+      program {
+         signal: "grouped,off"; source: "terminology";
+         action: STATE_SET "default" 0.0;
+         target: "tabgrouped";
+      }
+
       part { name: "terminology.tab.title"; type: TEXT; mouse_events: 0;
          scale: 1;
          effect: SOFT_SHADOW BOTTOM;
@@ -1519,11 +1574,17 @@ group { name: "terminology/background";
                text_source: "terminology.tab.title";
             }
             align: 0.5 0.5;
-            rel1.to_x: "tab_bevel_top2";
-            rel1.to_y: "tabmiddle";
-            rel2.to_x: "tabclose";
-            rel2.to_y: "tabmiddle";
-            rel2.relative: 0.5 1.0;
+            rel1 {
+               to_x: "tabgrouped";
+               to_y: "tabmiddle";
+               relative: 1.0 0.0;
+               offset: 2 0;
+            }
+            rel2 {
+               to_x: "tabclose";
+               to_y: "tabmiddle";
+               relative: 0.0 1.0;
+            }
             visible: 0;
             fixed: 1 1;
          }
diff --git a/data/themes/images/tab_grouped_16.png 
b/data/themes/images/tab_grouped_16.png
new file mode 100644
index 0000000..0d1518d
Binary files /dev/null and b/data/themes/images/tab_grouped_16.png differ
diff --git a/data/themes/images/tab_grouped_32.png 
b/data/themes/images/tab_grouped_32.png
new file mode 100644
index 0000000..1d3a2fa
Binary files /dev/null and b/data/themes/images/tab_grouped_32.png differ
diff --git a/data/themes/images/tab_grouped_8.png 
b/data/themes/images/tab_grouped_8.png
new file mode 100644
index 0000000..df28251
Binary files /dev/null and b/data/themes/images/tab_grouped_8.png differ
diff --git a/data/themes/mild.edc b/data/themes/mild.edc
index ab5c869..0cc232c 100644
--- a/data/themes/mild.edc
+++ b/data/themes/mild.edc
@@ -62,6 +62,11 @@ collections {
          image { image: "tab_close_8.png" COMP; size: 0 0 8 8; }
          image { image: "tab_close_16.png" COMP; size: 8 8 99999 99999; }
       }
+      set { name: "tab_grouped";
+         image { image: "tab_grouped_8.png" COMP; size: 0 0 8 8; }
+         image { image: "tab_grouped_16.png" COMP; size: 8 8 16 16; }
+         image { image: "tab_grouped_32.png" COMP; size: 16 16 99999 99999; }
+      }
       sounds {
          sample { name: "bell" LOSSY 64;
             source: "bell.wav";
@@ -1056,21 +1061,70 @@ collections {
             }
          }
 
+         part { name: "tabgrouped"; type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               aspect: 1.0 1.0; aspect_preference: BOTH;
+               align: 0.0 0.5;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+               rel1 {
+                  to_x: "tab_bevel_bg2";
+                  to_y: "tabmiddle";
+                  offset: 0 2;
+                  relative: 0.0 0.3;
+               }
+               rel2 {
+                  to_x: "tab_bevel_bg2";
+                  to_y: "tabmiddle";
+                  relative: 1.0 0.7;
+               }
+               visible: 0;
+            }
+            description { state: "grouped" 0.0;
+               inherit: "default" 0.0;
+               min: 8 8;
+               max: 32 32;
+               image.normal: "tab_grouped";
+               rel1 {
+                  to_y: "tabmiddle";
+                  to_x: "tab_bevel_bg2";
+                  relative: 0.0 0.3;
+               }
+               rel2 {
+                  to_y: "tabmiddle";
+                  to_x: "tab_bevel_bg2";
+                  relative: 1.0 0.7;
+               }
+               color: FG_COLOR;
+               visible: 1;
+            }
+         }
+         program {
+            signal: "grouped,on"; source: "terminology";
+            action: STATE_SET "grouped" 0.0;
+            target: "tabgrouped";
+         }
+         program {
+            signal: "grouped,off"; source: "terminology";
+            action: STATE_SET "default" 0.0;
+            target: "tabgrouped";
+         }
+
          part { name: "terminology.tab.title"; type: TEXT; mouse_events: 0;
             scale: 1;
-            effect: SOFT_SHADOW BOTTOM;
             mouse_events: 0;
             description { state: "default" 0.0;
-               color: 255 255 255 255;
-               color3: 0 0 0 18;
                text { font: "Sans:style=Bold"; size: 10;
                   align: 0.5 0.0;
                   min: 0 1;
                }
                align: 0.5 0.0;
-               rel1.to_x: "tab_bevel_bg2";
-               rel1.offset: 0 2;
-               rel2.to_x: "tab_bevel_bg2";
+               rel1.to_x: "tabgrouped";
+               rel1.offset: 2 2;
+               rel1.relative: 1.0 0.0;
+               rel2.to_x: "tabgrouped";
                rel2.offset: -1 2;
                rel2.relative: 1.0 0.0;
                visible: 0;
@@ -1088,10 +1142,12 @@ collections {
                   text_source: "terminology.tab.title";
                }
                align: 0.5 0.5;
-               rel1.to_x: "tab_bevel_bg2";
+               rel1.to_x: "tabgrouped";
                rel1.to_y: "tabmiddle";
-               rel2.to_x: "tab_bevel_bg2";
+               rel1.relative: 1.0 0.0;
+               rel2.to_x: "tabclose";
                rel2.to_y: "tabmiddle";
+               rel2.relative: 0.0 1.0;
                visible: 0;
                fixed: 1 1;
             }
@@ -1871,6 +1927,11 @@ collections {
          image: "tab_shad_l2.png" COMP;
          image: "tab_shad_r2.png" COMP;
       }
+      set { name: "tab_grouped";
+         image { image: "tab_grouped_8.png" COMP; size: 0 0 8 8; }
+         image { image: "tab_grouped_16.png" COMP; size: 8 8 16 16; }
+         image { image: "tab_grouped_32.png" COMP; size: 16 16 99999 99999; }
+      }
       parts {
          part { name: "tab_bevel_shad1";
             mouse_events: 0;
diff --git a/src/bin/options_behavior.c b/src/bin/options_behavior.c
index d7f81ef..16c77f3 100644
--- a/src/bin/options_behavior.c
+++ b/src/bin/options_behavior.c
@@ -513,7 +513,7 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
    CX(_("Enable special Terminology escape codes"), ty_escapes, 0);
    CX(_("Open new terminals in current working directory"), 
changedir_to_current, 0);
    CX(_("Treat Emojis as double-width characters"), emoji_dbl_width, 0);
-   CX(_("When grouping input, do it to all terminals and not just the visible 
ones"), group_all, 0);
+   CX(_("When grouping input, do it on all terminals and not just the visible 
ones"), group_all, 0);
 
 #undef CX
 
diff --git a/src/bin/win.c b/src/bin/win.c
index 072404c..e745b70 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -2340,6 +2340,8 @@ _win_toggle_group(Win *wn)
         GROUPED_INPUT_TERM_FOREACH(wn, l, term)
           {
              edje_object_signal_emit(term->bg, "focus,in", "terminology");
+             edje_object_signal_emit(term->bg, "grouped,on", "terminology");
+             /* TODO: boris tabbar_back */
              termio_event_feed_mouse_in(term->termio);
              termio_focus_in(term->termio);
           }
@@ -2353,6 +2355,8 @@ _win_toggle_group(Win *wn)
         GROUPED_INPUT_TERM_FOREACH(wn, l, term)
           {
              edje_object_signal_emit(term->bg, "focus,out", "terminology");
+             edje_object_signal_emit(term->bg, "grouped,off", "terminology");
+             /* TODO: boris tabbar_back */
              termio_focus_out(term->termio);
           }
         term = wn->child->term_first(wn->child);

-- 


Reply via email to