tThe fight dialog is now cleared of all messages at the end of a fight. - 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 ad86e233baab04a9453ae871040e1a3c04b417a0
 (DIR) parent 4193bf74f808f38468a18bb2f5510ef46ae60822
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Fri, 26 Apr 2002 10:42:15 +0000
       
       The fight dialog is now cleared of all messages at the end of a fight.
       
       
       Diffstat:
         M src/gui_client/gtk_client.c         |      11 +++++++++--
       
       1 file changed, 9 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
       t@@ -770,6 +770,8 @@ void PrintMessage(char *text, char *tagname)
          TextViewAppend(messages, "\n", NULL, TRUE);
        }
        
       +static void FreeCombatants(void);
       +
        /* 
         * Called when one of the action buttons in the Fight dialog is clicked.
         * "data" specifies which button (Deal Drugs/Run/Fight/Stand) was pressed.
       t@@ -791,8 +793,13 @@ static void FightCallback(GtkWidget *widget, gpointer data)
          switch (Answer) {
          case 'D':
            gtk_widget_hide(FightDialog);
       -    if (!(Play->Flags & FIGHTING) && HaveAbility(Play, A_DONEFIGHT)) {
       -      SendClientMessage(Play, C_NONE, C_DONE, NULL, NULL);
       +    if (!(Play->Flags & FIGHTING)) {
       +      if (HaveAbility(Play, A_DONEFIGHT)) {
       +        SendClientMessage(Play, C_NONE, C_DONE, NULL, NULL);
       +      }
       +      FreeCombatants();
       +      gtk_widget_destroy(FightDialog);
       +      FightDialog = NULL;
            }
            break;
          case 'R':