Re: [Freeciv-Dev] (PR#33445) win32 client build broken (patch attached)

2007-01-21 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=33445 

On 1/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Except for cs.po, the win32 client build was ok.

 Thanks for testing. I have now committed move_type and worklist patches.

 There were a few
 warnings from gcc about things that probably should be cleaned up at
 some point, but I don't think they have anything to do with Marko's
 patches or the patch I originally wrote.

 Patches to fix these welcome. Please open separate bugtracking ticket
for each issue. You can do that by sending email to [EMAIL PROTECTED]
so that subject does not contain any PR# number.

 Finally, the nation selection window doesn't display the nation groups
 properly.  The group names are displayed oddly, (
 ?nationgroup:Ancient for example ) and only the All group actually
 has any nations in it.  The rest are empty.

 Patches welcome. Are these bugs present in S2_1 also?


 - ML



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#33445) win32 client build broken (patch attached)

2007-01-18 Thread Marko Lindqvist

URL: http://bugs.freeciv.org/Ticket/Display.html?id=33445 

 From: Jonathan Landis [EMAIL PROTECTED]

   I wrote a patch for the Win32 client a couple of weeks ago.

 Thanks for the patch, Jonathan.

 I cannot compile and I have not even seen win32 client, but I looked
some of the most obviously correct things from your patch. Attached is
two patches which I split from your patch and reworked a bit.
 I decided that since worklist_report had player pointer only for
accessing worklists and worklists no longer are part of player
structure, whole player pointer should go.
 Could you check that I have not made any mistakes (that it compiles
for example)? I plan to commit these two soon.
 I'll send another patch containing parts of the original patch that
were left out from these. They probably should go in later.


 - ML

diff -Nurd -X.diff_ignore freeciv/client/gui-win32/helpdlg.c freeciv/client/gui-win32/helpdlg.c
--- freeciv/client/gui-win32/helpdlg.c	2006-10-31 18:28:41.0 +0200
+++ freeciv/client/gui-win32/helpdlg.c	2007-01-19 00:41:57.0 +0200
@@ -655,7 +655,7 @@
   
   /* Give tile a background color, based on the type of unit
* FIXME: make a new set of colors for this.   */
-  switch (utype-move_type) {
+  switch (get_unit_move_type(utype)) {
   case LAND_MOVING: bg_color = COLOR_OVERVIEW_LAND;   break;
   case SEA_MOVING:  bg_color = COLOR_OVERVIEW_OCEAN;  break;
   case HELI_MOVING: bg_color = COLOR_OVERVIEW_MY_UNIT;break;
diff -Nurd -X.diff_ignore freeciv/client/gui-win32/menu.c freeciv/client/gui-win32/menu.c
--- freeciv/client/gui-win32/menu.c	2006-10-31 18:28:41.0 +0200
+++ freeciv/client/gui-win32/menu.c	2007-01-19 00:34:58.0 +0200
@@ -602,7 +602,7 @@
   popup_find_dialog();
   break;
 case IDM_GOVERNMENT_WORKLISTS:
-  popup_worklists_report(game.player_ptr);
+  popup_worklists_report();
   break;
 case IDM_GOVERNMENT_REVOLUTION:
   popup_revolution_dialog(NULL);
diff -Nurd -X.diff_ignore freeciv/client/gui-win32/wldlg.c freeciv/client/gui-win32/wldlg.c
--- freeciv/client/gui-win32/wldlg.c	2006-07-17 23:56:51.0 +0300
+++ freeciv/client/gui-win32/wldlg.c	2007-01-19 00:39:09.0 +0200
@@ -37,7 +37,9 @@
 #include log.h
 #include climisc.h
 #include clinet.h
-
+
+#include civclient.h
+
 #include wldlg.h
 #include citydlg.h
 
@@ -124,11 +126,11 @@
 
   /* Fill in the global worklists now?  */
   /* perhaps judicious use of goto would be good here? -mck */
-  if (wl_first  game.player_ptr-worklists[0].is_valid  pcity) {
+  if (wl_first  client.worklists[0].is_valid  pcity) {
 int i;
 
 for (i = 0; i  MAX_NUM_WORKLISTS; i++) {
-  if (game.player_ptr-worklists[i].is_valid) {
+  if (client.worklists[i].is_valid) {
 	dest_wids[wids_used] = wid_encode(FALSE, TRUE, i);
 	wids_used++;
   }
@@ -147,11 +149,11 @@
   }
 
   /* we didn't fill in the global worklists above */
-  if (!wl_first  game.player_ptr-worklists[0].is_valid  pcity) {
+  if (!wl_first  client.worklists[0].is_valid  pcity) {
 int i;
 
 for (i = 0; i  MAX_NUM_WORKLISTS; i++) {
-  if (game.player_ptr-worklists[i].is_valid) {
+  if (client.worklists[i].is_valid) {
 dest_wids[wids_used] = wid_encode(FALSE, TRUE, i);
 wids_used++;
   }
@@ -169,7 +171,6 @@
 struct worklist_report {
   HWND win;
   HWND list;
-  struct player *pplr;
   char worklist_names[MAX_NUM_WORKLISTS][MAX_LEN_NAME];
   char *worklist_names_ptrs[MAX_NUM_WORKLISTS + 1];
   struct worklist *worklist_ptr[MAX_NUM_WORKLISTS];
@@ -235,10 +236,10 @@
   int i, n;
 
   for (i = 0, n = 0; i  MAX_NUM_WORKLISTS; i++) {
-if (preport-pplr-worklists[i].is_valid) {
-  strcpy(preport-worklist_names[n], preport-pplr-worklists[i].name);
+if (client.worklists[i].is_valid) {
+  strcpy(preport-worklist_names[n], client.worklists[i].name);
   preport-worklist_names_ptrs[n] = preport-worklist_names[n];
-  preport-worklist_ptr[n] = preport-pplr-worklists[i];
+  preport-worklist_ptr[n] = client.worklists[i];
 
   n++;
 }
@@ -268,18 +269,18 @@
 
   /* Look for the last free worklist */
   for (i = 0; i  MAX_NUM_WORKLISTS; i++)
-if (!preport-pplr-worklists[i].is_valid)
+if (!client.worklists[i].is_valid)
   break;
 
   for (j = sel; j  i - 1; j++) {
-copy_worklist(preport-pplr-worklists[j],
-  preport-pplr-worklists[j + 1]);
+copy_worklist(client.worklists[j],
+  client.worklists[j + 1]);
   }
 
   /* The last worklist in the set is no longer valid -- it's been slid up
* one slot. */
-  preport-pplr-worklists[i-1].is_valid = FALSE;
-  strcpy(preport-pplr-worklists[i-1].name, \0);
+  client.worklists[i-1].is_valid = FALSE;
+  strcpy(client.worklists[i-1].name, \0);
 
   global_list_update(preport);
 }
@@ -292,9 +293,9 @@
   struct worklist_report *preport = (struct worklist_report *) data;
 
   if (preport) {

Re: [Freeciv-Dev] (PR#33445) win32 client build broken (patch attached)

2007-01-18 Thread [EMAIL PROTECTED]

URL: http://bugs.freeciv.org/Ticket/Display.html?id=33445 

I will test the win32 client build this weekend.

JKL

On 1/18/07, Marko Lindqvist [EMAIL PROTECTED] wrote:

 URL: http://bugs.freeciv.org/Ticket/Display.html?id=33445 

 On 1/19/07, Marko Lindqvist [EMAIL PROTECTED] wrote:
   I'll send another patch containing parts of the original patch that
  were left out from these. They probably should go in later.

  Here


  - ML







___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev