[CF-Devel] bugfix for gtk experience table display

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Fri Apr 18 21:00:02 CDT 2003


In gcfclient , you can get overlapping text in the
experience table display. Even if there is enough space.
You can see this when you make the central column smaller.

The reason was that instead of gtk_table_new (2, 3
we need gtk_table_new (3, 2
as it is rows,columns not vice versa.
Thus we had a 3rd column, eating up space.
I also changed it to rather cut part of table from view than to
make the text overlap.

Bernd Edler
-------------- next part --------------
*** gx11.c.old	Fri Apr 18 23:32:03 2003
--- gx11.c	Fri Apr 18 23:52:21 2003
***************
*** 64,72 ****
  
  #include "config.h"
  
- #ifdef __CYGWIN__
  #include <errno.h>
- #endif
  
  /* gtk */
  #include <gtk/gtk.h>
--- 64,70 ----
***************
*** 2106,2119 ****
       * so that spacing is uniform - this should look better.
       */
  
!     table = gtk_table_new (2, 3, TRUE);
      x=0;
      y=0;
      /* this is all the same - we just pack it in different places */
      for (i=0; i<MAX_SKILL; i++) {
  	sprintf(buf,"%s: %d (%d)", skill_names[i], 0, 0);
  	statwindow.skill_exp[i] = gtk_label_new(buf);
! 	gtk_table_attach(GTK_TABLE(table), statwindow.skill_exp[i], x, x+1, y, y+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
  	x++;
  	if (x==2) { x=0; y++; }
  	gtk_widget_show(statwindow.skill_exp[i]);
--- 2104,2117 ----
       * so that spacing is uniform - this should look better.
       */
  
!     table = gtk_table_new (3, 2, TRUE);
      x=0;
      y=0;
      /* this is all the same - we just pack it in different places */
      for (i=0; i<MAX_SKILL; i++) {
  	sprintf(buf,"%s: %d (%d)", skill_names[i], 0, 0);
  	statwindow.skill_exp[i] = gtk_label_new(buf);
! 	gtk_table_attach(GTK_TABLE(table), statwindow.skill_exp[i], x, x+1, y, y+1, GTK_FILL , 0, 0, 0);
  	x++;
  	if (x==2) { x=0; y++; }
  	gtk_widget_show(statwindow.skill_exp[i]);
    
    


More information about the crossfire mailing list