--- mysql-query-browser/source/linux/MQResultSetView.cc~ 2007-04-27 14:46:09.000000000 +0200 +++ mysql-query-browser/source/linux/MQResultSetView.cc 2009-01-02 21:27:54.000000000 +0100 @@ -474,7 +474,24 @@ PIXCACHE->load("field_overlay_view.png"), PIXCACHE->load("field_overlay_null.png")); rend->set_blob_icon(PIXCACHE->load("blob_icon.png")); - rend->set_max_text_width(prefs.max_blob_length); + if (prefs.max_blob_length == 0) + { + unsigned int w = 1; + + if (result->columns[i].column_type == MYX_RSCT_TEXT) + for (unsigned int j = 0; j < result->rows_num; j++) + { + glong this_len = g_utf8_strlen(result->rows[j].fields[i].value, + result->rows[j].fields[i].value_length); + if (this_len > w) + w = this_len; + } + rend->set_max_text_width(w); + } + else + { + rend->set_max_text_width(prefs.max_blob_length); + } rend->property_column()= i; rend->set_delegate(this); --- mysql-query-browser/res/linux/qb_preferences.glade~ 2006-05-16 03:04:19.000000000 +0200 +++ mysql-query-browser/res/linux/qb_preferences.glade 2009-01-02 19:14:04.000000000 +0100 @@ -116,7 +116,8 @@ True <small>BLOB/text columns in resultsets will be truncated -to this size for display.</small> +to this size for display. Value 0 means automatic +column width (i.e., width of largest value).</small> False True GTK_JUSTIFY_LEFT