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

> [EMAIL PROTECTED] - Mar. Sep. 25 16:17:25 2007]:
> 
> Cette opération semble ne pas avoir de contenu
> 
Hmmm, I submitted wrong patch file sorry...
diff -urda client/gui-gtk-2.0/cityrep.c.orig client/gui-gtk-2.0/cityrep.c
--- client/gui-gtk-2.0/cityrep.c.orig	2007-07-09 11:59:02.000000000 +0200
+++ client/gui-gtk-2.0/cityrep.c	2007-09-25 18:26:47.000000000 +0200
@@ -470,7 +470,7 @@
   gtk_tree_model_get(GTK_TREE_MODEL(city_model), it, 0, &res, -1);
   pcity = res;
 
-   if (idx == CMA_NONE) {
+   if (idx == cmafec_preset_num()) {
      cma_release_city(pcity);
    } else {
      cma_put_city_under_agent(pcity, cmafec_preset_get_parameter(idx));
@@ -548,8 +548,8 @@
   gtk_menu_item_set_submenu(parent_item, menu);
 
   if (change_cma) {
-    for (i = -1; i < cmafec_preset_num(); i++) {
-      w = (i == -1 ? gtk_menu_item_new_with_label(_("none"))
+    for (i = 0; i <= cmafec_preset_num(); i++) {
+      w = (i == cmafec_preset_num() ? gtk_menu_item_new_with_label(_("none"))
 	   : gtk_menu_item_new_with_label(cmafec_preset_get_descr(i)));
       gtk_menu_shell_append(GTK_MENU_SHELL(menu), w);
       g_signal_connect(w, "activate", G_CALLBACK(select_cma_callback),
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to