Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#9719) drawing bug in city window with units in list
Home

[Freeciv-Dev] (PR#9719) drawing bug in city window with units in list

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#9719) drawing bug in city window with units in list
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sat, 18 Sep 2004 14:59:12 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9719 >

> [vasc - Sun Aug 22 18:35:37 2004]:
> 
> This didn't use to happen, so something must have changed. Either in the
> Freeciv source code or recent GTK+ versions.

The bug was introduced when the code was changed recently to use specvecs.
Here is a patch.


Index: client/gui-gtk-2.0/citydlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/citydlg.c,v
retrieving revision 1.91
diff -u -r1.91 citydlg.c
--- client/gui-gtk-2.0/citydlg.c        13 Sep 2004 15:54:50 -0000      1.91
+++ client/gui-gtk-2.0/citydlg.c        18 Sep 2004 21:59:04 -0000
@@ -1526,6 +1526,9 @@
       GtkWidget *cmd, *pix;
       struct unit_node node;
 
+      int unit_height = (is_isometric) ?
+       UNIT_TILE_HEIGHT : UNIT_TILE_HEIGHT + UNIT_TILE_HEIGHT / 2;
+
       cmd = gtk_button_new();
       node.cmd = cmd;
 
@@ -1533,7 +1536,7 @@
       gtk_widget_add_events(cmd,
          GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
 
-      pix = gtk_pixcomm_new(UNIT_TILE_WIDTH, UNIT_TILE_HEIGHT);
+      pix = gtk_pixcomm_new(UNIT_TILE_WIDTH, unit_height);
       node.pix = pix;
 
       gtk_container_add(GTK_CONTAINER(cmd), pix);

[Prev in Thread] Current Thread [Next in Thread]