summaryrefslogtreecommitdiff
path: root/gtk/gtkcomboboxtext.c
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2010-10-21 14:25:08 +0200
committerBenjamin Otte <otte@redhat.com>2010-10-21 14:30:11 +0200
commit5862075e9dbf6ce76b9b18f250d4694ecafe85e5 (patch)
tree9a062b59c1945907f2045364ff590fa0c072c7d9 /gtk/gtkcomboboxtext.c
parent707d05bac0cbe56ba9afe2282e07bfd25d047336 (diff)
downloadgtk+-5862075e9dbf6ce76b9b18f250d4694ecafe85e5.tar.gz
comboboxtext: Add gtk_combo_box_text_remove_all()
https://bugzilla.gnome.org/show_bug.cgi?id=324899
Diffstat (limited to 'gtk/gtkcomboboxtext.c')
-rw-r--r--gtk/gtkcomboboxtext.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c
index 2af9d3f608..25400debe5 100644
--- a/gtk/gtkcomboboxtext.c
+++ b/gtk/gtkcomboboxtext.c
@@ -249,6 +249,25 @@ gtk_combo_box_text_remove (GtkComboBoxText *combo_box,
}
/**
+ * 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
*