Index: client/options.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/options.c,v retrieving revision 1.80 diff -u -r1.80 options.c --- client/options.c 12 Apr 2003 18:24:41 -0000 1.80 +++ client/options.c 17 May 2003 02:12:33 -0000 @@ -69,6 +69,7 @@ bool auto_turn_done = FALSE; bool meta_accelerators = TRUE; bool map_scrollbars = TRUE; +bool dialogs_on_top = TRUE; bool ask_city_name = TRUE; bool popup_new_cities = TRUE; @@ -119,8 +120,9 @@ GEN_BOOL_OPTION(center_when_popup_city, N_("Center map when Popup city")), GEN_BOOL_OPTION(concise_city_production, N_("Concise City Production")), GEN_BOOL_OPTION(auto_turn_done, N_("End Turn when done moving")), - GEN_BOOL_OPTION(meta_accelerators, N_("Use Alt/Meta for accelerators (GTK only)")), - GEN_BOOL_OPTION(map_scrollbars, N_("Show Map Scrollbars (GTK only)")), + GEN_BOOL_OPTION(meta_accelerators, N_("Use Alt/Meta for accelerators (GTK+ only)")), + GEN_BOOL_OPTION(map_scrollbars, N_("Show Map Scrollbars (GTK+ only)")), + GEN_BOOL_OPTION(dialogs_on_top, N_("Keep dialogs on top (GTK+ 2.0 only)")), GEN_BOOL_OPTION(ask_city_name, N_("Prompt for city names")), GEN_BOOL_OPTION(popup_new_cities, N_("Pop up city dialog for new cities")), GEN_OPTION_TERMINATOR Index: client/options.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/options.h,v retrieving revision 1.29 diff -u -r1.29 options.h --- client/options.h 12 Apr 2003 18:24:41 -0000 1.29 +++ client/options.h 17 May 2003 02:12:33 -0000 @@ -42,6 +42,7 @@ extern bool auto_turn_done; extern bool meta_accelerators; extern bool map_scrollbars; +extern bool dialogs_on_top; extern bool ask_city_name; extern bool popup_new_cities; extern bool update_city_text_in_refresh_tile; Index: client/gui-gtk-2.0/citydlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/citydlg.c,v retrieving revision 1.53 diff -u -r1.53 citydlg.c --- client/gui-gtk-2.0/citydlg.c 13 May 2003 20:38:33 -0000 1.53 +++ client/gui-gtk-2.0/citydlg.c 17 May 2003 02:12:40 -0000 @@ -1088,15 +1088,13 @@ GTK_WINDOW(toplevel), 0, NULL); - gtk_window_set_type_hint(GTK_WINDOW(pdialog->shell), - GDK_WINDOW_TYPE_HINT_NORMAL); - gtk_window_set_role(GTK_WINDOW(pdialog->shell), "city"); - - if (make_modal) { + if (dialogs_on_top) { gtk_window_set_transient_for(GTK_WINDOW(pdialog->shell), GTK_WINDOW(toplevel)); - gtk_window_set_modal(GTK_WINDOW(pdialog->shell), TRUE); } + gtk_window_set_type_hint(GTK_WINDOW(pdialog->shell), + GDK_WINDOW_TYPE_HINT_NORMAL); + gtk_window_set_role(GTK_WINDOW(pdialog->shell), "city"); g_signal_connect(pdialog->shell, "destroy", G_CALLBACK(city_destroy_callback), pdialog); @@ -2227,12 +2225,16 @@ if (ut2 == -1) { /* this shouldn't generally happen, but it is conceivable */ - shell = gtk_message_dialog_new(GTK_WINDOW(toplevel), - GTK_DIALOG_DESTROY_WITH_PARENT, + shell = gtk_message_dialog_new(NULL, + 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Sorry: cannot upgrade %s."), unit_types[ut1].name); gtk_window_set_title(GTK_WINDOW(shell), _("Upgrade Unit!")); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } g_signal_connect(shell, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_window_present(GTK_WINDOW(shell)); @@ -2240,14 +2242,18 @@ value = unit_upgrade_price(game.player_ptr, ut1, ut2); if (game.player_ptr->economic.gold >= value) { - shell = gtk_message_dialog_new(GTK_WINDOW(toplevel), - GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, + shell = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Upgrade %s to %s for %d gold?\n" "Treasury contains %d gold."), unit_types[ut1].name, unit_types[ut2].name, value, game.player_ptr->economic.gold); gtk_window_set_title(GTK_WINDOW(shell), _("Upgrade Obsolete Units")); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } gtk_dialog_set_default_response(GTK_DIALOG(shell), GTK_RESPONSE_YES); if (gtk_dialog_run(GTK_DIALOG(shell)) == GTK_RESPONSE_YES) { @@ -2255,8 +2261,8 @@ } gtk_widget_destroy(shell); } else { - shell = gtk_message_dialog_new(GTK_WINDOW(toplevel), - GTK_DIALOG_DESTROY_WITH_PARENT, + shell = gtk_message_dialog_new(NULL, + 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Upgrading %s to %s costs %d gold.\n" "Treasury contains %d gold."), @@ -2264,6 +2270,10 @@ value, game.player_ptr->economic.gold); gtk_window_set_title(GTK_WINDOW(shell), _("Upgrade Unit!")); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } g_signal_connect(shell, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_window_present(GTK_WINDOW(shell)); Index: client/gui-gtk-2.0/cityrep.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/cityrep.c,v retrieving revision 1.44 diff -u -r1.44 cityrep.c --- client/gui-gtk-2.0/cityrep.c 14 May 2003 00:26:17 -0000 1.44 +++ client/gui-gtk-2.0/cityrep.c 17 May 2003 02:12:43 -0000 @@ -644,9 +644,13 @@ int i; city_dialog_shell = gtk_dialog_new_with_buttons(_("Cities"), - GTK_WINDOW(toplevel), + NULL, 0, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(city_dialog_shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_type_hint(GTK_WINDOW(city_dialog_shell), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_window_set_default_size(GTK_WINDOW(city_dialog_shell), -1, 420); Index: client/gui-gtk-2.0/connectdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/connectdlg.c,v retrieving revision 1.23 diff -u -r1.23 connectdlg.c --- client/gui-gtk-2.0/connectdlg.c 13 May 2003 21:50:48 -0000 1.23 +++ client/gui-gtk-2.0/connectdlg.c 17 May 2003 02:12:44 -0000 @@ -33,6 +33,7 @@ #include "dialogs.h" #include "gui_main.h" #include "gui_stuff.h" +#include "options.h" #include "connectdlg.h" @@ -151,10 +152,13 @@ GtkTreeSelection *selection; dialog = gtk_dialog_new_with_buttons(_(" Connect to Freeciv Server"), - GTK_WINDOW(toplevel), + NULL, GTK_DIALOG_MODAL, NULL); - + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(dialog), + GTK_WINDOW(toplevel)); + } g_signal_connect(dialog, "destroy", G_CALLBACK(connect_destroy_callback), NULL); g_signal_connect(dialog, "response", Index: client/gui-gtk-2.0/dialogs.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/dialogs.c,v retrieving revision 1.47 diff -u -r1.47 dialogs.c --- client/gui-gtk-2.0/dialogs.c 12 May 2003 21:44:50 -0000 1.47 +++ client/gui-gtk-2.0/dialogs.c 17 May 2003 02:12:50 -0000 @@ -137,11 +137,17 @@ GtkWidget *shell, *label, *headline_label, *sw; shell = gtk_dialog_new_with_buttons(caption, - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } + gtk_window_set_type_hint(GTK_WINDOW(shell), + GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(shell), GTK_RESPONSE_CLOSE); g_signal_connect(shell, "response", G_CALLBACK(gtk_widget_destroy), NULL); @@ -216,9 +222,15 @@ GtkWidget *shell, *label, *goto_command, *popcity_command; shell = gtk_dialog_new_with_buttons(headline, - GTK_WINDOW(toplevel), + NULL, 0, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } + gtk_window_set_type_hint(GTK_WINDOW(shell), + GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(shell), GTK_RESPONSE_CLOSE); gtk_window_set_position(GTK_WINDOW(shell), GTK_WIN_POS_CENTER_ON_PARENT); @@ -298,19 +310,27 @@ GtkWidget *shell; if(game.player_ptr->economic.gold>=punit->bribe_cost) { - shell = gtk_message_dialog_new(GTK_WINDOW(toplevel), + shell = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Bribe unit for %d gold?\nTreasury contains %d gold."), punit->bribe_cost, game.player_ptr->economic.gold); gtk_window_set_title(GTK_WINDOW(shell), _("Bribe Enemy Unit")); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } } else { - shell = gtk_message_dialog_new(GTK_WINDOW(toplevel), + shell = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Bribing the unit costs %d gold.\nTreasury contains %d gold."), punit->bribe_cost, game.player_ptr->economic.gold); gtk_window_set_title(GTK_WINDOW(shell), _("Traitors Demand Too Much!")); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } } gtk_window_present(GTK_WINDOW(shell)); @@ -483,13 +503,17 @@ GtkTreeViewColumn *col; spy_tech_shell = gtk_dialog_new_with_buttons(_("Steal Technology"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _("_Steal"), GTK_RESPONSE_ACCEPT, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(spy_tech_shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_position(GTK_WINDOW(spy_tech_shell), GTK_WIN_POS_MOUSE); gtk_dialog_set_default_response(GTK_DIALOG(spy_tech_shell), @@ -638,13 +662,17 @@ GtkTreeIter it; spy_sabotage_shell = gtk_dialog_new_with_buttons(_("Sabotage Improvements"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _("_Sabotage"), GTK_RESPONSE_ACCEPT, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(spy_sabotage_shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_position(GTK_WINDOW(spy_sabotage_shell), GTK_WIN_POS_MOUSE); gtk_dialog_set_default_response(GTK_DIALOG(spy_sabotage_shell), @@ -814,6 +842,10 @@ _("You can't incite a revolt in %s."), pcity->name); gtk_window_set_title(GTK_WINDOW(shell), _("City can't be incited!")); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } } else if (game.player_ptr->economic.gold >= pcity->incite_revolt_cost) { shell = gtk_message_dialog_new(GTK_WINDOW(toplevel), 0, @@ -821,6 +853,10 @@ _("Incite a revolt for %d gold?\nTreasury contains %d gold."), pcity->incite_revolt_cost, game.player_ptr->economic.gold); gtk_window_set_title(GTK_WINDOW(shell), _("Incite a Revolt!")); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } } else { shell = gtk_message_dialog_new(GTK_WINDOW(toplevel), 0, @@ -828,6 +864,10 @@ _("Inciting a revolt costs %d gold.\nTreasury contains %d gold."), pcity->incite_revolt_cost, game.player_ptr->economic.gold); gtk_window_set_title(GTK_WINDOW(shell), _("Traitors Demand Too Much!")); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } } gtk_window_present(GTK_WINDOW(shell)); @@ -1184,12 +1224,16 @@ { GtkWidget *shell; - shell = gtk_message_dialog_new(GTK_WINDOW(toplevel), + shell = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, _("You say you wanna revolution?")); gtk_window_set_title(GTK_WINDOW(shell), _("Revolution!")); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } if (gtk_dialog_run(GTK_DIALOG(shell)) == GTK_RESPONSE_YES) { struct packet_player_request packet; @@ -1645,10 +1689,16 @@ GtkWidget *ready_cmd, *sentry_cmd, *close_cmd; shell = gtk_dialog_new_with_buttons(_("Unit selection"), - GTK_WINDOW(toplevel), + NULL, 0, NULL); unit_select_dialog_shell = shell; + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } + gtk_window_set_type_hint(GTK_WINDOW(shell), + GDK_WINDOW_TYPE_HINT_NORMAL); unit_select_tips = gtk_tooltips_new(); g_object_ref(unit_select_tips); @@ -1725,7 +1775,7 @@ shell = gtk_dialog_new_with_buttons(_("What Nation Will You Be?"), - GTK_WINDOW(toplevel), + NULL, GTK_DIALOG_MODAL, "_Disconnect", GTK_RESPONSE_CANCEL, @@ -1733,6 +1783,10 @@ GTK_RESPONSE_ACCEPT, NULL); races_shell = shell; + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_position(GTK_WINDOW(shell), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_default_size(GTK_WINDOW(shell), -1, 310); Index: client/gui-gtk-2.0/diplodlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/diplodlg.c,v retrieving revision 1.10 diff -u -r1.10 diplodlg.c --- client/gui-gtk-2.0/diplodlg.c 17 Apr 2003 21:18:08 -0000 1.10 +++ client/gui-gtk-2.0/diplodlg.c 17 May 2003 02:12:51 -0000 @@ -37,6 +37,7 @@ #include "gui_main.h" #include "gui_stuff.h" #include "mapview.h" +#include "options.h" #include "diplodlg.h" @@ -440,10 +441,14 @@ init_treaty(&pdialog->treaty, plr0, plr1); shell = gtk_dialog_new_with_buttons(_("Diplomacy meeting"), - GTK_WINDOW(toplevel), + NULL, 0, NULL); pdialog->shell = shell; + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } g_signal_connect(shell, "destroy", G_CALLBACK(diplomacy_destroy), pdialog); g_signal_connect(shell, "response", Index: client/gui-gtk-2.0/finddlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/finddlg.c,v retrieving revision 1.14 diff -u -r1.14 finddlg.c --- client/gui-gtk-2.0/finddlg.c 17 Apr 2003 21:20:58 -0000 1.14 +++ client/gui-gtk-2.0/finddlg.c 17 May 2003 02:12:51 -0000 @@ -29,6 +29,7 @@ #include "gui_main.h" #include "gui_stuff.h" #include "mapview.h" +#include "options.h" #include "finddlg.h" @@ -64,7 +65,7 @@ get_center_tile_mapcanvas(&pos_x, &pos_y); shell = gtk_dialog_new_with_buttons(_("Find City"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -72,6 +73,12 @@ GTK_RESPONSE_ACCEPT, NULL); find_dialog_shell = shell; + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } + gtk_window_set_type_hint(GTK_WINDOW(shell), + GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(shell), GTK_RESPONSE_ACCEPT); gtk_window_set_position(GTK_WINDOW(shell), GTK_WIN_POS_MOUSE); Index: client/gui-gtk-2.0/gamedlgs.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gamedlgs.c,v retrieving revision 1.18 diff -u -r1.18 gamedlgs.c --- client/gui-gtk-2.0/gamedlgs.c 17 Apr 2003 03:11:52 -0000 1.18 +++ client/gui-gtk-2.0/gamedlgs.c 17 May 2003 02:12:52 -0000 @@ -230,13 +230,19 @@ GtkWidget *scale; shell = gtk_dialog_new_with_buttons(_("Select tax, luxury and science rates"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } + gtk_window_set_type_hint(GTK_WINDOW(shell), + GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(shell), GTK_RESPONSE_OK); gtk_window_set_position(GTK_WINDOW(shell), GTK_WIN_POS_MOUSE); @@ -429,11 +435,17 @@ int i; option_dialog_shell = gtk_dialog_new_with_buttons(_("Set local options"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(option_dialog_shell), + GTK_WINDOW(toplevel)); + } + gtk_window_set_type_hint(GTK_WINDOW(option_dialog_shell), + GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(option_dialog_shell), GTK_RESPONSE_CLOSE); g_signal_connect(option_dialog_shell, "response", Index: client/gui-gtk-2.0/gotodlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gotodlg.c,v retrieving revision 1.10 diff -u -r1.10 gotodlg.c --- client/gui-gtk-2.0/gotodlg.c 17 Apr 2003 03:11:52 -0000 1.10 +++ client/gui-gtk-2.0/gotodlg.c 17 May 2003 02:12:52 -0000 @@ -37,6 +37,7 @@ #include "gui_main.h" #include "gui_stuff.h" #include "mapview.h" +#include "options.h" #include "gotodlg.h" @@ -120,7 +121,7 @@ GtkTreeViewColumn *col; dshell = gtk_dialog_new_with_buttons(_("Goto/Airlift Unit"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -129,6 +130,10 @@ ("_Goto"), CMD_GOTO, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(dshell), + GTK_WINDOW(toplevel)); + } gtk_window_set_position(GTK_WINDOW(dshell), GTK_WIN_POS_MOUSE); gtk_dialog_set_default_response(GTK_DIALOG(dshell), CMD_GOTO); Index: client/gui-gtk-2.0/helpdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/helpdlg.c,v retrieving revision 1.23 diff -u -r1.23 helpdlg.c --- client/gui-gtk-2.0/helpdlg.c 13 May 2003 20:38:33 -0000 1.23 +++ client/gui-gtk-2.0/helpdlg.c 17 May 2003 02:12:55 -0000 @@ -418,7 +418,7 @@ help_history_pos = -1; help_dialog_shell = gtk_dialog_new_with_buttons(_("Freeciv Help Browser"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_GO_BACK, 1, @@ -427,6 +427,10 @@ GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(help_dialog_shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_type_hint(GTK_WINDOW(help_dialog_shell), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(help_dialog_shell), Index: client/gui-gtk-2.0/inteldlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/inteldlg.c,v retrieving revision 1.7 diff -u -r1.7 inteldlg.c --- client/gui-gtk-2.0/inteldlg.c 17 Apr 2003 21:18:08 -0000 1.7 +++ client/gui-gtk-2.0/inteldlg.c 17 May 2003 02:12:56 -0000 @@ -32,6 +32,7 @@ #include "gui_main.h" #include "gui_stuff.h" #include "mapview.h" +#include "options.h" #include "inteldlg.h" @@ -73,11 +74,15 @@ intel_dialog_shell = gtk_dialog_new_with_buttons(_("Foreign Intelligence Report"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(intel_dialog_shell), + GTK_WINDOW(toplevel)); + } gtk_dialog_set_default_response(GTK_DIALOG(intel_dialog_shell), GTK_RESPONSE_CLOSE); Index: client/gui-gtk-2.0/messagedlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/messagedlg.c,v retrieving revision 1.16 diff -u -r1.16 messagedlg.c --- client/gui-gtk-2.0/messagedlg.c 17 Apr 2003 21:18:08 -0000 1.16 +++ client/gui-gtk-2.0/messagedlg.c 17 May 2003 02:12:56 -0000 @@ -59,13 +59,19 @@ int n, i, j; shell = gtk_dialog_new_with_buttons(_("Message Options"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } + gtk_window_set_type_hint(GTK_WINDOW(shell), + GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(shell), GTK_RESPONSE_OK); gtk_window_set_position(GTK_WINDOW(shell), GTK_WIN_POS_MOUSE); gtk_widget_set_name(shell, "Freeciv"); Index: client/gui-gtk-2.0/messagewin.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/messagewin.c,v retrieving revision 1.21 diff -u -r1.21 messagewin.c --- client/gui-gtk-2.0/messagewin.c 13 May 2003 20:38:33 -0000 1.21 +++ client/gui-gtk-2.0/messagewin.c 17 May 2003 02:12:57 -0000 @@ -160,9 +160,13 @@ intl_slist(ARRAY_SIZE(titles), titles, &titles_done); meswin_shell = gtk_dialog_new_with_buttons(_("Messages"), - GTK_WINDOW(toplevel), + NULL, 0, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(meswin_shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_type_hint(GTK_WINDOW(meswin_shell), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(meswin_shell), Index: client/gui-gtk-2.0/plrdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/plrdlg.c,v retrieving revision 1.26 diff -u -r1.26 plrdlg.c --- client/gui-gtk-2.0/plrdlg.c 13 May 2003 20:38:33 -0000 1.26 +++ client/gui-gtk-2.0/plrdlg.c 17 May 2003 02:12:59 -0000 @@ -41,6 +41,7 @@ #include "spaceshipdlg.h" #include "colors.h" #include "graphics.h" +#include "options.h" #include "plrdlg.h" @@ -200,10 +201,14 @@ intl_slist(ARRAY_SIZE(titles), titles, &titles_done); players_dialog_shell = gtk_dialog_new_with_buttons(_("Players"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(players_dialog_shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_type_hint(GTK_WINDOW(players_dialog_shell), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_window_set_default_size(GTK_WINDOW(players_dialog_shell), -1, 270); Index: client/gui-gtk-2.0/repodlgs.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/repodlgs.c,v retrieving revision 1.30 diff -u -r1.30 repodlgs.c --- client/gui-gtk-2.0/repodlgs.c 13 May 2003 20:38:33 -0000 1.30 +++ client/gui-gtk-2.0/repodlgs.c 17 May 2003 02:13:01 -0000 @@ -37,7 +37,7 @@ #include "gui_main.h" #include "gui_stuff.h" #include "helpdlg.h" -#include "optiondlg.h" +#include "options.h" #include "repodlgs_common.h" #include "repodlgs.h" @@ -137,11 +137,15 @@ int i; science_dialog_shell = gtk_dialog_new_with_buttons(_("Science"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(science_dialog_shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_type_hint(GTK_WINDOW(science_dialog_shell), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(science_dialog_shell), @@ -588,9 +592,13 @@ intl_slist(ARRAY_SIZE(titles), titles, &titles_done); economy_dialog_shell = gtk_dialog_new_with_buttons(_("Economy"), - GTK_WINDOW(toplevel), + NULL, 0, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(economy_dialog_shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_type_hint(GTK_WINDOW(economy_dialog_shell), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(economy_dialog_shell), @@ -881,9 +889,13 @@ intl_slist(ARRAY_SIZE(titles), titles, &titles_done); activeunits_dialog_shell = gtk_dialog_new_with_buttons(_("Units"), - GTK_WINDOW(toplevel), + NULL, 0, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(activeunits_dialog_shell), + GTK_WINDOW(toplevel)); + } gtk_window_set_type_hint(GTK_WINDOW(activeunits_dialog_shell), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_dialog_set_default_response(GTK_DIALOG(activeunits_dialog_shell), Index: client/gui-gtk-2.0/spaceshipdlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/spaceshipdlg.c,v retrieving revision 1.6 diff -u -r1.6 spaceshipdlg.c --- client/gui-gtk-2.0/spaceshipdlg.c 13 May 2003 20:38:33 -0000 1.6 +++ client/gui-gtk-2.0/spaceshipdlg.c 17 May 2003 02:13:01 -0000 @@ -212,9 +212,13 @@ pdialog->shell = gtk_dialog_new_with_buttons(pplayer->name, - GTK_WINDOW(toplevel), + NULL, 0, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(pdialog->shell), + GTK_WINDOW(toplevel)); + } gtk_widget_set_name(pdialog->shell, "Freeciv"); gtk_window_set_position(GTK_WINDOW(pdialog->shell), GTK_WIN_POS_MOUSE); Index: client/gui-gtk-2.0/wldlg.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/wldlg.c,v retrieving revision 1.22 diff -u -r1.22 wldlg.c --- client/gui-gtk-2.0/wldlg.c 13 May 2003 20:38:33 -0000 1.22 +++ client/gui-gtk-2.0/wldlg.c 17 May 2003 02:13:04 -0000 @@ -36,6 +36,7 @@ #include "support.h" #include "climisc.h" #include "clinet.h" +#include "options.h" #include "wldlg.h" #include "citydlg.h" @@ -199,7 +200,7 @@ GtkCellRenderer *rend; shell = gtk_dialog_new_with_buttons(_("Edit worklists"), - GTK_WINDOW(toplevel), + NULL, 0, GTK_STOCK_NEW, WORKLISTS_NEW, @@ -210,6 +211,12 @@ GTK_STOCK_CLOSE, WORKLISTS_CLOSE, NULL); + if (dialogs_on_top) { + gtk_window_set_transient_for(GTK_WINDOW(shell), + GTK_WINDOW(toplevel)); + } + gtk_window_set_type_hint(GTK_WINDOW(shell), + GDK_WINDOW_TYPE_HINT_NORMAL); gtk_window_set_position(GTK_WINDOW(shell), GTK_WIN_POS_MOUSE); g_signal_connect(shell, "response",