/pidgin/main: d299a8680115: Fix gevolution build for 3.0.0

Tomasz Wasilczyk twasilczyk at pidgin.im
Fri Jan 31 10:56:13 EST 2014


Changeset: d299a8680115f1696ceb4d41b0e5d2de5b013693
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-01-31 16:56 +0100
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/d299a8680115

Description:

Fix gevolution build for 3.0.0

diffstat:

 pidgin/plugins/gevolution/assoc-buddy.c       |  24 +++++++++++++++---------
 pidgin/plugins/gevolution/eds-utils.c         |   9 ++++++---
 pidgin/plugins/gevolution/gevo-util.c         |  10 ++++++----
 pidgin/plugins/gevolution/gevolution.c        |   8 ++++----
 pidgin/plugins/gevolution/new_person_dialog.c |   2 +-
 5 files changed, 32 insertions(+), 21 deletions(-)

diffs (176 lines):

diff --git a/pidgin/plugins/gevolution/assoc-buddy.c b/pidgin/plugins/gevolution/assoc-buddy.c
--- a/pidgin/plugins/gevolution/assoc-buddy.c
+++ b/pidgin/plugins/gevolution/assoc-buddy.c
@@ -188,7 +188,8 @@ populate_treeview(GevoAssociateBuddyDial
 		return;
 	}
 
