Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] CLS column / font problem

From: Stephen Fisher <stephentfisher@xxxxxxxxx>
Date: Tue, 16 Jan 2007 19:18:33 -0800
Has anyone else noticed that the CLS time column is not wide enough for 
the contents when you start a new capture when using the date+time or 
just time?  Adjusting the time precision fixes it.  Opening a new 
capture file does not have this problem.  I'm seeing this on Ethereal 
0.99.0 and Wireshark SVN on Windows and Unix.

I've traced the problem down to gtk/packet_list.c line 477:

	gtk_widget_modify_font(packet_list, font);

If you place a printf before and after it to display the string 
pango_font_description_to_string(packet_list->style->font_desc), it 
remains unchanged from the GTK default of Sans 10.  Font is Monospace 10 
(proven with a similar printf statement).

This appears to be causing the width of the CLS time column to be 
calculated with the wrong font (Sans 10) instead of Monospace 10.

A work-around is to modify the font in the GtkWidget packet_list 
directly:

	packet_list->style->font_desc = font;

Anyone have an idea why this is happening?  This is the closest message 
I've found in the gtk-list archives describing this issue:

http://mail.gnome.org/archives/gtk-app-devel-list/2002-July/msg00090.html


Thanks,
  Steve