Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2006:
[Freeciv-Dev] (PR#15260) GTK2: interface quirks being observer
Home

[Freeciv-Dev] (PR#15260) GTK2: interface quirks being observer

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: markstedt@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#15260) GTK2: interface quirks being observer
From: "Guest" <rt-guest@xxxxxxxxxxx>
Date: Sun, 13 Aug 2006 06:26:15 -0700
Reply-to: bugs@xxxxxxxxxxx

<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));

[Prev in Thread] Current Thread [Next in Thread]