tFights and price updates from the server now automatically close the Deal Drug… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit f4141e21da25856e0fdfcb7fd5fcae2e1a39f23f | |
parent ef70d3474564a761ea46da48a1ed8843b6386a67 | |
Author: Ben Webb <[email protected]> | |
Date: Sat, 6 Apr 2002 19:56:08 +0000 | |
Fights and price updates from the server now automatically close the Deal | |
Drugs dialog, to reduce clutter and to make sure prices do not get out of | |
sync, respectively. | |
Diffstat: | |
M src/gui_client/gtk_client.c | 19 ++++++++++++------- | |
1 file changed, 12 insertions(+), 7 deletions(-) | |
--- | |
diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c | |
t@@ -71,6 +71,13 @@ struct ClientDataStruct { | |
guint JetAccel; | |
}; | |
+struct DealDiaStruct { | |
+ GtkWidget *dialog, *cost, *carrying, *space, *afford, *amount; | |
+ gint DrugInd; | |
+ gpointer Type; | |
+}; | |
+static struct DealDiaStruct DealDialog; | |
+ | |
GtkWidget *MainWindow = NULL; | |
static struct ClientDataStruct ClientData; | |
t@@ -533,6 +540,9 @@ void HandleClientMessage(char *pt, Player *Play) | |
if (IsShowingInventory) { | |
UpdateInventory(&ClientData.InvenDrug, Play->Drugs, NumDrug, TRUE); | |
} | |
+ if (IsShowingDealDrugs) { | |
+ gtk_widget_destroy(DealDialog.dialog); | |
+ } | |
break; | |
default: | |
if (!Handled) { | |
t@@ -1055,6 +1065,8 @@ void DisplayFightMessage(char *Data) | |
return; | |
} | |
if (FightDialog) { | |
+ if (IsShowingDealDrugs) | |
+ gtk_widget_destroy(DealDialog.dialog); | |
if (!GTK_WIDGET_VISIBLE(FightDialog)) | |
gtk_widget_show(FightDialog); | |
} else { | |
t@@ -1436,13 +1448,6 @@ void Jet(GtkWidget *parent) | |
gtk_widget_show_all(dialog); | |
} | |
-struct DealDiaStruct { | |
- GtkWidget *dialog, *cost, *carrying, *space, *afford, *amount; | |
- gint DrugInd; | |
- gpointer Type; | |
-}; | |
-static struct DealDiaStruct DealDialog; | |
- | |
static void UpdateDealDialog(void) | |
{ | |
GString *text; |