--- ./globals.c.00 2007-02-18 13:57:59.000000000 +0100 +++ ./globals.c 2007-02-18 14:00:27.000000000 +0100 @@ -27,9 +27,9 @@ char umountcmd[STR] = ""; char ejectcmd[STR] = ""; char opencmd[STR] = "x-terminal-emulator -e mc %s &"; -char txtfont[STR] = "-*-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*"; +char txtfont[STR] = "-*-lucida-bold-r-*-*-10-*-*-*-*-*-*-*"; char txtcolor[STR] = "gray90"; -char capfont[STR] = "-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"; +char capfont[STR] = "-*-lucida-medium-r-*-*-10-*-*-*-*-*-*-*"; char capcolor[STR] = "gray90"; char icondir[STR] = ICONDIR; char initialMnt[STR] = ""; --- ./mount.c.00 2007-02-18 13:57:59.000000000 +0100 +++ ./mount.c 2007-02-18 14:04:15.000000000 +0100 @@ -862,42 +862,54 @@ /* Copy icon */ if (ai->icoIsLoaded[mp->icon]) XCopyArea(dpy, ai->icons[mp->icon], disp, WinGC, - 0, 0, 32, 10, 25, 30); + 0, 0, 32, 32, 25, 8); if (mp->isMounted && (mp->showCap != CAPACITY_NONE)) { /* Draw capacity text */ char capstr[20]; - char sizestr[18]; + char sizestr[16]; + char *p = capstr; + int cap,k=13; switch (mp->showCap) { case CAPACITY_PFULL: - sprintf(capstr, "%d%%", mp->currentCap); + case CAPACITY_MFULL: + sprintf(capstr, "%03d", mp->currentCap); + cap = mp->currentCap; break; case CAPACITY_PEMPTY: - sprintf(capstr, "%d%%", 100 - mp->currentCap); - break; - case CAPACITY_MFULL: - format_size(sizestr, (mp->totalSize - mp->freeSize)); - if (ai->descriptChar) - sprintf(capstr, "> %s", sizestr); - else - sprintf(capstr, "%s", sizestr); - break; - case CAPACITY_MEMPTY: - format_size(sizestr, (mp->availSize)); - if (ai->descriptChar) - sprintf(capstr, "< %s", sizestr); - else - sprintf(capstr, "%s", sizestr); + case CAPACITY_MEMPTY: + sprintf(capstr, "%03d", 100 - mp->currentCap); + cap = 100 - mp->currentCap; break; } - XSetFont(dpy, WinGC, gcf2); - XSetForeground(dpy, WinGC, gcc2); - XDrawString(dpy, disp, WinGC, txtx2, txty2, (char *)capstr, - strlen(capstr)); + if (cap==100) + { + XCopyArea(dpy, buttons, disp, WinGC, + 7, 33, 6, 7, 13, 49); + XCopyArea(dpy, buttons, disp, WinGC, + 1, 33, 6, 7, 19, 49); + XCopyArea(dpy, buttons, disp, WinGC, + 1, 33, 6, 7, 25, 49); + } else { + XCopyArea(dpy, buttons, disp, WinGC, + 1, 40, 6, 7, 13, 49); + p++; + if ((*p-'0')==0) + { + XCopyArea(dpy, buttons, disp, WinGC, 1, 40, 6, 7, 19, 49); + } else { + XCopyArea(dpy, buttons, disp, WinGC, + (*p-'0')*6 + 1, 33, 6, 7, 19, 49); + } + p++; + + XCopyArea(dpy, buttons, disp, WinGC, + (*p-'0')*6 + 1, 33, 6, 7, 25, 49); + } } /* Draw mountpoint name text */