[Freeciv-Dev] (PR#15260) GTK2: interface quirks being observer
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15260 >
> [dmarks - Tue Jan 24 08:47:55 2006]:
> - The following should be grayed out since they don't have any function
> when observing: Cities, Units, Economy, Science, Demographics.
Another patch disabling these menu items when the client is not attached
to a player.
hamurAbi
Index: client/gui-gtk-2.0/menu.c
===================================================================
--- client/gui-gtk-2.0/menu.c (revision 12252)
+++ client/gui-gtk-2.0/menu.c (working copy)
@@ -1308,6 +1308,12 @@
menus_set_sensitive("<main>/_Government/_Change Government",
can_client_issue_orders());
+ /* 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/S_paceship",
(game.player_ptr
&& game.player_ptr->spaceship.state != SSHIP_NONE));
|
|