Hi,

today I've had some minor problems regarding Irssi+Eterm using Xterm
title setting sequences.

Dunno what's the standard mechanism for resetting the title, for ''
(empty string) Eterm (or xf86?) choosed Untitled for title. The first
patch changes the check for empty str, the original version was '!str',
I've extended it with '|| (str && !strlen(str))'.

The second patch changes the title to be resetted, in the config
subsytem rs_title and rs_iconname contain the configured (or it falls
back to the builtin APL_NAME-VERSION) values, but in term.c it uses the
hardcoded original version, it could be changed all over the source, but
for now only the set_title and set_iconname functions are affected.

It works for me (tm), any feedback is appreciated.

-- 
Alex Beregszaszi <[EMAIL PROTECTED]>
(MPlayer Core Developer -- http://www.mplayerhq.hu/)
diff -burN eterm-0.9.2.orig/src/term.c eterm-0.9.2/src/term.c
--- eterm-0.9.2.orig/src/term.c Fri May 10 19:40:20 2002
+++ eterm-0.9.2/src/term.c      Mon Aug  4 16:19:22 2003
@@ -1696,7 +1696,7 @@
 {
   static char *name = NULL;
 
-  if (!str) {
+  if (!str || (str && !strlen(str))) {
     str = APL_NAME "-" VERSION;
   }
   if (name == NULL || strcmp(name, str)) {
@@ -1714,7 +1714,7 @@
 {
   static char *name = NULL;
 
-  if (!str) str = APL_NAME "-" VERSION;
+  if (!str || (str && !strlen(str))) str = APL_NAME "-" VERSION;
   if (name == NULL || strcmp(name, str)) {
     if (name != NULL) {
       FREE(name);
diff -burN eterm-0.9.2.orig/src/term.c eterm-0.9.2/src/term.c
--- eterm-0.9.2.orig/src/term.c Fri May 10 19:40:20 2002
+++ eterm-0.9.2/src/term.c      Mon Aug  4 16:30:48 2003
@@ -1696,8 +1696,8 @@
 {
   static char *name = NULL;
 
-  if (!str) {
-    str = APL_NAME "-" VERSION;
+  if (!str || (str && !strlen(str))) {
+    str = rs_title;
   }
   if (name == NULL || strcmp(name, str)) {
     if (name != NULL) {
@@ -1714,7 +1714,7 @@
 {
   static char *name = NULL;
 
-  if (!str) str = APL_NAME "-" VERSION;
+  if (!str || (str && !strlen(str))) str = rs_iconname;
   if (name == NULL || strcmp(name, str)) {
     if (name != NULL) {
       FREE(name);

Reply via email to