Index: client/civclient.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v retrieving revision 1.122 diff -u -r1.122 civclient.c --- client/civclient.c 2002/03/19 16:32:18 1.122 +++ client/civclient.c 2002/03/19 19:53:18 @@ -41,6 +41,7 @@ #include "chatline_g.h" #include "citydlg_g.h" +#include "cityrep_g.h" #include "climisc.h" #include "clinet.h" #include "connectdlg_g.h" @@ -533,6 +534,13 @@ } else if(client_state==CLIENT_PRE_GAME_STATE) { popdown_all_city_dialogs(); + popdown_city_report_dialog(); + popdown_meswin_dialog(); + popdown_science_dialog(); + popdown_economy_report_dialog(); + popdown_activeunits_report_dialog(); + popdown_players_dialog(); + popdown_notify_dialog(); close_all_diplomacy_dialogs(); client_remove_all_cli_conn(); game_remove_all_players(); @@ -602,7 +610,6 @@ { struct packet_player_request packet; - packet.attribute_block = TRUE; send_packet_player_request(&aconnection, &packet, PACKET_PLAYER_ATTRIBUTE_BLOCK); } Index: client/gui-gtk/cityrep.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/cityrep.c,v retrieving revision 1.55 diff -u -r1.55 cityrep.c --- client/gui-gtk/cityrep.c 2002/03/17 10:48:52 1.55 +++ client/gui-gtk/cityrep.c 2002/03/19 19:53:19 @@ -164,6 +164,19 @@ } } +/**************************************************************** +... +****************************************************************/ +void popdown_city_report_dialog() +{ + if (city_dialog_shell) { + if (city_dialog_shell_is_modal) { + gtk_widget_set_sensitive(top_vbox, TRUE); + } + gtk_widget_destroy(city_dialog_shell); + city_dialog_shell = NULL; + } +} /**************************************************************** ... @@ -1124,11 +1137,7 @@ *****************************************************************/ static void city_close_callback(GtkWidget *w, gpointer data) { - - if(city_dialog_shell_is_modal) - gtk_widget_set_sensitive(top_vbox, TRUE); - gtk_widget_destroy(city_dialog_shell); - city_dialog_shell=NULL; + popdown_city_report_dialog(); } /**************************************************************** Index: client/gui-gtk/dialogs.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/dialogs.c,v retrieving revision 1.90 diff -u -r1.90 dialogs.c --- client/gui-gtk/dialogs.c 2002/03/17 10:48:53 1.90 +++ client/gui-gtk/dialogs.c 2002/03/19 19:53:20 @@ -70,6 +70,8 @@ as the races_dialog is poped up. */ /******************************************************************/ +static GtkWidget *notify_dialog_shell; +/******************************************************************/ static GtkWidget *spy_tech_shell; static GtkWidget *spy_advances_list; static GtkWidget *spy_steal_command; @@ -138,10 +140,9 @@ /**************************************************************** ... *****************************************************************/ -static void notify_command_callback(GtkWidget *w, GtkWidget *t) +static void notify_command_callback(GtkWidget * w, GtkWidget * t) { - gtk_widget_destroy( t ); - gtk_widget_set_sensitive( top_vbox, TRUE ); + popdown_notify_dialog(); } /**************************************************************** @@ -159,7 +160,7 @@ *****************************************************************/ void popup_notify_dialog(char *caption, char *headline, char *lines) { - GtkWidget *notify_dialog_shell, *notify_command; + GtkWidget *notify_command; GtkWidget *notify_label, *notify_headline, *notify_scrolled; GtkAccelGroup *accel=gtk_accel_group_new(); @@ -218,6 +219,18 @@ gtk_widget_show( notify_dialog_shell ); gtk_widget_set_sensitive( top_vbox, FALSE ); +} + +/**************************************************************** +... +*****************************************************************/ +void popdown_notify_dialog() +{ + if (notify_dialog_shell) { + gtk_widget_destroy(notify_dialog_shell); + gtk_widget_set_sensitive(top_vbox, TRUE); + notify_dialog_shell = NULL; + } } /**************************************************************** Index: client/gui-gtk/messagewin.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/messagewin.c,v retrieving revision 1.26 diff -u -r1.26 messagewin.c --- client/gui-gtk/messagewin.c 2002/02/12 09:36:47 1.26 +++ client/gui-gtk/messagewin.c 2002/03/19 19:53:20 @@ -98,6 +98,18 @@ meswin_scroll_down(); } +/************************************************************************** +... +**************************************************************************/ +void popdown_meswin_dialog() +{ + if (meswin_dialog_shell) { + gtk_widget_destroy(meswin_dialog_shell); + meswin_dialog_shell = NULL; + gtk_style_unref(meswin_visited_style); + gtk_style_unref(meswin_not_visited_style); + } +} /**************************************************************** ... @@ -418,12 +430,9 @@ /************************************************************************** ... **************************************************************************/ -void meswin_close_callback(GtkWidget *w, gpointer data) +static void meswin_close_callback(GtkWidget * w, gpointer data) { - gtk_widget_destroy(meswin_dialog_shell); - meswin_dialog_shell = NULL; - gtk_style_unref(meswin_visited_style); - gtk_style_unref(meswin_not_visited_style); + popdown_meswin_dialog(); } /************************************************************************** Index: client/gui-gtk/plrdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/plrdlg.c,v retrieving revision 1.33 diff -u -r1.33 plrdlg.c --- client/gui-gtk/plrdlg.c 2002/02/26 19:33:21 1.33 +++ client/gui-gtk/plrdlg.c 2002/03/19 19:53:21 @@ -106,6 +106,17 @@ } } +/**************************************************************** + ... +*****************************************************************/ +void popdown_players_dialog(void) +{ + if (players_dialog_shell) { + gtk_widget_destroy(players_dialog_shell); + players_dialog_shell = NULL; + } +} + /* * Sort plrs by column... */ @@ -518,10 +529,9 @@ /************************************************************************** ... **************************************************************************/ -void players_button_callback(GtkWidget *w, gpointer data) +static void players_button_callback(GtkWidget * w, gpointer data) { - gtk_widget_destroy(players_dialog_shell); - players_dialog_shell = NULL; + popdown_players_dialog(); } /************************************************************************** Index: client/gui-gtk/repodlgs.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/repodlgs.c,v retrieving revision 1.56 diff -u -r1.56 repodlgs.c --- client/gui-gtk/repodlgs.c 2002/03/17 11:07:18 1.56 +++ client/gui-gtk/repodlgs.c 2002/03/19 19:53:21 @@ -138,6 +138,19 @@ } } +/**************************************************************** +... +*****************************************************************/ +void popdown_science_dialog() +{ + if (science_dialog_shell) { + if (science_dialog_shell_is_modal) { + gtk_widget_set_sensitive(top_vbox, TRUE); + } + gtk_widget_destroy(science_dialog_shell); + science_dialog_shell = NULL; + } +} /**************************************************************** ... @@ -301,13 +314,9 @@ /**************************************************************** ... *****************************************************************/ -void science_close_callback(GtkWidget *widget, gpointer data) +static void science_close_callback(GtkWidget * widget, gpointer data) { - - if(science_dialog_shell_is_modal) - gtk_widget_set_sensitive(top_vbox, TRUE); - gtk_widget_destroy(science_dialog_shell); - science_dialog_shell=NULL; + popdown_science_dialog(); } /**************************************************************** @@ -554,6 +563,19 @@ } } +/**************************************************************** +... +****************************************************************/ +void popdown_economy_report_dialog() +{ + if (economy_dialog_shell) { + if (economy_dialog_shell_is_modal) { + gtk_widget_set_sensitive(top_vbox, TRUE); + } + gtk_widget_destroy(economy_dialog_shell); + economy_dialog_shell = NULL; + } +} /**************************************************************** ... @@ -661,13 +683,9 @@ /**************************************************************** ... *****************************************************************/ -void economy_close_callback(GtkWidget *w, gpointer data) +static void economy_close_callback(GtkWidget * w, gpointer data) { - - if(economy_dialog_shell_is_modal) - gtk_widget_set_sensitive(top_vbox, TRUE); - gtk_widget_destroy(economy_dialog_shell); - economy_dialog_shell=NULL; + popdown_economy_report_dialog(); } /**************************************************************** @@ -788,6 +806,19 @@ } } +/**************************************************************** +... +****************************************************************/ +void popdown_activeunits_report_dialog() +{ + if (activeunits_dialog_shell) { + if (activeunits_dialog_shell_is_modal) { + gtk_widget_set_sensitive(top_vbox, TRUE); + } + gtk_widget_destroy(activeunits_dialog_shell); + activeunits_dialog_shell = NULL; + } +} /**************************************************************** ... @@ -939,13 +970,9 @@ /**************************************************************** ... *****************************************************************/ -void activeunits_close_callback(GtkWidget *w, gpointer data) +static void activeunits_close_callback(GtkWidget * w, gpointer data) { - - if(activeunits_dialog_shell_is_modal) - gtk_widget_set_sensitive(top_vbox, TRUE); - gtk_widget_destroy(activeunits_dialog_shell); - activeunits_dialog_shell = NULL; + popdown_activeunits_report_dialog(); } /**************************************************************** Index: client/include/cityrep_g.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/include/cityrep_g.h,v retrieving revision 1.3 diff -u -r1.3 cityrep_g.h --- client/include/cityrep_g.h 2002/02/19 16:41:21 1.3 +++ client/include/cityrep_g.h 2002/03/19 19:53:22 @@ -16,6 +16,7 @@ struct city; void popup_city_report_dialog(bool make_modal); +void popdown_city_report_dialog(void); void city_report_dialog_update(void); void city_report_dialog_update_city(struct city *pcity); Index: client/include/dialogs_g.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/include/dialogs_g.h,v retrieving revision 1.9 diff -u -r1.9 dialogs_g.h --- client/include/dialogs_g.h 2002/03/17 10:49:05 1.9 +++ client/include/dialogs_g.h 2002/03/19 19:53:22 @@ -21,6 +21,7 @@ void popup_notify_goto_dialog(char *headline, char *lines, int x, int y); void popup_notify_dialog(char *caption, char *headline, char *lines); +void popdown_notify_dialog(void); void popup_races_dialog(void); void popdown_races_dialog(void); Index: client/include/messagewin_g.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/include/messagewin_g.h,v retrieving revision 1.1 diff -u -r1.1 messagewin_g.h --- client/include/messagewin_g.h 1999/07/20 11:43:20 1.1 +++ client/include/messagewin_g.h 2002/03/19 19:53:22 @@ -16,6 +16,7 @@ #include "packets.h" void popup_meswin_dialog(void); +void popdown_meswin_dialog(void); void update_meswin_dialog(void); void clear_notify_window(void); void add_notify_window(struct packet_generic_message *packet); Index: client/include/plrdlg_g.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/include/plrdlg_g.h,v retrieving revision 1.2 diff -u -r1.2 plrdlg_g.h --- client/include/plrdlg_g.h 2000/07/29 23:35:08 1.2 +++ client/include/plrdlg_g.h 2002/03/19 19:53:22 @@ -17,6 +17,7 @@ void plrdlg_update_delay_off(void); void popup_players_dialog(void); +void popdown_players_dialog(void); void update_players_dialog(void); #endif /* FC__PLRDLG_G_H */ Index: client/include/repodlgs_g.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/include/repodlgs_g.h,v retrieving revision 1.3 diff -u -r1.3 repodlgs_g.h --- client/include/repodlgs_g.h 2002/02/19 16:41:22 1.3 +++ client/include/repodlgs_g.h 2002/03/19 19:53:22 @@ -20,9 +20,14 @@ void science_dialog_update(void); void popup_science_dialog(bool make_modal); +void popdown_science_dialog(void); + void economy_report_dialog_update(void); void popup_economy_report_dialog(bool make_modal); +void popdown_economy_report_dialog(void); + void activeunits_report_dialog_update(void); void popup_activeunits_report_dialog(bool make_modal); +void popdown_activeunits_report_dialog(void); #endif /* FC__REPODLGS_G_H */