]> Pileus Git - ~andy/gtk/commitdiff
GtkComboBox(Text): Add documentation about the entry
authorMilan Bouchet-Valat <nalimilan@club.fr>
Mon, 13 Dec 2010 20:45:07 +0000 (21:45 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 4 Jan 2011 15:36:08 +0000 (10:36 -0500)
gtk/gtkcombobox.c
gtk/gtkcomboboxtext.c

index 648b534f322d4a43d3c1cce43462bc3a8ed2f20c..d4a90ec0239fc1833cae1eeb91054db6898ff17d 100644 (file)
  * not restricted to a flat list, it can be a real tree, and the popup will
  * reflect the tree structure.
  *
+ * To allow the user to enter values not in the model, the 'has-entry'
+ * property allows the GtkComboBox to contain a #GtkEntry. This entry
+ * can be accessed by calling gtk_bin_get_child() on the combo box.
+ *
  * For a simple list of textual choices, the model-view API of GtkComboBox
  * can be a bit overwhelming. In this case, #GtkComboBoxText offers a
- * simple alternative.
+ * simple alternative. Both GtkComboBox and #GtkComboBoxText can contain
+ * an entry.
  */
 
 
index 4e67c6c1c1b29e367794ea597a6b04ddc1da9595..a9a09a2dd5b8bd3ae4c69279158f200d9238e425 100644 (file)
  * gtk_combo_box_text_append_text(), gtk_combo_box_text_insert_text()
  * or gtk_combo_box_text_prepend_text() and remove options with
  * gtk_combo_box_text_remove().
+ *
+ * If the GtkComboBoxText contains an entry (via the 'has-entry' property),
+ * its contents can be retrieved using gtk_combo_box_text_get_active_text().
+ * The entry itself can be accessed by calling gtk_bin_get_child() on the
+ * combo box.
  */
 
 G_DEFINE_TYPE (GtkComboBoxText, gtk_combo_box_text, GTK_TYPE_COMBO_BOX);
@@ -336,8 +341,9 @@ gtk_combo_box_text_remove_all (GtkComboBoxText *combo_box)
  * gtk_combo_box_text_get_active_text:
  * @combo_box: A #GtkComboBoxText
  *
- * Returns the currently active string in @combo_box or %NULL if none
- * is selected.
+ * Returns the currently active string in @combo_box, or %NULL if none
+ * is selected. If @combo_box contains an entry, this function will return
+ * its contents (which will not necessarily be an item from the list).
  *
  * Returns: a newly allocated string containing the currently active text.
  *     Must be freed with g_free().