Commit 5862075e authored by Christian Dywan's avatar Christian Dywan Committed by Benjamin Otte

comboboxtext: Add gtk_combo_box_text_remove_all()

https://bugzilla.gnome.org/show_bug.cgi?id=324899
parent 707d05ba
......@@ -820,6 +820,7 @@ gtk_combo_box_text_append_text
gtk_combo_box_text_insert_text
gtk_combo_box_text_prepend_text
gtk_combo_box_text_remove
gtk_combo_box_text_remove_all
gtk_combo_box_text_get_active_text
<SUBSECTION Standard>
......
......@@ -842,6 +842,7 @@ gtk_combo_box_text_new
gtk_combo_box_text_new_with_entry
gtk_combo_box_text_prepend_text
gtk_combo_box_text_remove
gtk_combo_box_text_remove_all
#endif
#endif
......
......@@ -248,6 +248,25 @@ gtk_combo_box_text_remove (GtkComboBoxText *combo_box,
gtk_list_store_remove (store, &iter);
}
/**
* gtk_combo_box_text_remove_all:
* @combo_box: A #GtkComboBoxText
*
* Removes all the text entries from the combo box.
*
* Since: 3.0
*/
void
gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box)
{
GtkListStore *store;
g_return_if_fail (GTK_IS_COMBO_BOX_TEXT (combo_box));
store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box)));
gtk_list_store_clear (store);
}
/**
* gtk_combo_box_text_get_active_text:
* @combo_box: A #GtkComboBoxText
......
......@@ -69,6 +69,7 @@ void gtk_combo_box_text_prepend_text (GtkComboBoxText *combo_box
const gchar *text);
void gtk_combo_box_text_remove (GtkComboBoxText *combo_box,
gint position);
void gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box);
gchar *gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment