[Freeciv-Dev] (PR#11342) GUI should know that we can't buy
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11342 >
> [jdorje - Sun Dec 05 04:40:08 2004]:
>
> This patch fixes city_can_buy(). However it makes no difference in the
> gtk2 client; presumably city_can_buy() isn't checked.
I added your patch. It didn't work because the city dialog code uses
that function but then messes with the buttons again, blundering it all.
This patch fixes that.
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.124
diff -u -u -r1.124 citydlg.c
--- client/gui-gtk-2.0/citydlg.c 10 Apr 2005 01:59:31 -0000 1.124
+++ client/gui-gtk-2.0/citydlg.c 10 Apr 2005 19:18:39 -0000
@@ -376,8 +376,6 @@
if (city_owner(pcity) == game.player_ptr) {
bool have_present_units =
(unit_list_size(pcity->tile->units) > 0);
- gboolean sensitive;
-
refresh_worklist(pdialog->production.worklist);
city_dialog_update_information(pdialog->happiness.info_ebox,
@@ -389,15 +387,8 @@
gtk_widget_set_sensitive(pdialog->show_units_command,
can_client_issue_orders() &&
have_present_units);
-
- sensitive = (city_buy_cost(pdialog->pcity) > 0
- && can_client_issue_orders());
- gtk_widget_set_sensitive(pdialog->overview.buy_command, sensitive);
- gtk_widget_set_sensitive(pdialog->production.buy_command, sensitive);
} else {
/* Set the buttons we do not want live while a Diplomat investigates */
- gtk_widget_set_sensitive(pdialog->overview.buy_command, FALSE);
- gtk_widget_set_sensitive(pdialog->production.buy_command, FALSE);
gtk_widget_set_sensitive(pdialog->show_units_command, FALSE);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#11342) GUI should know that we can't buy,
Vasco Alexandre da Silva Costa <=
|
|