empathy r2355 - in trunk: libempathy-gtk tests
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2355 - in trunk: libempathy-gtk tests
- Date: Fri, 30 Jan 2009 17:35:35 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 30 17:35:35 2009
New Revision: 2355
URL: http://svn.gnome.org/viewvc/empathy?rev=2355&view=rev
Log:
Pass an EmpathyContactList to _new and create the store from that.
Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>
Modified:
trunk/libempathy-gtk/empathy-contact-selector.c
trunk/libempathy-gtk/empathy-contact-selector.h
trunk/tests/empetit.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:35:35 2009
@@ -308,9 +308,13 @@
/* public methods */
GtkWidget *
-empathy_contact_selector_new (EmpathyContactListStore *store)
+empathy_contact_selector_new (EmpathyContactList *contact_list)
{
- g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store), NULL);
+ EmpathyContactListStore *store;
+
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST (contact_list), NULL);
+
+ store = empathy_contact_list_store_new (contact_list);
return GTK_WIDGET (g_object_new (EMPATHY_TYPE_CONTACT_SELECTOR, "store", store, NULL));
}
Modified: trunk/libempathy-gtk/empathy-contact-selector.h
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-selector.h (original)
+++ trunk/libempathy-gtk/empathy-contact-selector.h Fri Jan 30 17:35:35 2009
@@ -59,7 +59,7 @@
GType empathy_contact_selector_get_type (void) G_GNUC_CONST;
GtkWidget *
-empathy_contact_selector_new (EmpathyContactListStore *store);
+empathy_contact_selector_new (EmpathyContactList *contact_list);
EmpathyContact *
empathy_contact_selector_get_selected (EmpathyContactSelector *selector);
Modified: trunk/tests/empetit.c
==============================================================================
--- trunk/tests/empetit.c (original)
+++ trunk/tests/empetit.c Fri Jan 30 17:35:35 2009
@@ -53,7 +53,6 @@
char *argv[])
{
EmpathyContactManager *manager;
- EmpathyContactListStore *store;
GtkWidget *vbox, *button, *selector;
gtk_init (&argc, &argv);
@@ -61,11 +60,10 @@
empathy_gtk_init ();
manager = empathy_contact_manager_dup_singleton ();
- store = empathy_contact_list_store_new (EMPATHY_CONTACT_LIST (manager));
+ selector = empathy_contact_selector_new (EMPATHY_CONTACT_LIST (manager));
vbox = gtk_vbox_new (FALSE, 2);
- selector = empathy_contact_selector_new (store);
gtk_box_pack_start (GTK_BOX (vbox), selector, FALSE, FALSE, 5);
button = gtk_button_new_with_label ("Chat");
@@ -83,7 +81,6 @@
gtk_main ();
- g_object_unref (store);
g_object_unref (manager);
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]