From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pavel@Janik.cz (Pavel =?iso-8859-2?q?Jan=EDk?=) Newsgroups: gmane.emacs.devel Subject: Re: stipple in menu? Date: Sat, 20 Apr 2002 21:51:21 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <3CC1B46C.469D536@swipnet.se> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1019336788 7764 127.0.0.1 (20 Apr 2002 21:06:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 20 Apr 2002 21:06:28 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16z23w-000217-00 for ; Sat, 20 Apr 2002 23:06:28 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16z2Nx-00007E-00 for ; Sat, 20 Apr 2002 23:27:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16z23e-000209-00; Sat, 20 Apr 2002 17:06:10 -0400 Original-Received: from p0173.as-l043.contactel.cz ([194.108.242.173] helo=SnowWhite.SuSE.cz) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16z23C-0001z8-00 for ; Sat, 20 Apr 2002 17:05:43 -0400 Original-Received: by SnowWhite.SuSE.cz (PJ, from userid 500) id 4BC21183D1; Sat, 20 Apr 2002 23:07:50 +0200 (CEST) Original-To: "Jan D." X-Face: $"d&^B_IKlTHX!y2d,3;grhwjOBqOli]LV`6d]58%5'x/kBd7.MO&n3bJ@Zkf&RfBu|^qL+ ?/Re{MpTqanXS2'~Qp'J2p^M7uM:zp[1Xq#{|C!*'&NvCC[9!|=>#qHqIhroq_S"MH8nSH+d^9*BF: iHiAs(t(~b#1.{w.d[=Z In-Reply-To: <3CC1B46C.469D536@swipnet.se> ("Jan D."'s message of "Sat, 20 Apr 2002 20:33:16 +0200") User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu) Original-Lines: 144 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2882 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2882 From: "Jan D." Date: Sat, 20 Apr 2002 20:33:16 +0200 > How does it look on a monochrome display? I suspect that is the reaso= n for the > stipple in the first place. I do not know, I do not have access to monochrome display and my XFree86 driver for my cards does not support monochrome. Can you, please, test it? --- xlwmenuP.h.~1.5.~ Mon Oct 29 20:06:53 2001 +++ xlwmenuP.h Sat Apr 20 19:25:18 2002 @@ -20,11 +20,12 @@ =20 =20 /* New fields for the XlwMenu widget instance record */ -typedef struct _XlwMenu_part=20 +typedef struct _XlwMenu_part { /* slots set by the resources */ XFontStruct* font; Pixel foreground; + Pixel disabled_foreground; Pixel button_foreground; Dimension margin; Dimension horizontal_spacing; @@ -44,7 +45,7 @@ /* True means top_shadow_color and/or bottom_shadow_color must be freed.= */ unsigned free_top_shadow_color_p : 1; unsigned free_bottom_shadow_color_p : 1; -=20=20 + /* State of the XlwMenu */ int old_depth; widget_value** old_stack; @@ -63,7 +64,7 @@ GC foreground_gc; GC button_gc; GC background_gc; - GC inactive_gc; + GC disabled_gc; GC inactive_button_gc; GC shadow_top_gc; GC shadow_bottom_gc; @@ -73,20 +74,20 @@ } XlwMenuPart; =20 /* Full instance record declaration */ -typedef struct _XlwMenuRec=20 +typedef struct _XlwMenuRec { CorePart core; XlwMenuPart menu; } XlwMenuRec; =20 /* New fields for the XlwMenu widget class record */ -typedef struct=20 +typedef struct { int dummy; } XlwMenuClassPart; =20 /* Full class record declaration. */ -typedef struct _XlwMenuClassRec=20 +typedef struct _XlwMenuClassRec { CoreClassPart core_class; XlwMenuClassPart menu_class; --- xlwmenu.h.~1.4.~ Mon Oct 29 20:06:53 2001 +++ xlwmenu.h Sat Apr 20 19:26:01 2002 @@ -10,6 +10,8 @@ #include "lwlib.h" =20 /* Resource names used by the XlwMenu widget */ +#define XtNdisabledForeground "disabledForeground" +#define XtCDisabledForeground "DisabledForeground" #define XtNbuttonForeground "buttonForeground" #define XtCButtonForeground "ButtonForeground" #define XtNmargin "margin" --- xlwmenu.c.~1.48.~ Sat Apr 20 15:02:54 2002 +++ xlwmenu.c Sat Apr 20 19:26:18 2002 @@ -139,6 +139,8 @@ offset(menu.font),XtRString, "XtDefaultFont"}, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), offset(menu.foreground), XtRString, "XtDefaultForeground"}, + {XtNdisabledForeground, XtCDisabledForeground, XtRPixel, sizeof(Pixel), + offset(menu.disabled_foreground), XtRString, "gray60"}, {XtNbuttonForeground, XtCButtonForeground, XtRPixel, sizeof(Pixel), offset(menu.button_foreground), XtRString, "XtDefaultForeground"}, {XtNmargin, XtCMargin, XtRDimension, sizeof(Dimension), @@ -983,7 +985,7 @@ if (val->enabled) text_gc =3D mw->menu.foreground_gc; else - text_gc =3D mw->menu.inactive_gc; + text_gc =3D mw->menu.disabled_gc; deco_gc =3D mw->menu.foreground_gc; =20 if (separator_p) @@ -1455,13 +1457,10 @@ &xgcv); =20 xgcv.font =3D mw->menu.font->fid; - xgcv.foreground =3D mw->menu.foreground; + xgcv.foreground =3D mw->menu.disabled_foreground; xgcv.background =3D mw->core.background_pixel; - xgcv.fill_style =3D FillStippled; - xgcv.stipple =3D mw->menu.gray_pixmap; - mw->menu.inactive_gc =3D XtGetGC ((Widget)mw, - (GCFont | GCForeground | GCBackground - | GCFillStyle | GCStipple), &xgcv); + mw->menu.disabled_gc =3D XtGetGC ((Widget)mw, + (GCFont | GCForeground | GCBackground), &xgcv); =20 xgcv.font =3D mw->menu.font->fid; xgcv.foreground =3D mw->menu.button_foreground; @@ -1486,13 +1485,13 @@ { XtReleaseGC ((Widget) mw, mw->menu.foreground_gc); XtReleaseGC ((Widget) mw, mw->menu.button_gc); - XtReleaseGC ((Widget) mw, mw->menu.inactive_gc); + XtReleaseGC ((Widget) mw, mw->menu.disabled_gc); XtReleaseGC ((Widget) mw, mw->menu.inactive_button_gc); XtReleaseGC ((Widget) mw, mw->menu.background_gc); /* let's get some segvs if we try to use these... */ mw->menu.foreground_gc =3D (GC) -1; mw->menu.button_gc =3D (GC) -1; - mw->menu.inactive_gc =3D (GC) -1; + mw->menu.disabled_gc =3D (GC) -1; mw->menu.inactive_button_gc =3D (GC) -1; mw->menu.background_gc =3D (GC) -1; } --=20 Pavel Jan=EDk And finally even emacs became warezz .. -- Sascha Luedecke in gnu.emacs.help