aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-01-31 01:34:55 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-31 01:34:55 +0800
commita949ddf21547c69d33bd663b07ef0bd79ae87983 (patch)
treebcc197b60601234bbdea869972518c1086ef3de8 /libempathy-gtk
parent8aad026deaf3577cc63a75d60ca7951601e300a6 (diff)
downloadgsoc2013-empathy-a949ddf21547c69d33bd663b07ef0bd79ae87983.tar
gsoc2013-empathy-a949ddf21547c69d33bd663b07ef0bd79ae87983.tar.gz
gsoc2013-empathy-a949ddf21547c69d33bd663b07ef0bd79ae87983.tar.bz2
gsoc2013-empathy-a949ddf21547c69d33bd663b07ef0bd79ae87983.tar.lz
gsoc2013-empathy-a949ddf21547c69d33bd663b07ef0bd79ae87983.tar.xz
gsoc2013-empathy-a949ddf21547c69d33bd663b07ef0bd79ae87983.tar.zst
gsoc2013-empathy-a949ddf21547c69d33bd663b07ef0bd79ae87983.zip
Use gtk_tree_model_get_iter_first instead of going through GtkTreePath.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=2341
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-selector.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-contact-selector.c b/libempathy-gtk/empathy-contact-selector.c
index f22b5b35d..fa205c3a0 100644
--- a/libempathy-gtk/empathy-contact-selector.c
+++ b/libempathy-gtk/empathy-contact-selector.c
@@ -71,14 +71,11 @@ empathy_contact_selector_get_selected (EmpathyContactSelector *selector)
static guint
contact_selector_get_number_online_contacts (GtkTreeStore *store)
{
- GtkTreePath *path;
GtkTreeIter tmp_iter;
gboolean is_online;
guint number_online_contacts = 0;
- path = gtk_tree_path_new_first ();
-
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &tmp_iter, path))
+ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &tmp_iter))
{
do
{
@@ -90,8 +87,6 @@ contact_selector_get_number_online_contacts (GtkTreeStore *store)
} while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &tmp_iter));
}
- gtk_tree_path_free (path);
-
return number_online_contacts;
}
@@ -99,14 +94,11 @@ static gboolean
contact_selector_get_iter_for_blank_contact (GtkTreeStore *store,
GtkTreeIter *blank_iter)
{
- GtkTreePath *path;
GtkTreeIter tmp_iter;
EmpathyContact *tmp_contact;
gboolean is_present = FALSE;
- path = gtk_tree_path_new_first ();
-
- if (gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &tmp_iter, path))
+ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &tmp_iter))
{
do
{
@@ -122,8 +114,6 @@ contact_selector_get_iter_for_blank_contact (GtkTreeStore *store,
} while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &tmp_iter));
}
- gtk_tree_path_free (path);
-
return is_present;
}