summaryrefslogtreecommitdiff
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
parent6bb1552c845f165ac1cb5cd3c04ffec446a86fe1 (diff)
force user title one window when set through -T option. Closes 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)
98 } 98 }
99 if (inst->title) 99 if (inst->title)
100 { 100 {
101 nargv[i++] = "-t"; 101 nargv[i++] = "-T";
102 nargv[i++] = (char *)inst->title; 102 nargv[i++] = (char *)inst->title;
103 } 103 }
104 if (inst->font) 104 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
161 Ecore_Timer *cmdbox_focus_timer; 161 Ecore_Timer *cmdbox_focus_timer;
162 unsigned char focused : 1; 162 unsigned char focused : 1;
163 unsigned char cmdbox_up : 1; 163 unsigned char cmdbox_up : 1;
164 unsigned char forced_title : 1;
164}; 165};
165 166
166/* }}} */ 167/* }}} */
@@ -1003,6 +1004,9 @@ _win_set_title(Term_Container *tc,
1003 1004
1004 wn = (Win*) tc; 1005 wn = (Win*) tc;
1005 1006
1007 if (wn->forced_title)
1008 return;
1009
1006 eina_stringshare_del(tc->title); 1010 eina_stringshare_del(tc->title);
1007 tc->title = eina_stringshare_ref(title); 1011 tc->title = eina_stringshare_ref(title);
1008 1012
@@ -1138,10 +1142,12 @@ win_new(const char *name, const char *role, const char *title,
1138 tc->bell = _win_bell; 1142 tc->bell = _win_bell;
1139 tc->close = _win_close; 1143 tc->close = _win_close;
1140 tc->update = _win_update; 1144 tc->update = _win_update;
1141 tc->title = eina_stringshare_add("Terminology"); 1145 tc->title = eina_stringshare_add(title? title : "Terminology");
1142 tc->type = TERM_CONTAINER_TYPE_WIN; 1146 tc->type = TERM_CONTAINER_TYPE_WIN;
1143 tc->wn = wn; 1147 tc->wn = wn;
1144 1148
1149 wn->forced_title = (title != NULL);
1150
1145 config_default_font_set(config, evas_object_evas_get(wn->win)); 1151 config_default_font_set(config, evas_object_evas_get(wn->win));
1146 1152
1147 wn->config = config_fork(config); 1153 wn->config = config_fork(config);