diff options
author | Jory Pratt <anarchy@gentoo.org> | 2006-06-01 01:09:15 +0000 |
---|---|---|
committer | Jory Pratt <anarchy@gentoo.org> | 2006-06-01 01:09:15 +0000 |
commit | f1a732f54a782454e41a6ca39dd0241be08dc79f (patch) | |
tree | 329a3e82c6dc574e782cac62626b6936f6e0a73b /x11-wm/openbox | |
parent | Use the right PN. (diff) | |
download | gentoo-2-f1a732f54a782454e41a6ca39dd0241be08dc79f.tar.gz gentoo-2-f1a732f54a782454e41a6ca39dd0241be08dc79f.tar.bz2 gentoo-2-f1a732f54a782454e41a6ca39dd0241be08dc79f.zip |
revision for hiding menu header, and pipedslitgradient patch for more advanced themeing possibilities
(Portage version: 2.1_rc3-r3)
Diffstat (limited to 'x11-wm/openbox')
-rw-r--r-- | x11-wm/openbox/ChangeLog | 11 | ||||
-rw-r--r-- | x11-wm/openbox/files/digest-openbox-20060509-r1 | 6 | ||||
-rw-r--r-- | x11-wm/openbox/files/openbox-20060509-hideMenuHeader.patch | 64 | ||||
-rw-r--r-- | x11-wm/openbox/files/openbox-20060509-pipedsplitgradient.patch | 256 | ||||
-rw-r--r-- | x11-wm/openbox/openbox-20060509-r1.ebuild | 67 |
5 files changed, 403 insertions, 1 deletions
diff --git a/x11-wm/openbox/ChangeLog b/x11-wm/openbox/ChangeLog index 9f4b47336b22..59c3baa65f16 100644 --- a/x11-wm/openbox/ChangeLog +++ b/x11-wm/openbox/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for x11-wm/openbox # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/openbox/ChangeLog,v 1.107 2006/05/10 00:44:23 anarchy Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-wm/openbox/ChangeLog,v 1.108 2006/06/01 01:09:15 anarchy Exp $ + +*openbox-20060509-r1 (01 Jun 2006) + + 01 Jun 2006; Jory A. Pratt <anarchy@gentoo.org> + +files/openbox-20060509-hideMenuHeader.patch, + +files/openbox-20060509-pipedsplitgradient.patch, + +openbox-20060509-r1.ebuild: + revision for hiding menu header, and pipedslitgradient patch for more + advanced themeing possibilities *openbox-20060509 (10 May 2006) diff --git a/x11-wm/openbox/files/digest-openbox-20060509-r1 b/x11-wm/openbox/files/digest-openbox-20060509-r1 new file mode 100644 index 000000000000..f185955cb253 --- /dev/null +++ b/x11-wm/openbox/files/digest-openbox-20060509-r1 @@ -0,0 +1,6 @@ +MD5 3d69bb394dae0994461172fccedc602a ob-themes-usability.tar.bz2 19204 +RMD160 0d5307746ba743647fe912eb8a364ca61c68b61a ob-themes-usability.tar.bz2 19204 +SHA256 36ce83c2d10abcc503dbaa6c89c0ce9a8793e5760d281973a38a41577421f5c5 ob-themes-usability.tar.bz2 19204 +MD5 3ff8d5dd7fdae18e5bc1b49f917af16a openbox-20060509.tar.gz 827216 +RMD160 dcd93e081ba1db144b87b0758a76a45256a543a1 openbox-20060509.tar.gz 827216 +SHA256 c097806666b63dfc312f769a3f60b30c60d73996fb44e37f484d4321fd2e7fb2 openbox-20060509.tar.gz 827216 diff --git a/x11-wm/openbox/files/openbox-20060509-hideMenuHeader.patch b/x11-wm/openbox/files/openbox-20060509-hideMenuHeader.patch new file mode 100644 index 000000000000..cd09d7e15777 --- /dev/null +++ b/x11-wm/openbox/files/openbox-20060509-hideMenuHeader.patch @@ -0,0 +1,64 @@ +Index: openbox/config.c +=================================================================== +RCS file: /cvs/cvsroot/openbox/openbox/config.c,v +retrieving revision 1.92 +diff -u -p -r1.92 config.c +--- openbox/config.c 25 Sep 2005 14:45:24 -0000 1.92 ++++ openbox/config.c 16 Apr 2006 18:29:18 -0000 +@@ -36,6 +36,7 @@ ObPlacePolicy config_place_policy; + gchar *config_theme; + gboolean config_theme_keepborder; + gboolean config_theme_hidedisabled; ++gboolean config_theme_hidemenuheader; + + gchar *config_title_layout; + +@@ -260,6 +261,8 @@ static void parse_theme(ObParseInst *i, + config_theme_keepborder = parse_bool(doc, n); + if ((n = parse_find_node("hideDisabled", node))) + config_theme_hidedisabled = parse_bool(doc, n); ++ if ((n = parse_find_node("hideMenuHeader", node))) ++ config_theme_hidemenuheader = parse_bool(doc, n); + } + + static void parse_desktops(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, +@@ -563,6 +566,7 @@ void config_startup(ObParseInst *i) + config_title_layout = g_strdup("NLIMC"); + config_theme_keepborder = TRUE; + config_theme_hidedisabled = FALSE; ++ config_theme_hidemenuheader = FALSE; + + parse_register(i, "theme", parse_theme, NULL); + +Index: openbox/config.h +=================================================================== +RCS file: /cvs/cvsroot/openbox/openbox/config.h,v +retrieving revision 1.57 +diff -u -p -r1.57 config.h +--- openbox/config.h 25 Sep 2005 14:45:24 -0000 1.57 ++++ openbox/config.h 16 Apr 2006 18:29:18 -0000 +@@ -88,6 +88,8 @@ extern gchar *config_theme; + extern gboolean config_theme_keepborder; + /* Hide window frame buttons that the window doesn't allow */ + extern gboolean config_theme_hidedisabled; ++/* Hide the menu header? */ ++extern gboolean config_theme_hidemenuheader; + /* Titlebar button layout */ + extern gchar *config_title_layout; + +Index: openbox/menuframe.c +=================================================================== +RCS file: /cvs/cvsroot/openbox/openbox/menuframe.c,v +retrieving revision 1.52 +diff -u -p -r1.52 menuframe.c +--- openbox/menuframe.c 14 Sep 2005 17:40:47 -0000 1.52 ++++ openbox/menuframe.c 16 Apr 2006 18:29:18 -0000 +@@ -61,7 +61,7 @@ ObMenuFrame* menu_frame_new(ObMenu *menu + self->type = Window_Menu; + self->menu = menu; + self->selected = NULL; +- self->show_title = TRUE; ++ self->show_title = !config_theme_hidemenuheader; + self->client = client; + + attr.event_mask = FRAME_EVENTMASK; diff --git a/x11-wm/openbox/files/openbox-20060509-pipedsplitgradient.patch b/x11-wm/openbox/files/openbox-20060509-pipedsplitgradient.patch new file mode 100644 index 000000000000..f3de4dd3bd34 --- /dev/null +++ b/x11-wm/openbox/files/openbox-20060509-pipedsplitgradient.patch @@ -0,0 +1,256 @@ +Index: openbox/openbox.c +=================================================================== +RCS file: /cvs/cvsroot/openbox/openbox/openbox.c,v +retrieving revision 1.130 +diff -p -u -r1.130 openbox.c +--- openbox/openbox.c 1 Apr 2005 13:04:55 -0000 1.130 ++++ openbox/openbox.c 19 Feb 2006 22:21:25 -0000 +@@ -163,7 +163,7 @@ gint main(gint argc, gchar **argv) + cursors[OB_CURSOR_BUSY] = + XCreateFontCursor(ob_display, XC_watch); + cursors[OB_CURSOR_MOVE] = +- XCreateFontCursor(ob_display, XC_fleur); ++ XCreateFontCursor(ob_display, XC_cross); + cursors[OB_CURSOR_NORTH] = + XCreateFontCursor(ob_display, XC_top_side); + cursors[OB_CURSOR_NORTHEAST] = +Index: render/gradient.c +=================================================================== +RCS file: /cvs/cvsroot/openbox/render/gradient.c,v +retrieving revision 1.45 +diff -p -u -r1.45 gradient.c +--- render/gradient.c 15 Oct 2003 03:59:35 -0000 1.45 ++++ render/gradient.c 19 Feb 2006 22:21:26 -0000 +@@ -24,6 +24,7 @@ + + static void highlight(RrPixel32 *x, RrPixel32 *y, gboolean raised); + static void gradient_solid(RrAppearance *l, gint w, gint h); ++static void gradient_split(RrAppearance *a, gint w, gint h); + static void gradient_vertical(RrSurface *sf, gint w, gint h); + static void gradient_horizontal(RrSurface *sf, gint w, gint h); + static void gradient_diagonal(RrSurface *sf, gint w, gint h); +@@ -41,6 +42,9 @@ void RrRender(RrAppearance *a, gint w, g + case RR_SURFACE_SOLID: + gradient_solid(a, w, h); + break; ++ case RR_SURFACE_SPLIT: ++ gradient_split(a, w, h); ++ break; + case RR_SURFACE_VERTICAL: + gradient_vertical(&a->surface, w, h); + break; +@@ -60,7 +64,7 @@ void RrRender(RrAppearance *a, gint w, g + g_assert_not_reached(); /* unhandled gradient */ + return; + } +- ++ + if (a->surface.interlaced) { + gint i; + RrPixel32 *p; +@@ -76,7 +80,7 @@ void RrRender(RrAppearance *a, gint w, g + for (x = 0; x < w; ++x, ++p) + *p = current; + } +- ++ + if (a->surface.relief == RR_RELIEF_FLAT && a->surface.border) { + r = a->surface.border_color->r; + g = a->surface.border_color->g; +@@ -132,11 +136,11 @@ static void highlight(RrPixel32 *x, RrPi + down = x; + } + r = (*up >> RrDefaultRedOffset) & 0xFF; +- r += r >> 1; ++ r += r >> 2; + g = (*up >> RrDefaultGreenOffset) & 0xFF; +- g += g >> 1; ++ g += g >> 2; + b = (*up >> RrDefaultBlueOffset) & 0xFF; +- b += b >> 1; ++ b += b >> 2; + if (r > 0xFF) r = 0xFF; + if (g > 0xFF) g = 0xFF; + if (b > 0xFF) b = 0xFF; +@@ -144,12 +148,15 @@ static void highlight(RrPixel32 *x, RrPi + + (b << RrDefaultBlueOffset); + + r = (*down >> RrDefaultRedOffset) & 0xFF; +- r = (r >> 1) + (r >> 2); ++ r = (r >> 1) + (r >> 2) * 1.6; + g = (*down >> RrDefaultGreenOffset) & 0xFF; +- g = (g >> 1) + (g >> 2); ++ g = (g >> 1) + (g >> 2) * 1.6; + b = (*down >> RrDefaultBlueOffset) & 0xFF; +- b = (b >> 1) + (b >> 2); +- *down = (r << RrDefaultRedOffset) + (g << RrDefaultGreenOffset) ++ b = (b >> 1) + (b >> 2) * 1.6; ++ if (r > 0xFF) r = 0xFF; ++ if (g > 0xFF) g = 0xFF; ++ if (b > 0xFF) b = 0xFF; ++ *down = (r << RrDefaultRedOffset) + (g << RrDefaultGreenOffset) + + (b << RrDefaultBlueOffset); + } + +@@ -159,11 +166,11 @@ static void create_bevel_colors(RrAppear + + /* light color */ + r = l->surface.primary->r; +- r += r >> 1; ++ r += r >> 2; + g = l->surface.primary->g; +- g += g >> 1; ++ g += g >> 2; + b = l->surface.primary->b; +- b += b >> 1; ++ b += b >> 2; + if (r > 0xFF) r = 0xFF; + if (g > 0xFF) g = 0xFF; + if (b > 0xFF) b = 0xFF; +@@ -172,11 +179,11 @@ static void create_bevel_colors(RrAppear + + /* dark color */ + r = l->surface.primary->r; +- r = (r >> 1) + (r >> 2); ++ r = (r >> 1) + (r >> 2) * 1.6; + g = l->surface.primary->g; +- g = (g >> 1) + (g >> 2); ++ g = (g >> 1) + (g >> 2) * 1.6; + b = l->surface.primary->b; +- b = (b >> 1) + (b >> 2); ++ b = (b >> 1) + (b >> 2) * 1.6; + g_assert(!l->surface.bevel_dark); + l->surface.bevel_dark = RrColorNew(l->inst, r, g, b); + } +@@ -198,7 +205,7 @@ static void gradient_solid(RrAppearance + + XFillRectangle(RrDisplay(l->inst), l->pixmap, RrColorGC(sp->primary), + 0, 0, w, h); +- ++ + if (sp->interlaced) { + for (i = 0; i < h; i += 2) + XDrawLine(RrDisplay(l->inst), l->pixmap, +@@ -359,6 +366,77 @@ static void gradient_solid(RrAppearance + } \ + } + ++static void gradient_split(RrAppearance *a, gint w, gint h) ++{ ++ gint x, y1, y3, r, g, b; ++ RrSurface *sf = &a->surface; ++ RrPixel32 *data = sf->pixel_data; ++ RrPixel32 current; ++ RrColor *primary_light, *secondary_light; ++ ++/* ++ maybe this is a better way, or maybe not! ++ r = sf->primary->r; ++ r = (r >> 1) + (r >> 2) + (r >> 3) ; ++ g = sf->primary->g; ++ g = (g >> 1) + (g >> 2) + (g >> 3); ++ b = sf->primary->b; ++ b = (b >> 1) + (b >> 2) + (b >> 3); ++ primary_dark = RrColorNew(a->inst, r, g, b); ++*/ ++ ++ ++ r = sf->primary->r; ++ r += r >> 2; ++ g = sf->primary->g; ++ g += g >> 2; ++ b = sf->primary->b; ++ b += b >> 2; ++ if (r > 0xFF) r = 0xFF; ++ if (g > 0xFF) g = 0xFF; ++ if (b > 0xFF) b = 0xFF; ++ primary_light = RrColorNew(a->inst, r, g, b); ++ ++ ++ r = sf->secondary->r; ++ r += r >> 4; ++ g = sf->secondary->g; ++ g += g >> 4; ++ b = sf->secondary->b; ++ b += b >> 4; ++ if (r > 0xFF) r = 0xFF; ++ if (g > 0xFF) g = 0xFF; ++ if (b > 0xFF) b = 0xFF; ++ secondary_light = RrColorNew(a->inst, r, g, b); ++ ++ VARS(y1); ++ SETUP(y1, primary_light, sf->primary, (h / 2) -1); ++ ++ VARS(y3); ++ SETUP(y3, sf->secondary, secondary_light, (h / 2) -1); ++ ++ for (y1 = h - 1; y1 > (h / 2) -1; --y1) { /* 0 -> h-1 */ ++ current = COLOR(y1); ++ for (x = w - 1; x >= 0; --x) /* 0 -> w */ ++ *(data++) = current; ++ ++ NEXT(y1); ++ } ++ ++ ++ for (y3 = (h / 2) - 1; y3 > 0; --y3) { ++ current = COLOR(y3); ++ for (x = w - 1; x >= 0; --x) ++ *(data++) = current; ++ ++ NEXT(y3); ++ } ++ ++ current = COLOR(y3); ++ for (x = w - 1; x >= 0; --x) /* 0 -> w */ ++ *(data++) = current; ++} ++ + static void gradient_horizontal(RrSurface *sf, gint w, gint h) + { + gint x, y; +@@ -567,4 +645,3 @@ static void gradient_pyramid(RrSurface * + *(end-x) = current; + *(end-(inw-x)) = current; + } +- +Index: render/render.h +=================================================================== +RCS file: /cvs/cvsroot/openbox/render/render.h,v +retrieving revision 1.57 +diff -p -u -r1.57 render.h +--- render/render.h 15 Jul 2005 14:39:31 -0000 1.57 ++++ render/render.h 19 Feb 2006 22:21:26 -0000 +@@ -61,6 +61,7 @@ typedef enum { + RR_SURFACE_NONE, + RR_SURFACE_PARENTREL, + RR_SURFACE_SOLID, ++ RR_SURFACE_SPLIT, + RR_SURFACE_HORIZONTAL, + RR_SURFACE_VERTICAL, + RR_SURFACE_DIAGONAL, +Index: render/theme.c +=================================================================== +RCS file: /cvs/cvsroot/openbox/render/theme.c,v +retrieving revision 1.76 +diff -p -u -r1.76 theme.c +--- render/theme.c 14 Jul 2005 20:41:24 -0000 1.76 ++++ render/theme.c 19 Feb 2006 22:21:28 -0000 +@@ -904,7 +904,7 @@ RrTheme* RrThemeNew(const RrInstance *in + theme->padding * 2; + } + theme->button_size = theme->label_height - 2; +- theme->grip_width = theme->title_height * 1.5; ++ theme->grip_width = 25; + + return theme; + } +@@ -1200,6 +1200,8 @@ static void parse_appearance(gchar *tex, + *grad = RR_SURFACE_HORIZONTAL; + else if (strstr(tex, "vertical") != NULL) + *grad = RR_SURFACE_VERTICAL; ++ else if (strstr(tex, "split") != NULL) ++ *grad = RR_SURFACE_SPLIT; + else + *grad = RR_SURFACE_DIAGONAL; + } else { diff --git a/x11-wm/openbox/openbox-20060509-r1.ebuild b/x11-wm/openbox/openbox-20060509-r1.ebuild new file mode 100644 index 000000000000..9c31de4259eb --- /dev/null +++ b/x11-wm/openbox/openbox-20060509-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-wm/openbox/openbox-20060509-r1.ebuild,v 1.1 2006/06/01 01:09:15 anarchy Exp $ + +inherit eutils + +DESCRIPTION="Openbox is a standards compliant, fast, light-weight, extensible window manager." +HOMEPAGE="http://icculus.org/openbox/" +SRC_URI="mirror://gentoo/${P}.tar.gz + mirror://gentoo/ob-themes-usability.tar.bz2" + +LICENSE="GPL-2" +SLOT="3" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="pango nls startup-notification xinerama" + +RDEPEND="|| ( ( x11-libs/libXrandr + x11-libs/libXt + xinerama? ( x11-libs/libXinerama ) + ) + virtual/x11 + ) + virtual/xft + >=dev-libs/glib-2 + >=media-libs/fontconfig-2 + >=dev-libs/libxml2-2.0" +DEPEND="${RDEPEND} + || ( ( + xinerama? ( x11-proto/xineramaproto ) + x11-proto/xextproto + x11-proto/xf86vidmodeproto + ) + virtual/x11 + ) + pango? ( x11-libs/pango ) + startup-notification? ( x11-libs/startup-notification ) + dev-util/pkgconfig" + +S=${WORKDIR}/${PN} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${P}-asneeded.patch + epatch ${FILESDIR}/${P}-hideMenuHeader.patch + epatch ${FILESDIR}/${P}-pipedsplitgradient.patch +} + +src_compile() { + econf `use_enable nls` `use_enable pango` `use_enable startup-notification` ${myconf} || die "failed running configure" + emake || die "failed running make" +} + +src_install() { + dodir /etc/X11/Sessions + echo "/usr/bin/openbox" > ${D}/etc/X11/Sessions/openbox + fperms a+x /etc/X11/Sessions/openbox + + insinto /usr/share/xsessions + doins ${FILESDIR}/${PN}.desktop + + make DESTDIR=${D} install || die + dodoc ABOUT-NLS AUTHORS CHANGELOG COMPLIANCE COPYING README + + insinto /usr/share/themes + doins -r ${WORKDIR}/ob-themes-usability/* +} |