netbsd-bugs@netbsd.org
[Top] [All Lists]

xsrc/35921: fix xconsole's title activity hack so it matches xterm's

Subject: xsrc/35921: fix xconsole's title activity hack so it matches xterm's
From: "Greg A. Woods"
Date: Mon, 5 Mar 2007 03:35:00 +0000 UTC
>Number:         35921
>Category:       xsrc
>Synopsis:       fix xconsole's icon title activity hack so it matches xterm's
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 05 03:35:00 +0000 2007
>Originator:     Greg A. Woods
>Release:        NetBSD xsrc-current
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD
>Description:

        fix xconsole's icon title activity hack so it matches xterm's

>How-To-Repeat:

>Fix:

cvs diff: Diffing xfree/xc/programs/xconsole
Index: xfree/xc/programs/xconsole/Imakefile
===================================================================
RCS file: /cvs/master/m-NetBSD/main/xsrc/xfree/xc/programs/xconsole/Imakefile,v
retrieving revision 1.3
diff -u -r1.3 Imakefile
--- xfree/xc/programs/xconsole/Imakefile        18 Mar 2005 17:39:47 -0000      
1.3
+++ xfree/xc/programs/xconsole/Imakefile        12 Jul 2006 01:43:25 -0000
@@ -3,7 +3,7 @@
           OBJS = xconsole.o
        PROGRAMS = xconsole
         DEPLIBS = XawClientDepLibs
-LOCAL_LIBRARIES = XawClientLibs
+LOCAL_LIBRARIES = $(PTYLIB) XawClientLibs
 
 #if defined(NetBSDArchitecture) || defined(OpenBSDArchitecture) || \
     (defined(LinuxArchitecture) && \
Index: xfree/xc/programs/xconsole/xconsole.c
===================================================================
RCS file: /cvs/master/m-NetBSD/main/xsrc/xfree/xc/programs/xconsole/xconsole.c,v
retrieving revision 1.3
diff -u -r1.3 xconsole.c
--- xfree/xc/programs/xconsole/xconsole.c       18 Mar 2005 14:55:17 -0000      
1.3
+++ xfree/xc/programs/xconsole/xconsole.c       12 Jul 2006 00:27:59 -0000
@@ -356,10 +356,10 @@
        return;
     XtSetArg (arglist[0], XtNiconName, &oldName);
     XtGetValues (top, arglist, 1);
-    newName = malloc (strlen (oldName) + 3);
+    newName = malloc (strlen (oldName) + 5);
     if (!newName)
        return;
-    sprintf (newName, "%s *", oldName);
+    sprintf (newName, "*** %s", oldName);
     XtSetArg (arglist[0], XtNiconName, newName);
     XtSetValues (top, arglist, 1);
     free (newName);
@@ -381,13 +381,12 @@
     XtSetArg (arglist[0], XtNiconName, &oldName);
     XtGetValues (top, arglist, 1);
     oldlen = strlen (oldName);
-    if (oldlen >= 2)
+    if (oldlen >= 5)
     {
-       newName = malloc (oldlen - 1);
+       newName = malloc (oldlen - 5);
        if (!newName)
            return;
-       strncpy (newName, oldName, oldlen - 2);
-       newName[oldlen - 2] = '\0';
+       strcpy (newName, oldName + 4);
        XtSetArg (arglist[0], XtNiconName, newName);
        XtSetValues (top, arglist, 1);
        free (newName);
Index: xfree/xc/programs/xconsole/xconsole.man
===================================================================
RCS file: 
/cvs/master/m-NetBSD/main/xsrc/xfree/xc/programs/xconsole/xconsole.man,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 xconsole.man
--- xfree/xc/programs/xconsole/xconsole.man     18 Mar 2005 13:08:22 -0000      
1.1.1.5
+++ xfree/xc/programs/xconsole/xconsole.man     12 Jul 2006 00:27:59 -0000
@@ -43,11 +43,13 @@
 .TP 8
 .B \-file \fIfile-name\fP
 To monitor some other device, use this option to specify the device name.
-This does not work on regular files as they are always ready to be read from.
+If the file is a regular file then a read of zero bytes will put
+.I xconsole
+to sleep for one second.
 .TP 8
 .B \-notify \-nonotify
 When new data are received from the console and the notify option is set,
-the icon name of the application has " *" appended, so that it is evident
+the icon name of the application has ``*** '' prepended, so that it is evident
 even when the application is iconified.  \-notify is the default.
 .TP 8
 .B \-daemon

<Prev in Thread] Current Thread [Next in Thread>
  • xsrc/35921: fix xconsole's title activity hack so it matches xterm's, Greg A. Woods <=