Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#11396) Treaty doesn't always respect money transfer
Home

[Freeciv-Dev] (PR#11396) Treaty doesn't always respect money transfer

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: neroden@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#11396) Treaty doesn't always respect money transfer
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sun, 10 Apr 2005 12:50:02 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11396 >

> [neroden@xxxxxxxxxxx - Fri Dec 10 17:44:27 2004]:
> 
> Well, I am using the gtk2 client (under KDE).
> 
> I tried beta5, and am still getting the same problem.
> 
> I tried making a treaty with the Zulus and asking them to give me 75 
> gold for (for instance) my seamap.  They agreed, but no gold was 
> transferred (my gold total did not change)....
> 
> Aha!  I figured it out, through sheer luck.
> 
> After I change the gold total, I have to hit "return" in order for it to 
> be entered as a clause.  Why?!?  This is particularly nonobvious when 
> using the arrow buttons in the combo box, with the mouse.
> 
> If this is a GTK2 problem and can't be fixed, it should be noted in the 
> FAQ, release notes, or something.

This patch fixes that, although it means you have to send a packet to
the server every single time you press the up/down arrows...

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.28
diff -u -u -r1.28 diplodlg.c
--- client/gui-gtk-2.0/diplodlg.c       15 Feb 2005 16:43:22 -0000      1.28
+++ client/gui-gtk-2.0/diplodlg.c       10 Apr 2005 19:48:40 -0000
@@ -528,8 +528,8 @@
   gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin), 0);
   gtk_table_attach_defaults(GTK_TABLE(table), spin, 1, 2, 0, 1);
   g_object_set_data(G_OBJECT(spin), "plr", plr0);
-  g_signal_connect_after(spin, "activate",
-                        G_CALLBACK(diplo_dialog_returnkey), pdialog);
+  g_signal_connect_after(spin, "value-changed",
+                        G_CALLBACK(diplo_dialog_returnkey), pdialog);
 
   label = g_object_new(GTK_TYPE_LABEL,
     "use-underline", TRUE,
@@ -584,8 +584,8 @@
   gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin), 0);
   gtk_table_attach_defaults(GTK_TABLE(table), spin, 1, 2, 0, 1);
   g_object_set_data(G_OBJECT(spin), "plr", plr1);
-  g_signal_connect_after(spin, "activate",
-                        G_CALLBACK(diplo_dialog_returnkey), pdialog);
+  g_signal_connect_after(spin, "value-changed",
+                        G_CALLBACK(diplo_dialog_returnkey), pdialog);
 
   label = g_object_new(GTK_TYPE_LABEL,
     "use-underline", TRUE,
@@ -841,7 +841,6 @@
                                             pdialog->treaty.plr1->
                                             player_no, pgiver->player_no,
                                             CLAUSE_GOLD, amount);
-    gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), 0.0);
   } else {
     append_output_window(_("Invalid amount of gold specified."));
   }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#11396) Treaty doesn't always respect money transfer, Vasco Alexandre da Silva Costa <=