comparison draw.c @ 178:e848966a1ac6

removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
author arg@10ksloc.org
date Thu, 03 Aug 2006 12:12:26 +0200
parents 1db04019684e
children e4bfe46c7910
comparison
equal deleted inserted replaced
177:e890cee887d1 178:e848966a1ac6
112 dc.x = dc.y = 0; 112 dc.x = dc.y = 0;
113 dc.w = bw; 113 dc.w = bw;
114 drawtext(NULL, !istile, False); 114 drawtext(NULL, !istile, False);
115 115
116 dc.w = 0; 116 dc.w = 0;
117 for(i = 0; i < TLast; i++) { 117 for(i = 0; i < ntags; i++) {
118 dc.x += dc.w; 118 dc.x += dc.w;
119 dc.w = textw(tags[i]); 119 dc.w = textw(tags[i]);
120 if(istile) 120 if(istile)
121 drawtext(tags[i], (i == tsel), True); 121 drawtext(tags[i], (i == tsel), True);
122 else 122 else
151 XMapWindow(dpy, c->title); 151 XMapWindow(dpy, c->title);
152 152
153 dc.x = dc.y = 0; 153 dc.x = dc.y = 0;
154 154
155 dc.w = 0; 155 dc.w = 0;
156 for(i = 0; i < TLast; i++) { 156 for(i = 0; i < ntags; i++) {
157 if(c->tags[i]) { 157 if(c->tags[i]) {
158 dc.x += dc.w; 158 dc.x += dc.w;
159 dc.w = textw(tags[i]); 159 dc.w = textw(tags[i]);
160 drawtext(tags[i], !istile, True); 160 drawtext(tags[i], !istile, True);
161 } 161 }