billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=51468de3fdbdeacf6b6db26dd87ab0d29f6f1c96

commit 51468de3fdbdeacf6b6db26dd87ab0d29f6f1c96
Author: Boris Faure <[email protected]>
Date:   Sun Apr 12 17:16:14 2020 +0200

    group input: add config option about default to visible ones or all
---
 src/bin/config.c           | 12 ++++++++++--
 src/bin/config.h           |  1 +
 src/bin/controls.c         |  6 +++++-
 src/bin/options_behavior.c |  2 ++
 4 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/bin/config.c b/src/bin/config.c
index c4449c4..8c14fd1 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -7,7 +7,7 @@
 #include "col.h"
 #include "utils.h"
 
-#define CONF_VER 23
+#define CONF_VER 24
 #define CONFIG_KEY "config"
 
 #define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
@@ -191,6 +191,8 @@ config_init(void)
      (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
+     (edd_base, Config, "group_all", group_all, EET_T_UCHAR);
 }
 
 void
@@ -319,6 +321,7 @@ config_sync(const Config *config_src, Config *config)
    config->shine = config_src->shine;
    config->translucent = config_src->translucent;
    config->opacity = config_src->opacity;
+   config->group_all = config_src->group_all;
 }
 
 static void
@@ -595,6 +598,7 @@ config_new(void)
         _add_default_keys(config);
         config->shine = 255;
         config->hide_cursor = 5.0;
+        config->group_all = EINA_FALSE;
      }
    return config;
 }
@@ -728,8 +732,11 @@ config_load(void)
                 case 22:
                   config->show_tabs = !config->notabs;
                   EINA_FALLTHROUGH;
+                case 23:
+                  config->group_all = EINA_FALSE;
+                  EINA_FALLTHROUGH;
                   /*pass through*/
-                case CONF_VER: /* 23 */
+                case CONF_VER: /* 24 */
                   config->version = CONF_VER;
                   break;
                 default:
@@ -832,6 +839,7 @@ config_fork(const Config *config)
    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 3f12cd8..c5138a1 100644
--- a/src/bin/config.h
+++ b/src/bin/config.h
@@ -95,6 +95,7 @@ struct _Config
    Eina_Bool         ty_escapes;
    Eina_Bool         changedir_to_current;
    Eina_Bool         emoji_dbl_width;
+   Eina_Bool         group_all;
    Config_Color      colors[(4 * 12)];
    Eina_List        *keys;
 
diff --git a/src/bin/controls.c b/src/bin/controls.c
index 8d80c81..c3bf996 100644
--- a/src/bin/controls.c
+++ b/src/bin/controls.c
@@ -231,9 +231,13 @@ _cb_group_input_changed(void *data, Evas_Object *obj 
EINA_UNUSED,
 {
    Controls_Ctx *ctx = data;
    Win *wn = ctx->wn;
+   Config *config = termio_config_get(ctx->term);
 
    controls_hide(ctx, EINA_TRUE);
-   win_toggle_visible_group(wn);
+   if (config && config->group_all)
+     win_toggle_all_group(wn);
+   else
+     win_toggle_visible_group(wn);
 }
 
 static void
diff --git a/src/bin/options_behavior.c b/src/bin/options_behavior.c
index c945d5d..d7f81ef 100644
--- a/src/bin/options_behavior.c
+++ b/src/bin/options_behavior.c
@@ -65,6 +65,7 @@ CB(mv_always_show, 0);
 CB(ty_escapes, 0);
 CB(changedir_to_current, 0);
 CB(emoji_dbl_width, 0);
+CB(group_all, 0);
 
 #undef CB
 
@@ -512,6 +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);
 
 #undef CX
 

-- 


Reply via email to