Don't set the minimum column width to the computed or stored value,
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 3 Sep 2009 05:03:57 +0000 (05:03 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 3 Sep 2009 05:03:57 +0000 (05:03 +0000)
use a fixed minimum value and use the other as the size used to display the column.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29680 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/new_packet_list.c

index fe3fbec995e1c87a1637bf21bdfe4f62837b32e1..4a96a831a776ef6114bd8a2b2fa864c065d858da 100644 (file)
@@ -163,12 +163,20 @@ create_view_and_model(void)
                gtk_tree_view_column_set_sizing(col,GTK_TREE_VIEW_COLUMN_FIXED);
                gtk_tree_view_column_set_reorderable(col, TRUE); /* XXX - Should this be saved in the prefs? */
 
+               /* The column can't be adjusted to a size smaller than this 
+                * XXX Should we use a different value for different column formats?
+                */
+               gtk_tree_view_column_set_min_width(col, 40);
+
+               /* Set the size the column will be displayed with */
                col_width = recent_get_column_width(i);
                if(col_width == -1) {
                        layout = gtk_widget_create_pango_layout(packetlist->view, get_column_width_string(get_column_format(i), i));
                        pango_layout_get_pixel_size(layout, &col_width, NULL);
-                       gtk_tree_view_column_set_min_width(col, col_width);
+                       gtk_tree_view_column_set_fixed_width(col, col_width);
                        g_object_unref(G_OBJECT(layout));
+               }else{
+                       gtk_tree_view_column_set_fixed_width(col, col_width);
                }
 
                gtk_tree_view_append_column(GTK_TREE_VIEW(packetlist->view), col);