/soc/2013/ankitkv/gobjectification: 25482fde92b3: Merged default...

Ankit Vani a at nevitus.org
Sat Feb 1 13:53:29 EST 2014


Changeset: 25482fde92b36271f3b65358f404a636e0fab102
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-02-02 00:13 +0530
Branch:	 gtkdoc-conversion
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/25482fde92b3

Description:

Merged default branch

diffstat:

 pidgin/plugins/gevolution/assoc-buddy.c       |  41 +++++++++-----------------
 pidgin/plugins/gevolution/eds-utils.c         |  10 +++--
 pidgin/plugins/gevolution/gevo-util.c         |  10 +++--
 pidgin/plugins/gevolution/gevolution.c        |   8 ++--
 pidgin/plugins/gevolution/gevolution.h        |   1 -
 pidgin/plugins/gevolution/new_person_dialog.c |   2 +-
 6 files changed, 32 insertions(+), 40 deletions(-)

diffs (233 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
@@ -22,7 +22,6 @@
 #include "gtkblist.h"
 #include "pidgin.h"
 #include "gtkutils.h"
-#include "gtkimhtml.h"
 
 #include "debug.h"
 
@@ -188,7 +187,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 +207,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 +219,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 +258,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 +292,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);
 
@@ -319,7 +324,6 @@ gevo_associate_buddy_dialog_new(PurpleBu
 	GtkWidget *hbox;
 	GtkWidget *bbox;
 	GtkWidget *sep;
-	GtkWidget *expander;
 	GtkTreeSelection *selection;
 	GtkCellRenderer *cell;
 
@@ -419,21 +423,6 @@ gevo_associate_buddy_dialog_new(PurpleBu
 					 G_CALLBACK(addrbook_change_cb), dialog);
 	gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->addrbooks_combo), 0);
 
-	/* Add the expander */
-	expander = gtk_expander_new_with_mnemonic(_("User _details"));
-	gtk_box_pack_start(GTK_BOX(vbox), expander, FALSE, FALSE, 0);
-	gtk_widget_show(expander);
-
-	/*
-	 * User details
-	 */
-
-	/* Textview */
-	dialog->imhtml = gtk_imhtml_new(NULL, NULL);
-	gtk_container_add(GTK_CONTAINER(expander), 
-		pidgin_make_scrollable(dialog->imhtml, GTK_POLICY_NEVER, GTK_POLICY_ALWAYS, GTK_SHADOW_IN, -1, -1));
-	gtk_widget_show(dialog->imhtml);
-
 	/* Separator. */
 	sep = gtk_hseparator_new();
 	gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 0);
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
@@ -23,7 +23,6 @@
 #include "gtkblist.h"
 #include "pidgin.h"
 #include "gtkutils.h"
-#include "gtkimhtml.h"
 
 #include "debug.h"
 #include "gevolution.h"
@@ -177,7 +176,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 +187,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 +200,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/gevolution.h b/pidgin/plugins/gevolution/gevolution.h
--- a/pidgin/plugins/gevolution/gevolution.h
+++ b/pidgin/plugins/gevolution/gevolution.h
@@ -97,7 +97,6 @@ typedef struct
 	GtkWidget *addrbooks_combo;
 	GtkWidget *search_field;
 	GtkWidget *assoc_button;
-	GtkWidget *imhtml;
 	GtkListStore *model;
 
 	GtkTreeModel *addrbooks;
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