diff options
author | Sean Egan <seanegan@pidgin.im> | 2007-01-19 01:57:56 +0000 |
---|---|---|
committer | Sean Egan <seanegan@pidgin.im> | 2007-01-19 01:57:56 +0000 |
commit | ac29654da20c048e8f9e482e6ddeff685d55d1f6 (patch) | |
tree | 2e6fb42753dd3457aa891f477f04a42e9a7a79f6 | |
parent | e51785e1af6edd3766cab335048cfcfb83ba9910 (diff) | |
download | pidgin-ac29654da20c048e8f9e482e6ddeff685d55d1f6.tar.gz |
[gaim-migrate @ 18159]
How's this, Mark?
-rw-r--r-- | gtk/gaimcombobox.c | 14 | ||||
-rw-r--r-- | gtk/gaimcombobox.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gtk/gaimcombobox.c b/gtk/gaimcombobox.c index 64e59ce921..21e4ea01cb 100644 --- a/gtk/gaimcombobox.c +++ b/gtk/gaimcombobox.c @@ -3557,6 +3557,20 @@ gtk_combo_box_remove_text (GtkComboBox *combo_box, gtk_list_store_remove (store, &iter); } +static gchar * +gtk_combo_box_get_active_text (GtkComboBox *combo_box) +{ + GtkTreeIter iter; + gchar *text = NULL; + + g_return_val_if_fail (GTK_IS_LIST_STORE (combo_box->priv->model), NULL); + + if (gtk_combo_box_get_active_iter (combo_box, &iter)) + gtk_tree_model_get (combo_box->priv->model, &iter, + 0, &text, -1); + return text; +} + static gboolean gtk_combo_box_mnemonic_activate (GtkWidget *widget, diff --git a/gtk/gaimcombobox.h b/gtk/gaimcombobox.h index 196da02922..1b61352fb4 100644 --- a/gtk/gaimcombobox.h +++ b/gtk/gaimcombobox.h @@ -98,6 +98,7 @@ void gtk_combo_box_prepend_text (GtkComboBox *combo_box, const gchar *text); void gtk_combo_box_remove_text (GtkComboBox *combo_box, gint position); +gchar *gtk_combo_box_get_active_text (GtkComboBox *combo_box); /* programmatic control */ void gtk_combo_box_popup (GtkComboBox *combo_box); |