Mercurial > pidgin
changeset 15366:06591d48f8a4
[gaim-migrate @ 18159]
How's this, Mark?
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 19 Jan 2007 01:57:56 +0000 |
parents | 7162a5ebb2f7 |
children | 4ccce24fdc67 |
files | gtk/gaimcombobox.c gtk/gaimcombobox.h |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/gaimcombobox.c Thu Jan 18 20:19:41 2007 +0000 +++ b/gtk/gaimcombobox.c Fri Jan 19 01:57:56 2007 +0000 @@ -3557,6 +3557,20 @@ 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,
--- a/gtk/gaimcombobox.h Thu Jan 18 20:19:41 2007 +0000 +++ b/gtk/gaimcombobox.h Fri Jan 19 01:57:56 2007 +0000 @@ -98,6 +98,7 @@ 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);