This patch removes the unused code in the function makeTitledIcon().
The arguments are not used, so are removed to avoid compiler warnings.
---
WPrefs.app/WPrefs.c | 66 ++---------------------------------------------------
1 file changed, 2 insertions(+), 64 deletions(-)
diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c
index 7afa42e..138030f 100644
--- a/WPrefs.app/WPrefs.c
+++ b/WPrefs.app/WPrefs.c
@@ -443,71 +443,9 @@ void CreateImages(WMScreen *scr, RContext *rc, RImage
*xis, const char *file,
}
-static WMPixmap *makeTitledIcon(WMScreen * scr, WMPixmap * icon, const char
*title1, const char *title2)
+static WMPixmap *makeTitledIcon(WMPixmap *icon)
{
return WMRetainPixmap(icon);
-
-#if 0
- static GC gc = NULL;
- static XFontStruct *hfont = NULL;
- static XFontStruct *vfont = NULL;
- WMPixmap *tmp;
- Pixmap pix, mask;
- Display *dpy = WMScreenDisplay(scr);
- WMColor *black = WMBlackColor(scr);
- GC fgc;
- WMSize size = WMGetPixmapSize(icon);
-
- tmp = WMCreatePixmap(scr, 60, 60, WMScreenDepth(scr), True);
-
- pix = WMGetPixmapXID(tmp);
- mask = WMGetPixmapMaskXID(tmp);
-
- if (gc == NULL) {
- gc = XCreateGC(dpy, mask, 0, NULL);
-
- hfont = XLoadQueryFont(dpy, ICON_TITLE_FONT);
- vfont = XLoadQueryFont(dpy, ICON_TITLE_VFONT);
- }
-
- if (hfont == NULL) {
- return WMRetainPixmap(icon);
- }
-
- XSetForeground(dpy, gc, 0);
- XFillRectangle(dpy, mask, gc, 0, 0, 60, 60);
-
- fgc = WMColorGC(black);
-
- XSetForeground(dpy, gc, 1);
-
- XCopyArea(dpy, WMGetPixmapXID(icon), pix, fgc, 0, 0, size.width,
size.height, 12, 12);
-
- if (WMGetPixmapMaskXID(icon) != None)
- XCopyPlane(dpy, WMGetPixmapMaskXID(icon), mask, gc, 0, 0,
size.width, size.height, 12, 12, 1);
- else
- XFillRectangle(dpy, mask, gc, 12, 12, 48, 48);
-
- if (title1) {
- XSetFont(dpy, fgc, vfont->fid);
- XSetFont(dpy, gc, vfont->fid);
-
- XDrawString(dpy, pix, fgc, 0, vfont->ascent, title1,
strlen(title1));
-
- XDrawString(dpy, mask, gc, 0, vfont->ascent, title1,
strlen(title1));
- }
-
- if (title2) {
- XSetFont(dpy, fgc, hfont->fid);
- XSetFont(dpy, gc, hfont->fid);
-
- XDrawString(dpy, pix, fgc, (title1 ? 12 : 0), hfont->ascent,
title2, strlen(title2));
-
- XDrawString(dpy, mask, gc, (title1 ? 12 : 0), hfont->ascent,
title2, strlen(title2));
- }
-
- return tmp;
-#endif
}
void SetButtonAlphaImage(WMScreen * scr, WMButton * bPtr, const char *file,
const char *title1, const char *title2)
@@ -532,7 +470,7 @@ void SetButtonAlphaImage(WMScreen * scr, WMButton * bPtr,
const char *file, cons
}
if (icon) {
- icon2 = makeTitledIcon(scr, icon, title1, title2);
+ icon2 = makeTitledIcon(icon);
if (icon)
WMReleasePixmap(icon);
} else {
--
1.8.5.2
--
To unsubscribe, send mail to [email protected].