diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-10-23 19:28:05 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-10-23 19:34:20 +0200 |
commit | 7651c231e0c6295e8aaa8de23931004ddfdd288b (patch) | |
tree | a7bf0891ca8bcf734c6e1a9ce34211cdcb1515af /gtk/gtkcomboboxtext.c | |
parent | 051dcde4bf8b1852bfbd903a31be3f03d2ed3339 (diff) | |
download | gtk+-7651c231e0c6295e8aaa8de23931004ddfdd288b.tar.gz |
Revert the id-column patch
It didn't quite turn out as I wanted it.
I'll put it in bug 619148 for now.
Diffstat (limited to 'gtk/gtkcomboboxtext.c')
-rw-r--r-- | gtk/gtkcomboboxtext.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c index d8df72fdf1..db3a4e86aa 100644 --- a/gtk/gtkcomboboxtext.c +++ b/gtk/gtkcomboboxtext.c @@ -72,7 +72,7 @@ gtk_combo_box_text_init (GtkComboBoxText *combo_box) { GtkListStore *store; - store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT); + store = gtk_list_store_new (1, G_TYPE_STRING); gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (store)); g_object_unref (store); } @@ -102,7 +102,6 @@ gtk_combo_box_text_new (void) { return g_object_new (GTK_TYPE_COMBO_BOX_TEXT, "entry-text-column", 0, - "id-column", 1, NULL); } @@ -122,7 +121,6 @@ gtk_combo_box_text_new_with_entry (void) return g_object_new (GTK_TYPE_COMBO_BOX_TEXT, "has-entry", TRUE, "entry-text-column", 0, - "id-column", 1, NULL); } @@ -173,27 +171,6 @@ gtk_combo_box_text_insert_text (GtkComboBoxText *combo_box, gint position, const gchar *text) { - gtk_combo_box_text_insert_text_with_id (combo_box, position, text, 0); -} - -/** - * gtk_combo_box_text_insert_text_with_id: - * @combo_box: A #GtkComboBoxText - * @position: An index to insert @text - * @text: A string - * @id: a numeric ID for this value - * - * Inserts @text at @position in the list of strings stored in @combo_box, - * and sets its numeric ID to @id. See #GtkComboBox::id-column. - * - * Since: 3.0 - */ -void -gtk_combo_box_text_insert_text_with_id (GtkComboBoxText *combo_box, - gint position, - const gchar *text, - gint id) -{ GtkListStore *store; GtkTreeIter iter; gint text_column; @@ -209,18 +186,11 @@ gtk_combo_box_text_insert_text_with_id (GtkComboBoxText *combo_box, text_column = gtk_combo_box_get_entry_text_column (GTK_COMBO_BOX (combo_box)); column_type = gtk_tree_model_get_column_type (GTK_TREE_MODEL (store), text_column); g_return_if_fail (column_type == G_TYPE_STRING); - id_column = gtk_combo_box_get_id_column (GTK_COMBO_BOX (combo_box)); - if (id_column != -1) - { - column_type = gtk_tree_model_get_column_type (GTK_TREE_MODEL (store), id_column); - g_return_if_fail (column_type == G_TYPE_INT); - } gtk_list_store_insert (store, &iter, position); - gtk_list_store_set (store, &iter, text_column, text, id_column, id, -1); + gtk_list_store_set (store, &iter, text_column, text, -1); } - /** * gtk_combo_box_text_remove: * @combo_box: A #GtkComboBox |