Update of /cvsroot/netrek/client/netrekxp/src
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24856

Modified Files:
	ranklist.c socket.c 
Log Message:
Resize rank window upon receiving  rank data from the
server, rather than every time rank window is opened.

Index: ranklist.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/ranklist.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ranklist.c	25 May 2009 14:43:53 -0000	1.7
+++ ranklist.c	25 May 2009 17:00:53 -0000	1.8
@@ -78,8 +78,6 @@
     register int i;
     char    buf[80];
 
-    W_ResizeTextWindow(rankw, 65, nranks2 + 8);
-
     (void) strcpy(buf, "  Rank       genocides  DI    battle strategy  special ships");
     W_WriteText(rankw, 1, 1, textColor, buf, strlen(buf), W_BoldFont);
     for (i = 0; i < nranks2; i++) {
@@ -117,7 +115,7 @@
     char buf[100];
 
     /* W_ClearWindow(rankw); */
-    W_ResizeTextWindow(rankw, 80, nranks2 + 9);
+
     (void) strcpy (buf, "  Rank       Hours  Offense  Ratings      DI");
     W_WriteText (rankw, 1, 1, textColor, buf, strlen (buf), W_BoldFont);
     for (i = 0; i < nranks; i++)

Index: socket.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- socket.c	25 May 2009 14:43:53 -0000	1.60
+++ socket.c	25 May 2009 17:00:53 -0000	1.61
@@ -2830,6 +2830,7 @@
         ranks[nranks].name = strdup("blank");
         ranks[nranks].cname = strdup("UNKN");
         nranks++;
+        W_ResizeTextWindow(rankw, 80, nranks + 9);
     }
     rankn = packet->rankn;
     STRNCPY(ranks[rankn].name, packet->name, 11);
@@ -3772,6 +3773,8 @@
     reinitialize_royal();
 
     resize_players();
+    // Resize rank window
+    W_ResizeTextWindow(rankw, 65, nranks2 + 8);
     // Reinit playerlist - necessary as max number of players (nplayers) may have changed
     InitPlayerList();
     initialize_torps();