[Freeciv-Dev] (PR#39455)

2007-07-14 Thread Ulrik Sverdrup

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

Caused by the checkin in #15260. Here is a patch that works with both
the 2.1 and trunk branches.
Index: client/gui-gtk-2.0/menu.c
===
--- client/gui-gtk-2.0/menu.c	(revision 13101)
+++ client/gui-gtk-2.0/menu.c	(arbetskopia)
@@ -1270,6 +1270,7 @@
 const char *path =
   menu_path_remove_uline(main/_Government/_Change Government);
 GtkWidget *parent = gtk_item_factory_get_widget(item_factory, path);
+bool attached_to_player = (game.player_ptr != NULL);
 
 if (parent) {
   GList *list, *iter;
@@ -1326,11 +1327,11 @@
 
 /* If the client is not attached to a player these reports are
  * disabled. */
-menus_set_sensitive(main/_Reports/_Cities, game.player_ptr);
-menus_set_sensitive(main/_Reports/_Units, game.player_ptr);
-menus_set_sensitive(main/_Reports/_Economy, game.player_ptr);
-menus_set_sensitive(main/_Reports/_Science, game.player_ptr);
-menus_set_sensitive(main/_Reports/_Demographics, game.player_ptr);
+menus_set_sensitive(main/_Reports/_Cities, attached_to_player);
+menus_set_sensitive(main/_Reports/_Units, attached_to_player);
+menus_set_sensitive(main/_Reports/_Economy, attached_to_player);
+menus_set_sensitive(main/_Reports/_Science, attached_to_player);
+menus_set_sensitive(main/_Reports/_Demographics, attached_to_player);
 menus_set_sensitive(main/_Reports/S_paceship,
 			(game.player_ptr
 			  game.player_ptr-spaceship.state != SSHIP_NONE));
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#39455) Warning: makes integer from pointer without a cast in menu.c

2007-07-14 Thread Pepeto _

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

 [engla - Sam. Jul. 14 11:20:57 2007]:
 
 Caused by the checkin in #15260. Here is a patch that works with both
 the 2.1 and trunk branches.
 

This patch looks very better. Thank you

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


Re: [Freeciv-Dev] (PR#39455) Warning: makes integer from pointer without a cast in menu.c

2007-07-14 Thread William Allen Simpson

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

Ulrik Sverdrup wrote:
 Thanks. You can check in that patch early since I broke the build; or
 I can take care of it with your permission.
 
Generally, compile bugs should be checked in as fast as possible, by
whomever finds and fixes them.  Seems fine to me.



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


[Freeciv-Dev] (PR#39455) Warning: makes integer from pointer without a cast in menu.c

2007-07-14 Thread Ulrik Sverdrup

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

Committed patch to 2.1 as r13102 and trunk as r13103

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