[Freeciv-Dev] (PR#15855) allow "cancel" in nation selection
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15855 >
As reported by Mike, this patch allows you to cancel nation selection.
The current two options are "pick random nation" and "ok" (which takes
the selected nation). But if you already have a nation picked when you
open the dialog, the "Cancel" button will simply cancel the dialog and
keep the currently selected nation.
-jason
Index: client/gui-gtk-2.0/dialogs.c
===================================================================
--- client/gui-gtk-2.0/dialogs.c (revision 11759)
+++ client/gui-gtk-2.0/dialogs.c (working copy)
@@ -762,8 +762,10 @@
gtk_dialog_new_with_buttons(_("What Nation Will You Be?"),
NULL,
0,
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL,
_("Random Nation"),
- GTK_RESPONSE_CANCEL,
+ GTK_RESPONSE_NO,
GTK_STOCK_OK,
GTK_RESPONSE_ACCEPT,
NULL);
@@ -1241,10 +1243,13 @@
dsend_packet_nation_select_req(&aconnection,
races_player->player_no, selected_nation,
selected_sex, s, selected_city_style);
- } else if (response == GTK_RESPONSE_CANCEL) {
+
+ } else if (response == GTK_RESPONSE_NO) {
dsend_packet_nation_select_req(&aconnection,
races_player->player_no,
-1, FALSE, "", 0);
+ } else if (response == GTK_RESPONSE_CANCEL) {
+ /* Nothing. */
}
popdown_races_dialog();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#15855) allow "cancel" in nation selection,
Jason Short <=
|
|