1 diff -Nur FSViewer.app-0.2.5-alt/src/FSBrowser.c FSViewer.app-0.2.5/src/FSBrowser.c
2 --- FSViewer.app-0.2.5-alt/src/FSBrowser.c Thu Dec 19 21:26:35 2002
3 +++ FSViewer.app-0.2.5/src/FSBrowser.c Mon Dec 23 15:11:58 2002
6 W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x,
7 (bPtr->titleHeight-WMFontHeight(scr->boldFont))/2,
8 - bPtr->columnSize.width, WACenter, WMColorGC(scr->white),
9 + bPtr->columnSize.width, WACenter, WMWhiteColor(scr),
10 False, titleBuf, titleLen);
13 W_PaintText(bPtr->view, bPtr->view->window, scr->boldFont, x,
14 (bPtr->titleHeight-WMFontHeight(scr->boldFont))/2,
15 - bPtr->columnSize.width, WACenter, WMColorGC(scr->white),
16 + bPtr->columnSize.width, WACenter, WMWhiteColor(scr),
17 False, bPtr->titles[column], titleLen);
24 -paintItem(WMList *lPtr, int index, Drawable d, char *text, int state,
25 +paintItem(WMList *lPtr, int index, Drawable d, char *text, int state,
28 WMView *view = W_VIEW(lPtr);
30 /* WMListItem *item; */
32 /* item = WMGetListItem(lPtr, index); */
35 width = rect->size.width;
36 height = rect->size.height;
40 if (state & WLDSSelected)
41 - XFillRectangle(scr->display, d, WMColorGC(scr->white), x, y,
42 + WMPaintColorSwatch(WMWhiteColor(scr), d, x, y,
44 -/* else if(item->uflags & 1) */
45 -/* XFillRectangle(scr->display, d, WMColorGC(WMCreateNamedColor(scr, "yellow", False)), x, y, width, height); */
47 - XClearArea(scr->display, d, x, y, width, height, False);
48 + WMPaintColorSwatch(WMGetWidgetBackgroundColor(lPtr), d, x, y,
52 /* Avoid overlaping... */
54 char *textBuf = createTruncatedString(scr->normalFont,
55 text, &textLen, widthC);
56 W_PaintText(view, d, scr->normalFont, x+4, y, widthC,
57 - WALeft, WMColorGC(scr->black), False, textBuf, textLen);
58 + WALeft, WMBlackColor(scr), False, textBuf, textLen);
61 - W_PaintText(view, d, scr->normalFont, x+4, y, widthC,
62 - WALeft, WMColorGC(scr->black), False, text, textLen);
63 + W_PaintText(view, d, scr->normalFont, x+4, y, widthC,
64 + WALeft, WMBlackColor(scr), False, text, textLen);
68 diff -Nur FSViewer.app-0.2.5-alt/src/FSFileButton.c FSViewer.app-0.2.5/src/FSFileButton.c
69 --- FSViewer.app-0.2.5-alt/src/FSFileButton.c Thu Dec 19 21:26:35 2002
70 +++ FSViewer.app-0.2.5/src/FSFileButton.c Mon Dec 23 14:52:07 2002
74 W_PaintText(view, d, screen->normalFont, x+ix, y+iy,
75 - strwidth, WACenter, WMColorGC(screen->black),
76 + strwidth, WACenter, WMBlackColor(screen),
77 True, text, strlen(text));
81 XSetWindowBackgroundPixmap(WMScreenDisplay(scr), view->window, pix);
82 XClearWindow(WMScreenDisplay(scr), view->window);
83 W_PaintText(view, pix, scr->normalFont, 2, 1, width, WACenter,
84 - WMColorGC(scr->black), False, text, len);
85 + WMBlackColor(scr), False, text, len);
87 XFreePixmap(scr->display, pix);
89 diff -Nur FSViewer.app-0.2.5-alt/src/FSMCList.c FSViewer.app-0.2.5/src/FSMCList.c
90 --- FSViewer.app-0.2.5-alt/src/FSMCList.c Thu Dec 19 21:26:35 2002
91 +++ FSViewer.app-0.2.5/src/FSMCList.c Mon Dec 23 15:13:14 2002
97 + FileInfo *start = NULL;
99 FSMCList *mPtr = (FSMCList *)(WMGetHangedData(bPtr));
100 WMList *list = FSGetBrowserListInColumn(bPtr, column);
102 if (width >= 3*dLen) {
104 int tmpTextLen = *textLen;
107 strcpy(textBuf, text);
109 && (WMWidthOfString(font, textBuf, tmpTextLen)+dddLen > width))
114 -paintItem(WMList *lPtr, int index, Drawable d,
115 +paintItem(WMList *lPtr, int index, Drawable d,
116 char *text, int state, WMRect *rect)
119 @@ -450,17 +450,18 @@
122 fontHeight = WMFontHeight(scr->normalFont);
125 /* Highlight the selected area */
126 if (state & WLDSSelected)
127 - XFillRectangle(scr->display, d, WMColorGC(scr->white),
128 - x, y, width, height);
129 + WMPaintColorSwatch(WMWhiteColor(scr), d, x, y,
132 - XClearArea(scr->display, d, x, y, width, height, False);
133 + WMPaintColorSwatch(WMGetWidgetBackgroundColor(lPtr), d, x, y,
138 - str = wstrdup(item->clientData);
139 + str = wstrdup(item->clientData);
143 @@ -513,10 +514,10 @@
145 image = WMCreatePixmapFromXPMData(scr, list_file_xpm);
146 size = WMGetPixmapSize(image);
147 - WMDrawPixmap(image, d,
148 + WMDrawPixmap(image, d,
149 x+6+(20-size.width)/2, (height-size.height)/2+y);
150 WMReleasePixmap(image);
156 @@ -527,52 +528,52 @@
158 tmpStr = wstrdup("F");
160 - W_PaintText(view, d, scr->boldFont,
161 + W_PaintText(view, d, scr->boldFont,
162 x+6, y+(height-fontHeight)/2, widthC,
163 - WALeft, WMColorGC(scr->darkGray), False,
164 + WALeft, WMDarkGrayColor(scr), False,
170 - if (WMWidthOfString(scr->normalFont, items[i], textLen) > widthC)
172 + if (WMWidthOfString(scr->normalFont, items[i], textLen) > widthC)
174 char *textBuf = createTruncatedString(scr->normalFont,
175 - items[i], &textLen,
176 + items[i], &textLen,
179 - W_PaintText(view, d, scr->normalFont,
181 + W_PaintText(view, d, scr->normalFont,
182 x+26, y+(height-fontHeight)/2, widthC,
183 - WALeft, WMColorGC(scr->black), False,
184 + WALeft, WMBlackColor(scr), False,
192 - W_PaintText(view, d, scr->normalFont,
193 + W_PaintText(view, d, scr->normalFont,
194 x+26, y+(height-fontHeight)/2, widthC,
195 - WALeft, WMColorGC(scr->black), False, items[i],
196 + WALeft, WMBlackColor(scr), False, items[i],
204 - W_PaintText(view, d, scr->normalFont,
205 + W_PaintText(view, d, scr->normalFont,
206 x+6, y+(height-fontHeight)/2, 100,
207 - WALeft, WMColorGC(scr->black), False, items[i],
208 + WALeft, WMBlackColor(scr), False, items[i],
214 - W_PaintText(view, d, scr->normalFont,
215 + W_PaintText(view, d, scr->normalFont,
216 x+6, y+(height-fontHeight)/2, 82,
217 - WALeft, WMColorGC(scr->black), False, items[i],
218 + WALeft, WMBlackColor(scr), False, items[i],
226 diff -Nur FSViewer.app-0.2.5-alt/src/FSPrefs.c FSViewer.app-0.2.5/src/FSPrefs.c
227 --- FSViewer.app-0.2.5-alt/src/FSPrefs.c Thu Dec 19 21:26:35 2002
228 +++ FSViewer.app-0.2.5/src/FSPrefs.c Mon Dec 23 15:14:09 2002
229 @@ -1913,25 +1913,26 @@
230 WMListItem *item = WMGetListItem(lPtr, index);
233 - XFillRectangle(scr->display, view->window, WMColorGC(scr->white),
234 - rect->pos.x, rect->pos.y,
235 + WMPaintColorSwatch(WMWhiteColor(scr), d,
236 + rect->pos.x, rect->pos.y,
237 rect->size.width, rect->size.height);
239 - XClearArea(scr->display, view->window, rect->pos.x, rect->pos.y,
240 - rect->size.width, rect->size.height, False);
241 + WMPaintColorSwatch(WMGetWidgetBackgroundColor(lPtr), d,
242 + rect->pos.x, rect->pos.y,
243 + rect->size.width, rect->size.height);
247 - W_PaintText(view, view->window, scr->boldFont,
248 + W_PaintText(view, d, scr->boldFont,
249 rect->pos.x+4, rect->pos.y, rect->size.width,
250 - WALeft, WMColorGC(scr->black), False,
251 + WALeft, WMBlackColor(scr), False,
252 item->text, strlen(item->text));
256 - W_PaintText(view, view->window, scr->normalFont,
257 + W_PaintText(view, d, scr->normalFont,
258 rect->pos.x+4, rect->pos.y, rect->size.width,
259 - WALeft, WMColorGC(scr->black), False,
260 + WALeft, WMBlackColor(scr), False,
261 item->text, strlen(item->text));
264 diff -Nur FSViewer.app-0.2.5-alt/src/FSUtils.c FSViewer.app-0.2.5/src/FSUtils.c
265 --- FSViewer.app-0.2.5-alt/src/FSUtils.c Thu Dec 19 21:26:35 2002
266 +++ FSViewer.app-0.2.5/src/FSUtils.c Mon Dec 23 14:55:35 2002
268 clone = RMakeCenteredImage(image, 64, 64, &color1);
269 pixmap = WMCreatePixmapFromRImage(scr, clone, 0);
271 - RDestroyImage(image);
272 - RDestroyImage(clone);
273 + RReleaseImage(image);
274 + RReleaseImage(clone);
278 @@ -1028,8 +1028,8 @@
279 pixmap = WMCreatePixmapFromRImage(scr, clone, 0);
282 - RDestroyImage(clone);
283 - RDestroyImage(image);
284 + RReleaseImage(clone);
285 + RReleaseImage(image);
289 @@ -1068,7 +1068,7 @@
290 RClearImage(image, &color);
291 pixmap = WMCreatePixmapFromRImage(scr, image, 0);
293 - RDestroyImage(image);
294 + RReleaseImage(image);
298 diff -Nur FSViewer.app-0.2.5-alt/src/timestampWidget.c FSViewer.app-0.2.5/src/timestampWidget.c
299 --- FSViewer.app-0.2.5-alt/src/timestampWidget.c Thu Dec 19 21:26:35 2002
300 +++ FSViewer.app-0.2.5/src/timestampWidget.c Mon Dec 23 14:52:07 2002
310 WMCreateEventHandler(timestamp->view, ExposureMask | StructureNotifyMask, handleEvents, timestamp);
312 /* Default GC for paint. */
313 - timestamp->gc = WMColorGC(scr->gray);
314 + timestamp->color = WMGrayColor(scr);
315 + timestamp->gc = WMColorGC(timestamp->color);
317 W_ResizeView(timestamp->view, TIMESTAMP_MIN_WIDTH, TIMESTAMP_MIN_HEIGHT);
318 DEBUG_PRINT("Resized View");
319 @@ -668,14 +670,14 @@
321 W_PaintTextAndImage(timestamp->view,
334 DEBUG_PRINT("Painted image");