-	prpl_id = purple_account_get_protocol_id(dialog->buddy->account);
+	prpl_id = purple_account_get_protocol_id(purple_buddy_get_account(
+		dialog->buddy));
 
 	for (c = cards; c != NULL; c = c->next)
 	{
@@ -207,8 +208,9 @@ populate_treeview(GevoAssociateBuddyDial
 						   -1);
 
 		/* See if this user has the buddy in its list. */
-		protocol_field = gevo_prpl_get_field(dialog->buddy->account,
-											 dialog->buddy);
+		protocol_field = gevo_prpl_get_field(
+			purple_buddy_get_account(dialog->buddy),
+			dialog->buddy);
 
 		if (protocol_field > 0)
 		{
@@ -218,7 +220,8 @@ populate_treeview(GevoAssociateBuddyDial
 
 			for (l = ims; l != NULL; l = l->next)
 			{
-				if (!strcmp(l->data, dialog->buddy->name))
+				if (!strcmp(l->data,
+					purple_buddy_get_name(dialog->buddy)))
 				{
 					GtkTreeSelection *selection;
 
@@ -256,9 +259,10 @@ addrbook_change_cb(GtkComboBox *combo, G
 static void
 new_person_cb(GtkWidget *w, GevoAssociateBuddyDialog *dialog)
 {
-	gevo_new_person_dialog_show(dialog->book, NULL, dialog->buddy->account,
-								dialog->buddy->name, NULL, dialog->buddy,
-								TRUE);
+	gevo_new_person_dialog_show(dialog->book, NULL,
+		purple_buddy_get_account(dialog->buddy),
+		purple_buddy_get_name(dialog->buddy),
+		NULL, dialog->buddy, TRUE);
 
 	delete_win_cb(NULL, NULL, dialog);
 }
@@ -289,13 +293,15 @@ assoc_buddy_cb(GtkWidget *w, GevoAssocia
 					   COLUMN_DATA, &contact,
 					   -1);
 
-	protocol_field = gevo_prpl_get_field(dialog->buddy->account, dialog->buddy);
+	protocol_field = gevo_prpl_get_field(
+		purple_buddy_get_account(dialog->buddy), dialog->buddy);
 
 	if (protocol_field == 0)
 		return; /* XXX */
 
 	list = e_contact_get(contact, protocol_field);
-	list = g_list_append(list, g_strdup(dialog->buddy->name));
+	list = g_list_append(list,
+		g_strdup(purple_buddy_get_name(dialog->buddy)));
 
 	e_contact_set(contact, protocol_field, list);
 
diff --git a/pidgin/plugins/gevolution/eds-utils.c b/pidgin/plugins/gevolution/eds-utils.c
--- a/pidgin/plugins/gevolution/eds-utils.c
+++ b/pidgin/plugins/gevolution/eds-utils.c
@@ -177,7 +177,8 @@ gevo_search_buddy_in_contacts(PurpleBudd
 	EBookQuery *full_query;
 	GSList *groups, *g;
 	EContact *result;
-	EContactField protocol_field = gevo_prpl_get_field(buddy->account, buddy);
+	EContactField protocol_field =
+		gevo_prpl_get_field(purple_buddy_get_account(buddy), buddy);
 
 	if (protocol_field == 0)
 		return NULL;
@@ -187,7 +188,8 @@ gevo_search_buddy_in_contacts(PurpleBudd
 		EBookQuery *queries[2];
 
 		queries[0] = query;
-		queries[1] = e_book_query_field_test(protocol_field, E_BOOK_QUERY_IS, buddy->name);
+		queries[1] = e_book_query_field_test(protocol_field,
+			E_BOOK_QUERY_IS, purple_buddy_get_name(buddy));
 		if (queries[1] == NULL)
 		{
 			purple_debug_error("evolution", "Error in creating protocol query\n");
@@ -199,7 +201,8 @@ gevo_search_buddy_in_contacts(PurpleBudd
 	}
 	else
 	{
-		full_query = e_book_query_field_test(protocol_field, E_BOOK_QUERY_IS, buddy->name);
+		full_query = e_book_query_field_test(protocol_field,
+			E_BOOK_QUERY_IS, purple_buddy_get_name(buddy));
 		if (full_query == NULL)
 		{
 			purple_debug_error("evolution", "Error in creating protocol query\n");
diff --git a/pidgin/plugins/gevolution/gevo-util.c b/pidgin/plugins/gevolution/gevo-util.c
--- a/pidgin/plugins/gevolution/gevo-util.c
+++ b/pidgin/plugins/gevolution/gevo-util.c
@@ -29,7 +29,7 @@ void
 gevo_add_buddy(PurpleAccount *account, const char *group_name,
 			   const char *buddy_name, const char *alias)
 {
-	PurpleConversation *conv = NULL;
+	PurpleIMConversation *conv = NULL;
 	PurpleBuddy *buddy;
 	PurpleGroup *group;
 
@@ -53,8 +53,9 @@ gevo_add_buddy(PurpleAccount *account, c
 
 	if (conv != NULL)
 	{
-		purple_buddy_icon_update(purple_im_conversation_get_icon(PURPLE_CONV_IM(conv)));
-		purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_ADD);
+		purple_buddy_icon_update(purple_im_conversation_get_icon(conv));
+		purple_conversation_update(PURPLE_CONVERSATION(conv),
+			PURPLE_CONVERSATION_UPDATE_ADD);
 	}
 }
 
@@ -81,7 +82,8 @@ gevo_get_groups(void)
 			if (PURPLE_IS_GROUP(gnode))
 			{
 				g = PURPLE_GROUP(gnode);
-				list = g_list_append(list, g->name);
+				list = g_list_append(list,
+					(gpointer)purple_group_get_name(g));
 			}
 		}
 	}
diff --git a/pidgin/plugins/gevolution/gevolution.c b/pidgin/plugins/gevolution/gevolution.c
--- a/pidgin/plugins/gevolution/gevolution.c
+++ b/pidgin/plugins/gevolution/gevolution.c
@@ -248,14 +248,15 @@ menu_item_send_mail_activate_cb(PurpleBl
 		}
 		else
 		{
-			purple_notify_error(NULL, NULL, _("Unable to send email"),
-							  _("The evolution executable was not found in the PATH."));
+			purple_notify_error(NULL, NULL, _("Unable to send "
+				"email"), _("The evolution executable was not "
+				"found in the PATH."), NULL);
 		}
 	}
 	else
 	{
 		purple_notify_error(NULL, NULL, _("Unable to send email"),
-						  _("An email address was not found for this buddy."));
+			_("An email address was not found for this buddy."), NULL);
 	}
 }
 
@@ -515,7 +516,6 @@ get_config_frame(PurplePlugin *plugin)
 static PidginPluginUiInfo ui_info =
 {
 	get_config_frame,	/**< get_config_frame */
-	0,			/**< page_num */
 	/* Padding */
 	NULL,
 	NULL,
diff --git a/pidgin/plugins/gevolution/new_person_dialog.c b/pidgin/plugins/gevolution/new_person_dialog.c
--- a/pidgin/plugins/gevolution/new_person_dialog.c
+++ b/pidgin/plugins/gevolution/new_person_dialog.c
@@ -96,7 +96,7 @@ add_cb(GtkWidget *w, GevoNewPersonDialog
 	char *full_name = NULL;
 
 	if (dialog->person_only)
-		username = dialog->buddy->name;
+		username = purple_buddy_get_name(dialog->buddy);
 	else
 		username = gtk_entry_get_text(GTK_ENTRY(dialog->username));
 



More information about the Commits mailing list