diff -Nur -Xfreeciv/diff_ignore freeciv/client/gui-gtk/citydlg.c testing-buy2/client/gui-gtk/citydlg.c --- freeciv/client/gui-gtk/citydlg.c Tue Feb 12 21:15:57 2002 +++ testing-buy2/client/gui-gtk/citydlg.c Sun Feb 17 01:29:37 2002 @@ -813,16 +813,10 @@ gtk_container_add(GTK_CONTAINER (pdialog->overview.currently_building_frame), hbox); - pdialog->overview.progress_label = gtk_progress_bar_new(); + pdialog->overview.progress_label = + gtk_label_new(_("999/999 999 turns, cost: 9999 ")); gtk_box_pack_start(GTK_BOX(hbox), pdialog->overview.progress_label, - TRUE, TRUE, 0); - gtk_progress_configure(GTK_PROGRESS(pdialog->overview.progress_label), - 50, 0, 100); - gtk_progress_set_show_text(GTK_PROGRESS - (pdialog->overview.progress_label), TRUE); - gtk_progress_set_format_string(GTK_PROGRESS - (pdialog->overview.progress_label), - _("%d/%d %d turns")); + TRUE, TRUE, 4); pdialog->overview.buy_command = gtk_accelbutton_new(_("_Buy"), pdialog->accel); @@ -1889,9 +1883,9 @@ *****************************************************************/ static void city_dialog_update_building(struct city_dialog *pdialog) { - char buf[32], buf2[200], *descr; - int turns; + char buf[42], buf2[200], *descr; struct city *pcity = pdialog->pcity; + int turns, cost_to_buy = city_buy_cost(pcity); gfloat pct; gtk_widget_set_sensitive(pdialog->overview.buy_command, !pcity->did_buy); @@ -1902,11 +1896,12 @@ turns = city_turns_to_build(pcity, pcity->currently_building, TRUE, TRUE); my_snprintf(buf, sizeof(buf), - concise_city_production ? "%3d/%3d:%3d" : - PL_("%3d/%3d %3d turn", "%3d/%3d %3d turns", turns), + concise_city_production ? "%3d/%3d:%3d %-4d" : + PL_("%3d/%3d %3d turn, cost: %-4d", + "%3d/%3d %3d turns, cost: %-4d", turns), pcity->shield_stock, get_unit_type(pcity->currently_building)->build_cost, - turns); + turns, cost_to_buy); descr = get_unit_type(pcity->currently_building)->name; pct = (gfloat) pcity->shield_stock / @@ -1925,11 +1920,12 @@ city_turns_to_build(pcity, pcity->currently_building, FALSE, TRUE); my_snprintf(buf, sizeof(buf), - concise_city_production ? "%3d/%3d:%3d" : - PL_("%3d/%3d %3d turn", "%3d/%3d %3d turns", turns), + concise_city_production ? "%3d/%3d:%3d %-4d" : + PL_("%3d/%3d %3d turn, cost: %-4d", + "%3d/%3d %3d turns, cost: %-4d", turns), pcity->shield_stock, get_improvement_type(pcity->currently_building)-> - build_cost, turns); + build_cost, turns, cost_to_buy); pct = (gfloat) pcity->shield_stock / (get_improvement_type(pcity->currently_building)->build_cost + @@ -1943,11 +1939,7 @@ worklist_is_empty(pcity->worklist) ? "" : _(" (worklist)")); gtk_frame_set_label(GTK_FRAME (pdialog->overview.currently_building_frame), buf2); - gtk_progress_set_percentage(GTK_PROGRESS - (pdialog->overview.progress_label), pct); - gtk_progress_set_format_string(GTK_PROGRESS - (pdialog->overview.progress_label), buf); - + gtk_label_set_text(GTK_LABEL(pdialog->overview.progress_label), buf); } /****************************************************************