Re: [cdesktopenv-devel] Color style manager: "Modify" palette function?

2014-03-12 Thread Peter Howkins
On Wed, Mar 05, 2014 at 01:52:25PM -0800, ibid...@gmail.com wrote:
> 
> The code's still there, in programs/dtstyle/ColorMain.c and 
> programs/dtstyle/Main.c; it depends on style.dynamicColor, which seeems to 
> be the resource *dynamicColor.
> However, adding *dynamicColor: true to /usr/dt/app-defaults/Dt doesn't 
> seem to do anything.
> ...seems to be set if there's a color server (dtsession, per Sun's docs) 
> and it returns something or other...
>
> I'm not sure how to fix this, but it looks like the place to look is
> dtsession.

The code is still there and is working on paletted displays, try running 
your xserver in 8bpp.

I did bodge enough of the code to make the UI appear in 16/24/32bpp, but 
it was non-functional due to it changing the colour values of palette 
entries that were not being used. I'm not sure but would changing the 
colours without using a palette require us to send a message to each CDE 
app to say 'colours have changed, update and redraw'?

Peter

-- 
Peter Howkins
peter.howk...@marutan.net

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


[cdesktopenv-devel] [PATCH] Fic cpp output on Ubuntu 13

2014-03-12 Thread Ulrich Wilkens


On Ubuntu 13 and its variants cpp puts some empty lines on top of
the output files.
With the outcome that in case of shell scripts the shebang line is
ignored. This breaks many parts in CDE.
This patch avoids the additional lines.


--
Ulrich Wilkens
Email: m...@uwilkens.de

>From c7b1c12a1c76c03f33f3bf6a673e8d2d1472a418 Mon Sep 17 00:00:00 2001
From: Ulrich Wilkens 
Date: Wed, 12 Mar 2014 19:43:12 +0100
Subject: [PATCH] Fix cpp output on Ubuntu 13

---
 cde/config/cf/Imake.rules | 2 +-
 cde/config/cf/linux.cf| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cde/config/cf/Imake.rules b/cde/config/cf/Imake.rules
index 6b21cd7..6fa1ecc 100644
--- a/cde/config/cf/Imake.rules
+++ b/cde/config/cf/Imake.rules
@@ -2376,7 +2376,7 @@ MakeMakeSubdirs(dirs,Makefiles)
  * Also delete line numbers from the cpp output (-P is not portable, I guess).
  */
 #ifndef CppSedMagic
-#define CppSedMagic $(SED) -e '/^#  *[0-9][0-9]*  *.*$$/d' -e 
'/^XCOMM$$/s//#/' -e '/^XCOMM[^a-zA-Z0-9_]/s/^XCOMM/#/'
+#define CppSedMagic $(SED) -e '/^#[line]* *[0-9][0-9]*  *.*$$/d' -e 
'/^XCOMM$$/s//#/' -e '/^XCOMM[^a-zA-Z0-9_]/s/^XCOMM/#/'
 #endif /* CppSedMagic */
 
 #ifndef CppFileTarget
diff --git a/cde/config/cf/linux.cf b/cde/config/cf/linux.cf
index 4d1c6ab..8124855 100644
--- a/cde/config/cf/linux.cf
+++ b/cde/config/cf/linux.cf
@@ -121,7 +121,7 @@ XCOMM binutils:  (LinuxBinUtilsMajorVersion)
 #define LdCombineFlags -r
 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
 #define HasWChar32 YES
-#define StandardCppDefines -traditional StandardDefines
+#define StandardCppDefines -traditional -nostdinc StandardDefines
 #define ExtensionOSDefines -DXTESTEXT1
 
 #define LinuxLocaleDefines /**/
-- 
1.7.11.5

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


Re: [cdesktopenv-devel] [PATCH] Fic cpp output on Ubuntu 13

2014-03-12 Thread Jon Trulson
On Wed, 12 Mar 2014, Ulrich Wilkens wrote:

>
> On Ubuntu 13 and its variants cpp puts some empty lines on top of
> the output files.
> With the outcome that in case of shell scripts the shebang line is
> ignored. This breaks many parts in CDE.
> This patch avoids the additional lines.
>
>
>

Applied.  This was the last build issue I was having with Ubuntu
13.10, nice work! :)

-- 
Jon Trulson

 Last day, Capricorn fifteens. Year of the city, 2274.
 Carousel begins.

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel


Re: [cdesktopenv-devel] Color style manager: "Modify" palette function?

2014-03-12 Thread alx

Peter Howkins wrote:

On Wed, Mar 05, 2014 at 01:52:25PM -0800, ibid...@gmail.com wrote:



I'm not sure but would changing the
colours without using a palette require us to send a message to each CDE
app to say 'colours have changed, update and redraw'?


I modified dtstyle so that it allows palette editing on true/direct 
color screens, under the condition that you only get a simple preview 
until session is restarted. But unless there is a way for dtsession to 
tell Motif about XmColorObject updates, not much can be done about this, 
I guess.


I attached a diff. If that's a viable solution I'd make a patch.
diff --git a/cde/programs/dtstyle/ColorEdit.c b/cde/programs/dtstyle/ColorEdit.c
index eeb32b3..17753f0 100644
--- a/cde/programs/dtstyle/ColorEdit.c
+++ b/cde/programs/dtstyle/ColorEdit.c
@@ -187,6 +187,16 @@ ColorEditor(
{
 edit.color_set = color_set;
CopyPixelSet(&edit.oldButtonColor,edit.color_set);
+
+   /* update "old" button if necessary */
+   if(style.visualClass==TrueColor || 
style.visualClass==DirectColor){
+   XtVaSetValues(edit.oldButton,
+   XmNbackground,edit.color_set->bg.pixel,
+   XmNarmColor,edit.color_set->bg.pixel,
+   XmNforeground,edit.color_set->fg.pixel,
+   XmNtopShadowColor,edit.color_set->ts.pixel,
+   
XmNbottomShadowColor,edit.color_set->bs.pixel,NULL);
+   }
InitializeNewButton();
SetScales(&edit.color_set->bg);
XtManageChild(edit.DialogShell);
@@ -287,8 +297,17 @@ CreateColorEditor(
 XtSetArg(args[n], XmNverticalSpacing, style.verticalSpacing); n++;
sampleForm = XmCreateForm(sampleTB, "sampleForm", args, n);

-/*   Create Old and New Buttons */
-InitializeOldButton();
+/* Create Old and New Buttons */
+   if(style.visualClass==TrueColor || 
style.visualClass==DirectColor){
+   edit.oldButtonColor.bg.pixel = edit.color_set->bg.pixel;
+   edit.oldButtonColor.fg.pixel = edit.color_set->fg.pixel;
+   edit.oldButtonColor.sc.pixel = edit.color_set->sc.pixel;
+   edit.oldButtonColor.bs.pixel = edit.color_set->bs.pixel;
+   edit.oldButtonColor.ts.pixel = edit.color_set->ts.pixel;
+   CopyPixelSet(&edit.oldButtonColor,edit.color_set);
+   }else{
+   InitializeOldButton();
+   }
 
 if(!OldNewSame) {
   n=0;
@@ -973,7 +992,36 @@ GenerateColors( void )
 edit.color_set->bs.blue = 0;
 }
 
-XStoreColors(style.display, style.colormap, colors, j );
+if(style.visualClass==PseudoColor || style.visualClass==StaticColor)
+   {
+   XStoreColors(style.display, style.colormap, colors, j );
+   }
+   else if(style.visualClass==TrueColor || style.visualClass==DirectColor)
+   {
+   static unsigned long pixels[4];
+   static int count=0;
+
+   if(count){
+   
XFreeColors(style.display,style.colormap,pixels,count,0);
+   count=0;
+   }
+
+   
if(XAllocColor(style.display,style.colormap,&edit.color_set->fg))
+   pixels[count++]=edit.color_set->fg.pixel;
+   
if(XAllocColor(style.display,style.colormap,&edit.color_set->bg))
+   pixels[count++]=edit.color_set->bg.pixel;
+   
if(XAllocColor(style.display,style.colormap,&edit.color_set->ts))
+   pixels[count++]=edit.color_set->ts.pixel;
+   
if(XAllocColor(style.display,style.colormap,&edit.color_set->bs))
+   pixels[count++]=edit.color_set->bs.pixel;
+
+   XtVaSetValues(edit.newButton,
+   XmNbackground,edit.color_set->bg.pixel,
+   XmNarmColor,edit.color_set->bg.pixel,
+   XmNforeground,edit.color_set->fg.pixel,
+   XmNtopShadowColor,edit.color_set->ts.pixel,
+   XmNbottomShadowColor,edit.color_set->bs.pixel,NULL);
+   }
  }
 
 /
@@ -1187,8 +1235,8 @@ CopyPixelSet(
 
XtSetValues(edit.oldButton, args, n);
 }
-
-XStoreColors(style.display, style.colormap, colors, j );
+   if(style.visualClass == PseudoColor || style.visualClass == GrayScale)
+   XStoreColors(style.display, style.colormap, colors, j );
 
 }
 
diff --git a/cde/programs/dtstyle/ColorMain.c b/cde/programs/dtstyle/ColorMain.c
index 80d9513..5b1fa96 100644
--- a/cde/programs/dtstyle/ColorMain.c
+++ b/cde/programs/dtstyle/ColorMain.c
@@ -218,6 +218,12 @@ static void _DtmapCB_colorUse(
 Widget w,

Re: [cdesktopenv-devel] [PATCH] Fic cpp output on Ubuntu 13

2014-03-12 Thread Christopher Turkel


Nice!I'll update the wiki.


-Original Message-
From: Jon Trulson 
To: Ulrich Wilkens 
Cc: CDE development 
Sent: Wed, Mar 12, 2014 4:02 pm
Subject: Re: [cdesktopenv-devel] [PATCH] Fic cpp output on Ubuntu 13


On Wed, 12 Mar 2014, Ulrich Wilkens wrote:

>
> On Ubuntu 13 and its variants cpp puts some empty lines on top of
> the output files.
> With the outcome that in case of shell scripts the shebang line is
> ignored. This breaks many parts in CDE.
> This patch avoids the additional lines.
>
>
>

Applied.  This was the last build issue I was having with Ubuntu
13.10, nice work! :)
---


 

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech___
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel