Commit 2e9c95b7 authored by Xavier Claessens's avatar Xavier Claessens

Move public methods at the bottom.

svn path=/trunk/; revision=2344
parent 41e7b0cb
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment