FVWM: FvwmPager linestyles

From: Austin Donnelly <and1000_at_cam.ac.uk>
Date: Fri, 14 Jun 96 16:14 BST

On Fri, 14 Jun 1996, Charles Hines wrote:

> >>>>> "Ric" == Richard Lister <listerrj_at_helios.aston.ac.uk> writes:
>
> Ric> On Fri, 14 Jun 1996 10:09:37 +0900
> Ric> Yujong Kim <yjkim_at_acasia.postech.ac.kr>
> Ric> wrote concerning 'nil':
>
> >> Hi! This is from Yujong Kim, a graduate student of POSTECH, KOREA.
> >> I want to know how I can make columns and rows's line of FvwmPager
> >> solid line. I make my DeskTopSize 3x3 ( FvwmPager # 0 ). but at
> >> that FvwmPager, lines which separate coloums and rows are dotted
> >> lines not solid lines. I want to be those line soild. How can I
> >> make cure that problem ? My machine is SUN sparc station. OS is
> >> solaris 2.5 with X11R5. My fvwm version is fvwm-2.0.42. I don't
> >> use 3d_pixmaps_1.0.tar.gz. In my fvwm version 1 case, those lines
> >> are solid line. So I think that the problem maybe a bug of
> >> fvwm-2.0.42.
>
> Ric> No, I believe it's a feature which came with 2.0.42. I suppose
> Ric> the idea is to make it easier to distinguish pages from desks in
> Ric> the pager.
>
> Yup - that was the idea. There was no way to truly distinguish
> between pages and full desks. Now there's two - dashed lines and
> optional colored backgrounds for each desk.
>
> There is currently no way to control this in the .fvwm2rc file - it's
> hard coded into the FvwmPager module, and I didn't really have any
> intention on making it an option. If you (Yujong) would like to
> change it back to being solid, you only have to change like one line -
> check out line 390 of x_pager.c in the FvwmPager directory. If you
> change that LineOnOffDash to LineSolid, it'll look like it did before.

Ok, I've added an option to control it.

*FvwmPagerInterPageLineStyle <linestyle>

Changes the style of lines drawn between individual pages on the same
desk. The default is to have inter-desk boundaries drawn with solid
lines, and inter-page boundaries dotted. However, if you only use a
single desk, you might want to set the line style some something
else. Possible values for <linestyle> are "Solid",
"OnOffDash" (the default), or "DoubleDash".

The patch follows. I've included a change to FvwmPager.man, so it even
comes ready-documented.

Chuck, any chance of this going into the next beta? :>

Austin
------------------------------------------------------------
diff -u --recursive fvwm-2.0.42.orig/modules/FvwmPager/FvwmPager.c fvwm-2.0.42/modules/FvwmPager/FvwmPager.c
--- fvwm-2.0.42.orig/modules/FvwmPager/FvwmPager.c Mon Mar 25 16:29:37 1996
+++ fvwm-2.0.42/modules/FvwmPager/FvwmPager.c Fri Jun 14 16:02:03 1996
_at_@ -73,6 +73,11 @@
 int Rows = -1, Columns = -1;
 int desk1=0, desk2 =0;
 int ndesks = 0;
+
+int InterPageLineStyle=LineOnOffDash; /* default line style */
+static char *lineStyleDesc[] = {"Solid", "OnOffDash", "DoubleDash"};
+static int lineStyleNum[] = {LineSolid, LineOnOffDash, LineDoubleDash};
+
 /***********************************************************************
  *
  * Procedure:
_at_@ -971,6 +976,27 @@
                              Clength+8)==0))
         {
           sscanf(&tline[Clength+8],"%d",&Columns);
+ }
+ else if((strlen(&tline[0])>1)&&
+ (mystrncasecmp(tline,CatString3("*",MyName,"InterPageLineStyle"),
+ Clength+19)==0))
+ {
+ n = 0;
+ while(isspace(tline[Clength+19+n]))n++;
+ tmp = &tline[Clength+19+n];
+ n = 0;
+ while (n<sizeof(lineStyleDesc)/sizeof(char *))
+ {
+ if (mystrncasecmp(tmp, lineStyleDesc[n],
+ strlen(lineStyleDesc[n]))==0)
+ {
+ InterPageLineStyle = lineStyleNum[n];
+ break;
+ }
+ n++;
+ }
+ if (n==sizeof(lineStyleDesc)/sizeof(char *))
+ fprintf(stderr, "[FvwmPager]: unknown line style '%s'\n", tmp);
         }
         else if((strlen(&tline[0])>1)&&
               (mystrncasecmp(tline,CatString3("*",MyName,"DeskTopScale"),
diff -u --recursive fvwm-2.0.42.orig/modules/FvwmPager/FvwmPager.man fvwm-2.0.42/modules/FvwmPager/FvwmPager.man
--- fvwm-2.0.42.orig/modules/FvwmPager/FvwmPager.man Sun Mar 24 17:41:05 1996
+++ fvwm-2.0.42/modules/FvwmPager/FvwmPager.man Fri Jun 14 15:28:19 1996
_at_@ -167,6 +167,14 @@
 FvwmCpp (or FvwmM4) and FvwmBacker to assign identical
 colors to your various desktops and the pager representations.
 
+.IP "*FvwmPagerInterPageLineStyle \fIlinestyle\fP"
+Changes the style of lines drawn between individual pages on the same
+desk. The default is to have inter-desk boundaries drawn with solid
+lines, and inter-page boundaries dotted. However, if you only use a
+single desk, you might want to set the line style some something
+else. Possible values for \fIlinestyle\fP are \fISolid\fP,
+\fIOnOffDash\fP (the default), or \fIDoubleDash\fP.
+
 .IP "*FvwmPagerDeskTopScale \fInumber\fP"
 If the geometry is not specified, then a desktop reduction factor is
 used to calculate the pager's size. Things in the pager window
Only in fvwm-2.0.42/modules/FvwmPager: Makefile
diff -u --recursive fvwm-2.0.42.orig/modules/FvwmPager/x_pager.c fvwm-2.0.42/modules/FvwmPager/x_pager.c
--- fvwm-2.0.42.orig/modules/FvwmPager/x_pager.c Sun Mar 24 17:33:47 1996
+++ fvwm-2.0.42/modules/FvwmPager/x_pager.c Fri Jun 14 15:19:10 1996
_at_@ -44,6 +44,7 @@
 
 extern int desk1, desk2, ndesks;
 extern int Rows,Columns;
+extern int InterPageLineStyle;
 extern int fd[2];
 
 int desk_w = 0;
_at_@ -387,7 +388,7 @@
   gcm = gcm | GCLineStyle;
   gcv.foreground = fore_pix;
   gcv.background = back_pix;
- gcv.line_style = LineOnOffDash;
+ gcv.line_style = InterPageLineStyle;
   DashedGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);
 }
 
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Fri Jun 14 1996 - 10:17:27 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST