tThe GTK+ client's List/Scores menu now works before game start. - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 3b7155bf19c3555eab4c242b624bc53df2e0d010
(DIR) parent 68d9dbffc47e2b771867806be3fcecd807fafbb4
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Thu, 1 Aug 2002 14:23:13 +0000
The GTK+ client's List/Scores menu now works before game start.
Diffstat:
M TODO | 1 -
M src/gui_client/gtk_client.c | 9 +++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/TODO b/TODO
t@@ -1,4 +1,3 @@
-- Make List/Scores work before game start
- Proper support for UTF-8 network messages and configuration files (e.g
a "UTF8" variable in the configuration file, and a "utf8" network ability)
- Support for "proper" game dates, e.g. mm-dd-yy or dd-mm-yy
(DIR) diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
t@@ -268,7 +268,11 @@ void AbandonGame(GtkWidget *widget, gpointer data)
void ListScores(GtkWidget *widget, gpointer data)
{
- SendClientMessage(ClientData.Play, C_NONE, C_REQUESTSCORE, NULL, NULL);
+ if (InGame) {
+ SendClientMessage(ClientData.Play, C_NONE, C_REQUESTSCORE, NULL, NULL);
+ } else {
+ SendNullClientMessage(ClientData.Play, C_NONE, C_REQUESTSCORE, NULL, NULL);
+ }
}
void ListInventory(GtkWidget *widget, gpointer data)
t@@ -1992,7 +1996,8 @@ void UpdateMenus(void)
(ClientData.Menu, "<main>/Game/Abandon..."),
InGame);
gtk_widget_set_sensitive(gtk_item_factory_get_widget
- (ClientData.Menu, "<main>/List"), InGame);
+ (ClientData.Menu, "<main>/List/Inventory..."),
+ InGame);
gtk_widget_set_sensitive(gtk_item_factory_get_widget
(ClientData.Menu, "<main>/List/Players..."),
InGame && Network);