Author: cazfi Date: Sat Dec 19 14:15:22 2015 New Revision: 31102 URL: http://svn.gna.org/viewcvs/freeciv?rev=31102&view=rev Log: Replaced incorrect use of get_infrastructure_text() with extra_name_translated() when building list of potential pillage targets.
Reported anonymously See bug #23775 Modified: trunk/client/gui-gtk-2.0/dialogs.c trunk/client/gui-gtk-3.0/dialogs.c trunk/client/gui-qt/dialogs.cpp trunk/common/unit.c Modified: trunk/client/gui-gtk-2.0/dialogs.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/dialogs.c?rev=31102&r1=31101&r2=31102&view=diff ============================================================================== --- trunk/client/gui-gtk-2.0/dialogs.c (original) +++ trunk/client/gui-gtk-2.0/dialogs.c Sat Dec 19 14:15:22 2015 @@ -354,15 +354,11 @@ while ((tgt = get_preferred_pillage(extras))) { int what; - bv_extras what_extras; - - BV_CLR_ALL(what_extras); what = extra_index(tgt); BV_CLR(extras, what); - BV_SET(what_extras, what); - - choice_dialog_add(shl, get_infrastructure_text(what_extras), + + choice_dialog_add(shl, extra_name_translation(tgt), G_CALLBACK(pillage_callback), GINT_TO_POINTER(what), FALSE, NULL); Modified: trunk/client/gui-gtk-3.0/dialogs.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/dialogs.c?rev=31102&r1=31101&r2=31102&view=diff ============================================================================== --- trunk/client/gui-gtk-3.0/dialogs.c (original) +++ trunk/client/gui-gtk-3.0/dialogs.c Sat Dec 19 14:15:22 2015 @@ -355,15 +355,11 @@ while ((tgt = get_preferred_pillage(extras))) { int what; - bv_extras what_extras; - - BV_CLR_ALL(what_extras); what = extra_index(tgt); BV_CLR(extras, what); - BV_SET(what_extras, what); - - choice_dialog_add(shl, get_infrastructure_text(what_extras), + + choice_dialog_add(shl, extra_name_translation(tgt), G_CALLBACK(pillage_callback), GINT_TO_POINTER(what), FALSE, NULL); Modified: trunk/client/gui-qt/dialogs.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=31102&r1=31101&r2=31102&view=diff ============================================================================== --- trunk/client/gui-qt/dialogs.cpp (original) +++ trunk/client/gui-qt/dialogs.cpp Sat Dec 19 14:15:22 2015 @@ -2187,16 +2187,12 @@ qv2 = punit->id; while ((tgt = get_preferred_pillage(extras))) { int what; - bv_extras what_extras; - - BV_CLR_ALL(what_extras); what = extra_index(tgt); BV_CLR(extras, what); - BV_SET(what_extras, what); func = pillage_something; - str = get_infrastructure_text(what_extras); + str = extra_name_translation(tgt); qv1 = what; cd->add_item(str, func, qv1, qv2); } Modified: trunk/common/unit.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/unit.c?rev=31102&r1=31101&r2=31102&view=diff ============================================================================== --- trunk/common/unit.c (original) +++ trunk/common/unit.c Sat Dec 19 14:15:22 2015 @@ -1367,12 +1367,8 @@ return; case ACTIVITY_PILLAGE: if (punit->activity_target != NULL) { - bv_extras pset; - - BV_CLR_ALL(pset); - BV_SET(pset, extra_index(punit->activity_target)); astr_add_line(astr, "%s: %s", get_activity_text(punit->activity), - get_infrastructure_text(pset)); + extra_name_translation(punit->activity_target)); } else { astr_add_line(astr, "%s", get_activity_text(punit->activity)); } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits