Fix problem with invisible menu items in ddd, bug 210220.
authorUlrich Müller <ulm@gentoo.org>
Sun, 17 Feb 2008 11:44:28 +0000 (11:44 +0000)
committerUlrich Müller <ulm@gentoo.org>
Sun, 17 Feb 2008 11:44:28 +0000 (11:44 +0000)
Package-Manager: portage-2.1.4.4

x11-libs/openmotif/ChangeLog
x11-libs/openmotif/Manifest
x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch [new file with mode: 0644]
x11-libs/openmotif/openmotif-2.3.0-r1.ebuild

index da00693cd128b9def2ed0514d5c11b4c43fa35c5..4ce64716abf32011ac9876b2e85be1bdd8f6f222 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for x11-libs/openmotif
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/ChangeLog,v 1.155 2008/02/16 16:17:20 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/ChangeLog,v 1.156 2008/02/17 11:44:27 ulm Exp $
+
+  17 Feb 2008; Ulrich Mueller <ulm@gentoo.org>
+  +files/openmotif-2.3.0-sensitivity-invisible.patch,
+  openmotif-2.3.0-r1.ebuild:
+  Fix problem with invisible menu items in ddd, bug 210220.
 
   16 Feb 2008; Ulrich Mueller <ulm@gentoo.org> openmotif-2.3.0.ebuild:
   Stable on amd64, bug 204265.
index 5681203d8e958d16abc454428be452e75fdf044d..da82a1b7a2f4da54e2408bd2d2779588ab951163 100644 (file)
@@ -15,19 +15,20 @@ AUX openmotif-2.2.3-pixel_length.patch 450 RMD160 398b297d6e83cae2865bfdc14eb322
 AUX openmotif-2.2.3-popup_timeout.patch 359 RMD160 812b804bf85deea3fce7908530fc535ee5242142 SHA1 e2fa4b58c3232fab016d4a354ef4049d4c846c6e SHA256 5cb56bbdef8dbb511b259ffdbb9c213abeded8159ed4ca21909e6b8e7cb69322
 AUX openmotif-2.2.3-uil.patch 10746 RMD160 7ce99bde4d98bfb8cf023d123e2a41a25166b1d9 SHA1 4a38a9a3056285f067b948423f1c258ed590dff6 SHA256 6770e481633c0910ac2f901551962c0e58a59c8a80df70bff1e2378fe8d3e56d
 AUX openmotif-2.2.3-utf8.patch 2979 RMD160 4f362ddd7f4e40233faa4862ef796a1c1a9fe7a0 SHA1 7ba9f6cba69c48b9d07d1b966abe7ef24f247dc0 SHA256 2a024df6a28baf0b0bc03763ecbee512554199bfcf1cee87c0f91da8d8482dcd
+AUX openmotif-2.3.0-sensitivity-invisible.patch 7202 RMD160 255895bc7fa43079259de0e0e01262e83dca79f1 SHA1 41732e6c09229dbf8b681b37770a9c46621de84c SHA256 394863dd8b3adb67df78593a78cd04ec6eb7ddda3b70d27fd63f550341de07b9
 DIST openMotif-2.2.3.tar.gz 5149785 RMD160 b99230d508da57bca72b6920d28fce4187bf5179 SHA1 c463653d9f8e24b35522c3ba6363ddf7a282eab4 SHA256 12fc0d1de53ff30307603e31826db9b63a442f6f743451aed2cb7cedb038d3d9
 DIST openmotif-2.2.3-CAN-2004-0914-newer.patch.bz2 11986 RMD160 f04ccc46b82782d53e30c6a08475353ae8a1d4ad SHA1 7b67f9849ab315466fd3942079b2e39df7a05eb0 SHA256 89a44c191d3ffcb09bebc2d2c859560af0c93a56300b502cad77d77801f57cd7
 DIST openmotif-2.3.0-manual.pdf.tgz 4195259 RMD160 45b1a17a653b01ccf0324e0bc70fd1ef5db5a395 SHA1 1d0f55928ad65ee321564ba962b1608cfd83bb96 SHA256 49692fd4d5441d2dbb5ca36199b209c8503452fda9b36e929d1aa3673bffaecb
 DIST openmotif-2.3.0.tar.gz 5661471 RMD160 317c8d13d59c6fdd4a9f0e3b63000695f6677b6c SHA1 efb5f5fdc4cc43ef6065594f4ebe98953b7af15e SHA256 81d63e4145fab729621cba38bb0e88fccfbcbb5918473319e9b01a6fbe909544
 EBUILD openmotif-2.2.3-r9.ebuild 3665 RMD160 ff360947f706ae39ef3324a839427c9763700621 SHA1 5135beaf45008d74e937dbc133e3cd5a279fcfd3 SHA256 39e9f2336b0a0469108757436a5bd6dcc88cd0f28912009b75831f84c3a14b1a
