[xpert] xdbx patch

Dana A. Chee dana at dino.bellcore.com
Tue Mar 20 11:33:11 AEST 1990


Original-posting-by: dana at dino.bellcore.com (Dana A. Chee)
Original-subject: xdbx patch
Reposted-by: emv at math.lsa.umich.edu (Edward Vielmetti)

[This is a patch to xdbx from comp.windows.x.]


The xdbx on expo had a bug in the CreateSign stuff where it was
telling the Form widget that the sign should be next to the scrollbar
of the text, but the Form widget can only handle fromHorizontal or
fromVertical if the widgets you give it are its children.

Below is the patch (I'll update expo tomorrow (Tues).

+*************************************************************************+
*  Dana Chee				(201) 829-4488			  *
*  Bellcore								  *
*  Room 2Q-250								  *
*  445 South Street			ARPA: dana at bellcore.com		  *
*  Morristown,  NJ  07960-1910		UUCP: {gateways}!bellcore!dana	  *
+*************************************************************************+

*** patchlevel.h.1	Mon Mar 19 18:08:06 1990
--- patchlevel.h	Mon Mar 19 18:08:15 1990
***************
*** 1 ****
! #define PATCHLEVEL 1
--- 1 ----
! #define PATCHLEVEL 2
*** signs.orig	Mon Mar 19 18:07:37 1990
--- signs.c	Mon Mar 19 18:00:57 1990
***************
*** 120,125 ****
--- 120,127 ----
      Pixel       fg, bg;
      int 	horizDistance, vertDistance, height_per_line;
      int         screen;
+     Dimension	mywidth = 0;
+     Dimension	bdrwidth = 0;
  
      if (displayedFile == NULL) return NULL;
  
***************
*** 127,133 ****
      n = 0;
      XtSetArg(args[n], XtNheight, &source_height);			n++;
      XtSetArg(args[n], XtNbackground, &bg);				n++;
!     XtGetValues(parent, args, n);
  
      height_per_line = source_height/displayedFile->lines;
      vertDistance = OFFSET + (i * height_per_line); 
--- 129,135 ----
      n = 0;
      XtSetArg(args[n], XtNheight, &source_height);			n++;
      XtSetArg(args[n], XtNbackground, &bg);				n++;
!     XtGetValues(sourceWindow, args, n);
  
      height_per_line = source_height/displayedFile->lines;
      vertDistance = OFFSET + (i * height_per_line); 
***************
*** 156,161 ****
--- 158,172 ----
  	fg = app_resources.stopForeground;
      };
  
+     if( ctx->text.vbar != NULL )
+     {
+ 	    n = 0;
+ 	    XtSetArg(args[n], XtNwidth, &mywidth); 			n++;
+ 	    XtSetArg(args[n], XtNborderWidth, &bdrwidth);		n++;
+ 	    XtGetValues(ctx->text.vbar, args, n);
+ 	    mywidth += (bdrwidth * 2);
+     }
+     
      n = 0;
      XtSetArg(args[n], XtNborderWidth, 0);				n++;
      XtSetArg(args[n], XtNwidth, (XtArgVal) width);			n++;
***************
*** 167,174 ****
          fg, bg, DefaultDepth(display, screen)));			n++;
  
      XtSetArg(args[n], XtNfromVert, (XtArgVal) NULL);			n++;
!     XtSetArg(args[n], XtNfromHoriz, (XtArgVal) ctx->text.vbar);		n++;
!     XtSetArg(args[n], XtNhorizDistance, (XtArgVal) horizDistance);	n++;
      XtSetArg(args[n], XtNvertDistance, (XtArgVal) vertDistance);	n++;
      XtSetArg(args[n], XtNtop, (XtArgVal) XtChainTop);			n++;
      XtSetArg(args[n], XtNleft, (XtArgVal) XtChainLeft);			n++;
--- 178,185 ----
          fg, bg, DefaultDepth(display, screen)));			n++;
  
      XtSetArg(args[n], XtNfromVert, (XtArgVal) NULL);			n++;
!     XtSetArg(args[n], XtNfromHoriz, (XtArgVal) NULL/*ctx->text.vbar*/);	n++;
!     XtSetArg(args[n], XtNhorizDistance, (XtArgVal)
horizDistance+mywidth);	n++;
      XtSetArg(args[n], XtNvertDistance, (XtArgVal) vertDistance);	n++;
      XtSetArg(args[n], XtNtop, (XtArgVal) XtChainTop);			n++;
      XtSetArg(args[n], XtNleft, (XtArgVal) XtChainLeft);			n++;



More information about the Alt.sources.patches mailing list