With the fonts I use here, the memory information line in the "Info panel"
did not fit inside the window. So make that line a bit shorter by displaying

        Total memory allocated / used: 2600 kB / 2182 kB

instead of

        Total allocated memory: 2600 kB. Total memory in use: 2182 kB.

Furthermore, the surrounding code was a bit convoluted to display either

"Additional support for: WMSPEC"

or

"Additional support for: WMSPEC and MW"

As WMSPEC is always present and it doesn't seem we are adding more stuff
to support, one can do the same with a shorter code which reads a little
bit better.

Signed-off-by: Carlos R. Mafra <[email protected]>
---
 src/dialog.c |   25 +++----------------------
 1 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/src/dialog.c b/src/dialog.c
index 904eac3..4799c9a 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -1230,7 +1230,7 @@ void wShowInfoPanel(WScreen * scr)
        {
                struct mallinfo ma = mallinfo();
                snprintf(buffer, sizeof(buffer),
-                        _("Total allocated memory: %i kB. Total memory in use: 
%i kB.\n"),
+                        _("Total memory allocated / used: %i kB / %i kB.\n"),
                         (ma.arena + ma.hblkhd) / 1024, (ma.uordblks + 
ma.hblkhd) / 1024);
 
                strbuf = wstrappend(strbuf, buffer);
@@ -1244,30 +1244,11 @@ void wShowInfoPanel(WScreen * scr)
                strbuf = wstrappend(strbuf, " ");
        }
 
-       strbuf = wstrappend(strbuf, _("\nAdditional support for: "));
-       {
-               char *list[9];
-               char buf[80];
-               int j = 0;
-
-               list[j++] = "WMSPEC";
+       strbuf = wstrappend(strbuf, _("\nAdditional support for: WMSPEC"));
 #ifdef MWM_HINTS
-               list[j++] = "MWM";
+       strbuf = wstrappend(strbuf, " and MWM");
 #endif
 
-               buf[0] = 0;
-               for (i = 0; i < j; i++) {
-                       if (i > 0) {
-                               if (i == j - 1)
-                                       strcat(buf, _(" and "));
-                               else
-                                       strcat(buf, ", ");
-                       }
-                       strcat(buf, list[i]);
-               }
-               strbuf = wstrappend(strbuf, buf);
-       }
-
 #ifdef XINERAMA
        strbuf = wstrappend(strbuf, _("\n"));
 #ifdef SOLARIS_XINERAMA
-- 
1.7.3.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to