diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-31 01:35:03 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-31 01:35:03 +0800 |
commit | 2e9c95b7ce57b83d888d6709930361a1c8b380c6 (patch) | |
tree | de338a317f15a15253f9189b12f78bff3a5c4a79 | |
parent | 41e7b0cb394ee1834a5ca777c1a7cc0e48247607 (diff) | |
download | gsoc2013-empathy-2e9c95b7ce57b83d888d6709930361a1c8b380c6.tar gsoc2013-empathy-2e9c95b7ce57b83d888d6709930361a1c8b380c6.tar.gz gsoc2013-empathy-2e9c95b7ce57b83d888d6709930361a1c8b380c6.tar.bz2 gsoc2013-empathy-2e9c95b7ce57b83d888d6709930361a1c8b380c6.tar.lz gsoc2013-empathy-2e9c95b7ce57b83d888d6709930361a1c8b380c6.tar.xz gsoc2013-empathy-2e9c95b7ce57b83d888d6709930361a1c8b380c6.tar.zst gsoc2013-empathy-2e9c95b7ce57b83d888d6709930361a1c8b380c6.zip |
Move public methods at the bottom.
svn path=/trunk/; revision=2344
-rw-r--r-- | libempathy-gtk/empathy-contact-selector.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/libempathy-gtk/empathy-contact-selector.c b/libempathy-gtk/empathy-contact-selector.c index 9c7052c3f..0a524a500 100644 --- a/libempathy-gtk/empathy-contact-selector.c +++ b/libempathy-gtk/empathy-contact-selector.c @@ -50,24 +50,6 @@ typedef struct static void contact_selector_changed_cb ( EmpathyContactSelector *selector, gpointer data); -EmpathyContact * -empathy_contact_selector_get_selected (EmpathyContactSelector *selector) -{ - EmpathyContactSelectorPriv *priv = GET_PRIV (selector); - EmpathyContact *contact = NULL; - GtkTreeIter iter; - - g_return_val_if_fail (EMPATHY_IS_CONTACT_SELECTOR (selector), NULL); - - if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (selector), &iter)) - return NULL; - - gtk_tree_model_get (GTK_TREE_MODEL (priv->store), &iter, - EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, &contact, -1); - - return contact; -} - static guint contact_selector_get_number_online_contacts (GtkTreeStore *store) { @@ -350,6 +332,8 @@ empathy_contact_selector_class_init (EmpathyContactSelectorClass *klass) G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } +/* public methods */ + EmpathyContactSelector * empathy_contact_selector_new (EmpathyContactListStore *store) { @@ -357,3 +341,21 @@ empathy_contact_selector_new (EmpathyContactListStore *store) return g_object_new (EMPATHY_TYPE_CONTACT_SELECTOR, "store", store, NULL); } + +EmpathyContact * +empathy_contact_selector_get_selected (EmpathyContactSelector *selector) +{ + EmpathyContactSelectorPriv *priv = GET_PRIV (selector); + EmpathyContact *contact = NULL; + GtkTreeIter iter; + + g_return_val_if_fail (EMPATHY_IS_CONTACT_SELECTOR (selector), NULL); + + if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (selector), &iter)) + return NULL; + + gtk_tree_model_get (GTK_TREE_MODEL (priv->store), &iter, + EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, &contact, -1); + + return contact; +} |