aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2017-08-26 19:27:39 +0200
committerBoris Faure <billiob@gmail.com>2017-08-26 19:27:39 +0200
commit61ce65c700e01516f7099455f5c6356795a1355c (patch)
tree714088fb9c6724ad51b5152710ab5c0fd44f334a
parentempty string resets tab title (diff)
downloadterminology-61ce65c700e01516f7099455f5c6356795a1355c.tar.gz
force user title one window when set through -T option. Closes https://phab.enlightenment.org/T5704
-rw-r--r--src/bin/main.c2
-rw-r--r--src/bin/win.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index ad0e9d8..6980f36 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -98,7 +98,7 @@ main_ipc_new(Ipc_Instance *inst)
}
if (inst->title)
{
- nargv[i++] = "-t";
+ nargv[i++] = "-T";
nargv[i++] = (char *)inst->title;
}
if (inst->font)
diff --git a/src/bin/win.c b/src/bin/win.c
index 1dbc2e0..c2c2bfd 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -161,6 +161,7 @@ struct _Win
Ecore_Timer *cmdbox_focus_timer;
unsigned char focused : 1;
unsigned char cmdbox_up : 1;
+ unsigned char forced_title : 1;
};
/* }}} */
@@ -1003,6 +1004,9 @@ _win_set_title(Term_Container *tc,
wn = (Win*) tc;
+ if (wn->forced_title)
+ return;
+
eina_stringshare_del(tc->title);
tc->title = eina_stringshare_ref(title);
@@ -1138,10 +1142,12 @@ win_new(const char *name, const char *role, const char *title,
tc->bell = _win_bell;
tc->close = _win_close;
tc->update = _win_update;
- tc->title = eina_stringshare_add("Terminology");
+ tc->title = eina_stringshare_add(title? title : "Terminology");
tc->type = TERM_CONTAINER_TYPE_WIN;
tc->wn = wn;
+ wn->forced_title = (title != NULL);
+
config_default_font_set(config, evas_object_evas_get(wn->win));
wn->config = config_fork(config);