PATCH - small bug in mailbox window?



hi everyone,


One annoying thing I noticed was that my mailbox names were being truncated at a certain point.. this was very annoying as I plan on having many nested mailboxes (as I do now in Eudora).

I'm using Balsa 0.4.9 with gnome 0.99.5 and gtk 1.1.14. (on intel RH 5.2)

In looking through the code in balsa-mblist.c, I started playing around width the magic width values on line 215-217... I noticed that if I changed the width in the first column, it fixed the problem, but the other two had no effect.

This made me wonder, are there really three columns in this mailbox ctree? I'm a gtk novice, so I foolishly changed the ctree setup on line 197 from: 

gtk_ctree_construct (GTK_CTREE (tree), 3, 0, titles);

to:

gtk_ctree_construct (GTK_CTREE (tree), 1, 0, titles);

That is, I changed the ctree to 1 column.

This fixed the problem and my mailbox ctree looked nice again.

Is there a logical reason the ctree was set to 3 columns? 

If there is, maybe there is a gtk bug here?

Attached is a patch which makes this change, and removes the two lines (216-217) which set the width on the mysterious redundant columns.

(patch made using diff -C 2. I just run patch < balsapatch in the src folder and say "y" if it asked me if it reversed.. Sorry I don't know a better way than this yet).

This is just a small annoying thing, but it helps I think. 

thanks,
wayne
*** balsa-mblist.c	Wed Feb  3 14:55:10 1999
--- balsa-mblist.orig	Wed Feb  3 14:54:23 1999
***************
*** 195,199 ****
    gtk_widget_push_visual (gdk_imlib_get_visual ());
    gtk_widget_push_colormap (gdk_imlib_get_colormap ());
!   gtk_ctree_construct (GTK_CTREE (tree), 1, 0, titles);
    if ( tree->display_content_info )    
      gtk_clist_column_titles_show(GTK_CLIST (tree)); 
--- 195,199 ----
    gtk_widget_push_visual (gdk_imlib_get_visual ());
    gtk_widget_push_colormap (gdk_imlib_get_colormap ());
!   gtk_ctree_construct (GTK_CTREE (tree), 3, 0, titles);
    if ( tree->display_content_info )    
      gtk_clist_column_titles_show(GTK_CLIST (tree)); 
***************
*** 214,217 ****
--- 214,219 ----
    gtk_clist_set_row_height (GTK_CLIST (tree), 16);
    gtk_clist_set_column_width (GTK_CLIST (tree), 0, 80);
+   gtk_clist_set_column_width (GTK_CLIST (tree), 1, 45);
+   gtk_clist_set_column_width (GTK_CLIST (tree), 2, 45);
  
    gtk_signal_connect (GTK_OBJECT (tree), "tree_select_row",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]