Make gtk_combo_box_entry_set_text_column more forgiving

The assertions in there were unnecessarily restrictive. This has
been reported in bug 564160.
This commit is contained in:
Matthias Clasen 2009-09-04 22:20:28 -04:00
parent 6b7fef09ca
commit d6f3af0777

View File

@ -368,9 +368,10 @@ void
gtk_combo_box_entry_set_text_column (GtkComboBoxEntry *entry_box,
gint text_column)
{
GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (entry_box));
g_return_if_fail (text_column >= 0);
g_return_if_fail (text_column < gtk_tree_model_get_n_columns (gtk_combo_box_get_model (GTK_COMBO_BOX (entry_box))));
g_return_if_fail (entry_box->priv->text_column == -1);
g_return_if_fail (model == NULL || text_column < gtk_tree_model_get_n_columns (model));
entry_box->priv->text_column = text_column;