empathy r2341 - trunk/libempathy-gtk
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2341 - trunk/libempathy-gtk
- Date: Fri, 30 Jan 2009 17:34:55 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 30 17:34:55 2009
New Revision: 2341
URL: http://svn.gnome.org/viewvc/empathy?rev=2341&view=rev
Log:
Use gtk_tree_model_get_iter_first instead of going through GtkTreePath.
Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>
Modified:
trunk/libempathy-gtk/empathy-contact-selector.c
Modified: trunk/libempathy-gtk/empathy-contact-selector.c
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-selector.c (original)
+++ trunk/libempathy-gtk/empathy-contact-selector.c Fri Jan 30 17:34:55 2009
@@ -71,14 +71,11 @@
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 @@
} 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 @@
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 @@
} while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &tmp_iter));
}
- gtk_tree_path_free (path);
-
return is_present;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]