-EBUILD openmotif-2.3.0-r1.ebuild 3334 RMD160 c5739c52ca4fcc23f86d66bcda67b0d1433cb77c SHA1 06ec997a2d7b39023d006b539e7e916b53e0704d SHA256 4e16c2090395621966da2b859167ffbc7d8a25d7f645ccbf7cc05eeb96339691
+EBUILD openmotif-2.3.0-r1.ebuild 3396 RMD160 d70edbdb8d18bb9ddbe774bebb8df07bc4b0cf56 SHA1 c288f52868ed24c05bf6db514cade0bb3f19e69d SHA256 010bb0f35c90e55edb27ad6ddd561f2fb6f4dd266d41c1c64323069a6e8b0826
 EBUILD openmotif-2.3.0.ebuild 3215 RMD160 897d14313b0ad956bc1c549a962723ebe32649dd SHA1 9ff7aceee3e435010feb085215209fd1ee7b0e4e SHA256 8208aa62cb2bc44a4145c11db93dd7eb4f5af36d15c5539c4f36dc54e5907e5e
-MISC ChangeLog 24109 RMD160 d965395df0327ff624c6f71278e054526c7337f3 SHA1 def07f574c22206ab20b3275511fc59c884b3583 SHA256 f8d6f0895943beda493507f98fa44b5120896590b5e512e3fa0ade09f97e9d1d
+MISC ChangeLog 24300 RMD160 cfd92b62d1b81b249740896361df54f8117e8b1e SHA1 6415e253fb99b6f898ce5dcaabadd2732139f8cb SHA256 6d2056c3c4b5feb0337881ee616b45f66776b1b99813faf563518c9f331c3d2c
 MISC metadata.xml 160 RMD160 d86217bb48cf4283e08e43bcaabbc919101ad795 SHA1 d6147d00f16e8cfeef893d0764b0675a93d62849 SHA256 56fca1e06f6dcbe3bc12e7d3962998c7cb79d74f218ce8a17b07771b3e06f49e
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.8 (GNU/Linux)
 
-iEYEARECAAYFAke3DJYACgkQOeoy/oIi7uyU4QCfeWBWe/gwa6aijZFiP1oYdWlf
-m8UAn2FWcwfN97tenazky3mplXqDLiaS
-=ARBm
+iEYEARECAAYFAke4HhsACgkQOeoy/oIi7uzHpACcDlpMoTy3Go0rJ9d//+K9ovo9
+juQAniQI0xgCpyujhHiHspOvK41Hjvh0
+=/Xqt
 -----END PGP SIGNATURE-----
diff --git a/x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch b/x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch
new file mode 100644 (file)
index 0000000..5041e8d
--- /dev/null
@@ -0,0 +1,194 @@
+--- openmotif-2.3.0-orig/lib/Xm/I18List.c      2005-12-09 15:29:01.000000000 +0100
++++ openmotif-2.3.0/lib/Xm/I18List.c   2008-02-16 00:48:53.000000000 +0100
+@@ -2086,7 +2086,7 @@
+     values.graphics_exposures = False;
+ 
+     mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures;
+-    smask = mask | GCStipple | GCFillStyle;
++    smask = mask | GCFillStyle;
+     
+     XmI18List_gc(ilist) = XtGetGC(w, mask, &values);
+ 
+@@ -2117,6 +2117,7 @@
+       XmI18List_entry_background_gc(ilist) = XtGetGC(w, mask, &values);
+     }
+ 
++    values.foreground = _XmAssignInsensitiveColor(w);
+     XmI18List_stippled_gc(ilist) = XtGetGC(w, smask, &values);
+ 
+     if (XmI18List_entry_background_use(ilist))
+--- openmotif-2.3.0-orig/lib/Xm/IconButton.c   2005-10-17 15:15:51.000000000 +0200
++++ openmotif-2.3.0/lib/Xm/IconButton.c        2008-02-16 00:48:53.000000000 +0100
+@@ -1836,7 +1836,7 @@
+     values.fill_style = FillStippled;
+ 
+     mask = GCForeground | GCBackground | GCGraphicsExposures;
+-    smask = mask | GCStipple | GCFillStyle;
++    smask = mask | GCFillStyle;
+ 
+     if (fs) {
+         values.font = fs->fid;
+@@ -1844,6 +1844,7 @@
+     }
+ 
+     XmIconButton_gc(iw) = XtGetGC(w, mask, &values);
++    values.foreground = _XmAssignInsensitiveColor(w);
+     XmIconButton_stippled_text_gc(iw) = XtGetGC(w, smask, &values);
+ 
+     /*
+--- openmotif-2.3.0-orig/lib/Xm/IconG.c        2003-10-06 12:10:24.000000000 +0200
++++ openmotif-2.3.0/lib/Xm/IconG.c     2008-02-16 00:48:53.000000000 +0100
+@@ -3134,9 +3134,9 @@
+ 
+ 
+     /** insensitive gc **/
+-    values.foreground = IG_Foreground(wid) ;
++    values.foreground = _XmAssignInsensitiveColor(XtParent(wid));
+     values.background = IG_Background(wid) ; 
+-    valueMask |= GCFillStyle | GCStipple;
++    valueMask |= GCFillStyle;
+     values.fill_style = FillOpaqueStippled;
+     values.stipple = _XmGetInsensitiveStippleBitmap(wid);
+ 
+--- openmotif-2.3.0-orig/lib/Xm/Label.c        2006-12-21 20:21:27.000000000 +0100
++++ openmotif-2.3.0/lib/Xm/Label.c     2008-02-16 00:48:53.000000000 +0100
+@@ -688,8 +688,8 @@
+   lw->label.normal_GC = XtAllocateGC((Widget) lw, 0, valueMask, &values,
+                                    dynamicMask, 0);
+   
+-  valueMask |= GCFillStyle | GCStipple;
+-  values.foreground = lw->core.background_pixel;
++  valueMask |= GCFillStyle;
++  values.foreground = _XmAssignInsensitiveColor((Widget)lw);
+   values.background = lw->primitive.foreground;
+   values.fill_style = FillOpaqueStippled;
+   values.stipple = _XmGetInsensitiveStippleBitmap((Widget) lw);
+@@ -1557,7 +1557,7 @@
+                      lp->StringRect.width,
+                      lp->alignment,
+                      XmPrim_layout_direction(lw), NULL);
+-#ifdef USE_XFT
++#if 0
+       if (!XtIsSensitive(wid))
+         {
+           XSetFillStyle(XtDisplay(lw), lp->insensitive_GC, FillStippled);
+--- openmotif-2.3.0-orig/lib/Xm/LabelG.c       2006-12-26 18:37:09.000000000 +0100
++++ openmotif-2.3.0/lib/Xm/LabelG.c    2008-02-16 00:48:53.000000000 +0100
+@@ -1247,8 +1247,8 @@
+     LabG_NormalGC(lw) = XtAllocateGC((Widget) mw, 0, valueMask, &values,
+         dynamicMask, 0);
+ 
+-    valueMask |= GCFillStyle | GCStipple;
+-    values.foreground = LabG_Background(lw); 
++    valueMask |= GCFillStyle;
++    values.foreground = _XmAssignInsensitiveColor((Widget)mw);
+     values.background = LabG_Foreground(lw);
+     values.fill_style = FillOpaqueStippled;
+ 
+@@ -2435,7 +2435,7 @@
+             lw->rectangle.y + LabG_TextRect(lw).y + LabG_StringRect(lw).y,
+             LabG_StringRect(lw).width,
+             LabG_Alignment(lw), LayoutG(lw), NULL);
+-#ifdef USE_XFT
++#if 0
+         if (!XtIsSensitive(wid)) {
+           XSetFillStyle(XtDisplay(lw), LabG_InsensitiveGC(lw), FillStippled);
+           XFillRectangle(XtDisplay(lw), XtWindow(lw), LabG_InsensitiveGC(lw),
+--- openmotif-2.3.0-orig/lib/Xm/List.c 2007-01-24 18:07:35.000000000 +0100
++++ openmotif-2.3.0/lib/Xm/List.c      2008-02-16 00:48:53.000000000 +0100
+@@ -2758,9 +2758,9 @@
+   lw->list.InverseGC = XtAllocateGC((Widget) lw, lw->core.depth,
+                                   valueMask, &values, modifyMask, 0);
+ 
+-  values.foreground = lw->primitive.foreground;
++  values.foreground = _XmAssignInsensitiveColor(lw);
+   values.background = lw->core.background_pixel;
+-  valueMask |= GCStipple | GCFillStyle;
++  valueMask |= GCFillStyle;
+   values.fill_style = FillOpaqueStippled;
+   values.stipple = _XmGetInsensitiveStippleBitmap((Widget) lw);
+ 
+--- openmotif-2.3.0-orig/lib/Xm/TextF.c        2006-08-28 15:53:30.000000000 +0200
++++ openmotif-2.3.0/lib/Xm/TextF.c     2008-02-16 00:48:53.000000000 +0100
+@@ -1960,8 +1960,7 @@
+     valueMask |= GCFillStyle;
+     if (stipple) {
+       values.fill_style = FillStippled;
+-      valueMask |= GCStipple;
+-      values.stipple = tf->text.stipple_tile;
++      values.foreground = _XmAssignInsensitiveColor((Widget)tf);
+     } else 
+       values.fill_style = FillSolid;
+   }
+--- openmotif-2.3.0-orig/lib/Xm/TextOut.c      2006-12-12 12:54:14.000000000 +0100
++++ openmotif-2.3.0/lib/Xm/TextOut.c   2008-02-16 00:48:53.000000000 +0100
+@@ -625,8 +625,7 @@
+     valueMask |= GCFillStyle;
+     if (stipple) {
+       values.fill_style = FillStippled;
+-      valueMask |= GCStipple;
+-      values.stipple = data->stipple_tile;
++      values.foreground = _XmAssignInsensitiveColor((Widget)tw);
+     } else 
+       values.fill_style = FillSolid;
+   }
+--- openmotif-2.3.0-orig/lib/Xm/Xm.c   2005-12-19 11:32:36.000000000 +0100
++++ openmotif-2.3.0/lib/Xm/Xm.c        2008-02-16 00:48:53.000000000 +0100
+@@ -426,3 +426,45 @@
+     _XmAppUnlock(app);
+     return return_wid;
+ }
++
++/************************************************************************
++ *
++ *  _XmAssignInsensitiveColor
++ *  Allocate the Gray color for display widget like insensitive.
++ *
++ *
++ ************************************************************************/
++
++Pixel
++_XmAssignInsensitiveColor(Widget w)
++{
++    static XColor screen_in_out;
++    int status;
++    Pixel p;
++
++    p = w->core.background_pixel;
++    XQueryColor(XtDisplay(w), w->core.colormap, &screen_in_out);
++    if ((abs(screen_in_out.red-RGB_GREY_VALUE)<RGB_GREY_PRESISE)
++      && (abs(screen_in_out.green-RGB_GREY_VALUE)<RGB_GREY_PRESISE)
++      && (abs(screen_in_out.blue-RGB_GREY_VALUE)<RGB_GREY_PRESISE)) {
++      /*text color have to be more light for wosn't be invisible*/
++      screen_in_out.red=(RGB_GREY_VALUE+RGB_GREY_VALUE/2)<<8;
++      screen_in_out.green=(RGB_GREY_VALUE+RGB_GREY_VALUE/2)<<8;
++      screen_in_out.blue=(RGB_GREY_VALUE+RGB_GREY_VALUE/2)<<8;
++
++      status = XAllocColor(XtDisplay(w), w->core.colormap, &screen_in_out);
++      if (status)
++          p = screen_in_out.pixel;
++    } else {
++      /*gray color*/
++      screen_in_out.red=RGB_GREY_VALUE<<8;
++      screen_in_out.green=RGB_GREY_VALUE<<8;
++      screen_in_out.blue=RGB_GREY_VALUE<<8;
++
++      status = XAllocColor(XtDisplay(w), w->core.colormap, &screen_in_out);
++      if (status)
++          p = screen_in_out.pixel;
++    }
++
++    return p;
++}
+--- openmotif-2.3.0-orig/lib/Xm/XmI.h  2005-12-19 11:32:36.000000000 +0100
++++ openmotif-2.3.0/lib/Xm/XmI.h       2008-02-16 00:48:53.000000000 +0100
+@@ -276,5 +276,9 @@
+ }  /* Close scope of 'extern "C"' declaration which encloses file. */
+ #endif
+ 
++#define RGB_GREY_VALUE 128
++#define RGB_GREY_PRESISE 50
++extern Pixel _XmAssignInsensitiveColor(Widget w);
++
+ #endif /* _XmI_h */
+ /* DON'T ADD ANYTHING AFTER THIS #endif */
index 1f9d887ef1def2bbd2cc2437bce2de41baffc251..dd9ccee3537f0ca3f273edb2bc65e8798e4c4eb6 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/openmotif-2.3.0-r1.ebuild,v 1.4 2008/02/14 22:01:55 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/openmotif-2.3.0-r1.ebuild,v 1.5 2008/02/17 11:44:27 ulm Exp $
 
-inherit flag-o-matic multilib autotools
+inherit eutils flag-o-matic multilib autotools
 
 DESCRIPTION="Open Motif"
 HOMEPAGE="http://www.motifzone.org/"
@@ -69,6 +69,7 @@ pkg_setup() {
 src_unpack() {
        unpack ${A}
        cd "${S}"
+       epatch "${FILESDIR}/${P}-sensitivity-invisible.patch"
 
        # disable compilation of demo binaries
        sed -i -e 's/^[ \t]*demos//' Makefile.in