empathy r2321 - trunk/libempathy-gtk
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2321 - trunk/libempathy-gtk
- Date: Fri, 30 Jan 2009 17:33:59 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 30 17:33:59 2009
New Revision: 2321
URL: http://svn.gnome.org/viewvc/empathy?rev=2321&view=rev
Log:
move get blank iter function
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:33:59 2009
@@ -50,8 +50,6 @@
};
static void changed_cb (GtkComboBox *widget, gpointer data);
-static gboolean get_iter_for_blank_contact (GtkTreeStore *store,
- GtkTreeIter *blank_iter);
EmpathyContact *
@@ -71,6 +69,38 @@
}
+static gboolean
+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))
+ {
+ do
+ {
+ gtk_tree_model_get (GTK_TREE_MODEL (store),
+ &tmp_iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT,
+ &tmp_contact, -1);
+ if (tmp_contact == NULL)
+ {
+ *blank_iter = tmp_iter;
+ is_present = TRUE;
+ break;
+ }
+ } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &tmp_iter));
+ }
+
+ gtk_tree_path_free (path);
+
+ return is_present;
+}
+
+
static void
set_blank_contact (EmpathyContactSelector *selector)
{
@@ -157,38 +187,6 @@
}
-static gboolean
-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))
- {
- do
- {
- gtk_tree_model_get (GTK_TREE_MODEL (store),
- &tmp_iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT,
- &tmp_contact, -1);
- if (tmp_contact == NULL)
- {
- *blank_iter = tmp_iter;
- is_present = TRUE;
- break;
- }
- } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &tmp_iter));
- }
-
- gtk_tree_path_free (path);
-
- return is_present;
-}
-
-
static void
empathy_store_row_changed_cb (EmpathyContactListStore *empathy_store,
GtkTreePath *empathy_path,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]