[gtk+/gtk-2-24] gtk_combo_box_get_active_text(): Documentation: Restore old text.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] gtk_combo_box_get_active_text(): Documentation: Restore old text.
- Date: Thu, 25 Nov 2010 10:59:28 +0000 (UTC)
commit 36a1730bb8e18e91d2e5af0c0be796bad68b8f0d
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Nov 25 11:48:25 2010 +0100
gtk_combo_box_get_active_text(): Documentation: Restore old text.
Bring back the note about using this with GtkComboBoxEntry because
otherwise it is a change of behaviour in the stable branch. This does
apparently still work because the get_active_text vfunc is implemented
in GtkComboBoxEntry.
Also make the deprecation note more helpful, giving a hint about what
to do in both cases. Note that the advice is ugly for the
GtkComboBoxEntry case and I wish there was real API for that.
gtk/gtkcombobox.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index e687366..c9652ca 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -5481,14 +5481,21 @@ gtk_combo_box_remove_text (GtkComboBox *combo_box,
* @combo_box: A #GtkComboBox constructed with gtk_combo_box_new_text()
*
* Returns the currently active string in @combo_box or %NULL if none
- * is selected.
+ * is selected. Note that you can only use this function with combo
+ * boxes constructed with gtk_combo_box_new_text() and with
+ * #GtkComboBoxEntry<!-- -->s.
*
* Returns: a newly allocated string containing the currently active text.
* Must be freed with g_free().
*
* Since: 2.6
*
- * Deprecated: 2.24: Use #GtkComboBoxText
+ * Deprecated: 2.24: If you used this with a #GtkComboBox constructed with
+ * gtk_combo_box_new_text() then you should now use #GtkComboBoxText and
+ * gtk_combo_box_text_get_active_text() instead. Or if you used this with a
+ * #GtkComboBoxEntry then you should now use #GtkComboBox with
+ * #GtkComboBox:has-entry as %TRUE and use
+ * gtk_label_get_text (GTK_LABEL (gtk_bin_get_child (GTK_BIN (combobox))).
*/
gchar *
gtk_combo_box_get_active_text (GtkComboBox *combo_box)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]