# HG changeset patch # User Sean Egan # Date 1169171876 0 # Node ID 06591d48f8a43d8c914b77621a522d67d685cb1b # Parent 7162a5ebb2f714d9f83ff6d7bc8cdc6d55d58119 [gaim-migrate @ 18159] How's this, Mark? committer: Tailor Script diff -r 7162a5ebb2f7 -r 06591d48f8a4 gtk/gaimcombobox.c --- 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, diff -r 7162a5ebb2f7 -r 06591d48f8a4 gtk/gaimcombobox.h --- 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);