<URL: http://bugs.freeciv.org/Ticket/Display.html?id=8737 >
I use freeciv with german locale. The problem described here can make
the unit info panel resize itself by > 3 cm. On my 650 MHz Athlon this
takes 3 - 5 _seconds_ .
The problem not only shows when switching between units but also when
moving _one_ unit using the keyboard.
Consider moving a unit from a plains tile with a road on it to an
irrigated (plains) tile with railroad and a fortification:
In german this is (move from tile with):
Ebene
Straße
(to tile with)
(Ebene)
Eisenbahn/Bewässerung/Befestigung
I have made this little patch (as appended) against freeciv svn trunk
to help myself.
It works in most cases by setting a minimum and a default character
count per line for unit_info_label and allowing line wraps.
Misfortunately the latter introduces vertical resizes again. I haven't
had the time to look for a solution of that problem.
Or maybe you know such a solution...
greetings,
Andreas
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
--- client/gui-gtk-2.0/gui_main.c (revision 14138)
+++ client/gui-gtk-2.0/gui_main.c (working copy)
@@ -1147,6 +1147,9 @@
gtk_box_pack_start(GTK_BOX(avbox), unit_info_frame, FALSE, FALSE, 0);
unit_info_label = gtk_label_new("\n\n\n");
+ gtk_label_set_max_width_chars(GTK_LABEL(unit_info_label),25);
+ gtk_label_set_width_chars(GTK_LABEL(unit_info_label),25);
+ gtk_label_set_line_wrap(GTK_LABEL(unit_info_label),TRUE);
gtk_container_add(GTK_CONTAINER(unit_info_frame), unit_info_label);
box = gtk_hbox_new(FALSE,0);
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev