/soc/2013/ankitkv/gobjectification: c0aef3b64c56: Merged default...

Ankit Vani a at nevitus.org
Thu Sep 12 10:26:02 EDT 2013


Changeset: c0aef3b64c56f7e76b7e02293f1460f925fd994c
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-12 19:08 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/c0aef3b64c56

Description:

Merged default branch

diffstat:

 finch/gntaccount.c                           |   22 +-
 finch/gntblist.c                             |   36 +-
 finch/gntcertmgr.c                           |   10 +-
 finch/gntconn.c                              |    3 +-
 finch/gntplugin.c                            |    5 +-
 finch/gntpounce.c                            |    3 +-
 finch/gntprefs.c                             |    5 +-
 finch/gntrequest.c                           |   53 +-
 finch/gntstatus.c                            |    3 +-
 finch/plugins/gnthistory.c                   |    2 +-
 libpurple/account.c                          |   29 +-
 libpurple/conversation.c                     |    8 +-
 libpurple/conversationtypes.c                |    4 +-
 libpurple/plugins/autoaccept.c               |   12 +-
 libpurple/plugins/buddynote.c                |    3 +-
 libpurple/plugins/idle.c                     |    9 +-
 libpurple/plugins/keyrings/internalkeyring.c |    2 +-
 libpurple/plugins/offlinemsg.c               |    3 +-
 libpurple/plugins/perl/common/Request.xs     |    6 +-
 libpurple/protocols/gg/account.c             |    4 +-
 libpurple/protocols/gg/gg.c                  |   13 +-
 libpurple/protocols/gg/pubdir-prpl.c         |   72 +--
 libpurple/protocols/gg/purplew.c             |    4 +-
 libpurple/protocols/gg/status.c              |    2 +-
 libpurple/protocols/jabber/auth.c            |    2 +-
 libpurple/protocols/jabber/auth_plain.c      |    2 +-
 libpurple/protocols/jabber/buddy.c           |    9 +-
 libpurple/protocols/jabber/chat.c            |    2 +-
 libpurple/protocols/jabber/jabber.c          |   43 +-
 libpurple/protocols/jabber/presence.c        |    2 +-
 libpurple/protocols/jabber/si.c              |   11 +-
 libpurple/protocols/jabber/usernick.c        |    2 +-
 libpurple/protocols/jabber/xdata.c           |   13 +-
 libpurple/protocols/msn/error.c              |    2 +-
 libpurple/protocols/msn/msn.c                |   23 +-
 libpurple/protocols/msn/userlist.c           |    3 +-
 libpurple/protocols/mxit/actions.c           |   12 +-
 libpurple/protocols/mxit/login.c             |   15 +-
 libpurple/protocols/mxit/splashscreen.c      |    4 +-
 libpurple/protocols/myspace/myspace.c        |    4 +-
 libpurple/protocols/myspace/user.c           |   12 +-
 libpurple/protocols/novell/novell.c          |    2 +-
 libpurple/protocols/oscar/oscar.c            |   16 +-
 libpurple/protocols/oscar/peer.c             |    2 +-
 libpurple/protocols/sametime/sametime.c      |   14 +-
 libpurple/protocols/silc/buddy.c             |   12 +-
 libpurple/protocols/silc/chat.c              |   10 +-
 libpurple/protocols/silc/ops.c               |    2 +-
 libpurple/protocols/silc/pk.c                |    2 +-
 libpurple/protocols/silc/silc.c              |    4 +-
 libpurple/protocols/silc/util.c              |    4 +-
 libpurple/protocols/silc/wb.c                |    2 +-
 libpurple/protocols/yahoo/libymsg.c          |   21 +-
 libpurple/protocols/yahoo/yahoo_aliases.c    |    4 +-
 libpurple/prpl.c                             |   17 +
 libpurple/prpl.h                             |   12 +
 libpurple/request.c                          |  544 ++++++++++++++++++--------
 libpurple/request.h                          |  441 ++++++++++++++-------
 libpurple/server.c                           |   10 +-
 libpurple/xfer.c                             |   39 +-
 pidgin/gtkaccount.c                          |   12 +-
 pidgin/gtkblist.c                            |   11 +-
 pidgin/gtkcertmgr.c                          |    8 +-
 pidgin/gtkconv.c                             |   11 +-
 pidgin/gtkdebug.c                            |    4 +-
 pidgin/gtkdialogs.c                          |   34 +-
 pidgin/gtkimhtmltoolbar.c                    |    2 +-
 pidgin/gtklog.c                              |    2 +-
 pidgin/gtkmedia.c                            |    9 +-
 pidgin/gtkplugin.c                           |   11 +-
 pidgin/gtkpounce.c                           |   11 +-
 pidgin/gtkprefs.c                            |    5 +-
 pidgin/gtkprivacy.c                          |   26 +-
 pidgin/gtkrequest.c                          |  303 +++++++++-----
 pidgin/gtksavedstatuses.c                    |    2 +-
 pidgin/gtkstatusbox.c                        |    2 +-
 pidgin/gtkutils.c                            |   14 +-
 pidgin/gtkwebviewtoolbar.c                   |   12 +-
 pidgin/plugins/disco/gtkdisco.c              |    2 +-
 79 files changed, 1229 insertions(+), 884 deletions(-)

diffs (truncated from 4532 to 300 lines):

diff --git a/finch/gntaccount.c b/finch/gntaccount.c
--- a/finch/gntaccount.c
+++ b/finch/gntaccount.c
@@ -719,10 +719,9 @@ delete_account_cb(GntWidget *widget, Gnt
 			purple_account_get_username(account));
 
 	purple_request_action(account, _("Delete Account"), prompt, NULL,
-						  PURPLE_DEFAULT_ACTION_NONE,
-						  account, NULL, NULL, account, 2,
-						  _("Delete"), really_delete_account,
-						  _("Cancel"), NULL);
+		PURPLE_DEFAULT_ACTION_NONE,
+		purple_request_cpar_from_account(account), account, 2,
+		_("Delete"), really_delete_account, _("Cancel"), NULL);
 	g_free(prompt);
 }
 
@@ -1014,12 +1013,11 @@ request_add(PurpleAccount *account, cons
 	data->alias    = (alias != NULL ? g_strdup(alias) : NULL);
 
 	buffer = make_info(account, gc, remote_user, id, alias, msg);
-	purple_request_action(NULL, NULL, _("Add buddy to your list?"),
-	                    buffer, PURPLE_DEFAULT_ACTION_NONE,
-						account, remote_user, NULL,
-						data, 2,
-	                    _("Add"),    G_CALLBACK(add_user_cb),
-	                    _("Cancel"), G_CALLBACK(free_add_user_data));
+	purple_request_action(NULL, NULL, _("Add buddy to your list?"), buffer,
+		PURPLE_DEFAULT_ACTION_NONE,
+		purple_request_cpar_from_account(account), data, 2,
+		_("Add"), G_CALLBACK(add_user_cb),
+		_("Cancel"), G_CALLBACK(free_add_user_data));
 	g_free(buffer);
 }
 
@@ -1104,7 +1102,7 @@ finch_request_authorize(PurpleAccount *a
 
 		widget = purple_request_action(NULL, _("Authorize buddy?"), buffer, NULL,
 			PURPLE_DEFAULT_ACTION_NONE,
-			account, remote_user, NULL,
+			purple_request_cpar_from_account(account),
 			aa, 2,
 			_("Authorize"), authorize_and_add_cb,
 			_("Deny"), deny_no_add_cb);
@@ -1131,7 +1129,7 @@ finch_request_authorize(PurpleAccount *a
 	} else {
 		uihandle = purple_request_action(NULL, _("Authorize buddy?"), buffer, NULL,
 			PURPLE_DEFAULT_ACTION_NONE,
-			account, remote_user, NULL,
+			purple_request_cpar_from_account(account),
 			user_data, 2,
 			_("Authorize"), auth_cb,
 			_("Deny"), deny_cb);
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -694,7 +694,7 @@ finch_request_add_buddy(PurpleAccount *a
 			fields,
 			_("Add"), G_CALLBACK(add_buddy_cb),
 			_("Cancel"), NULL,
-			account, NULL, NULL,
+			purple_request_cpar_from_account(account),
 			NULL);
 }
 
@@ -792,8 +792,7 @@ finch_request_add_chat(PurpleAccount *ac
 	purple_request_fields(NULL, _("Add Chat"), NULL,
 			_("You can edit more information from the context menu later."),
 			fields, _("Add"), G_CALLBACK(add_chat_cb), _("Cancel"), NULL,
-			NULL, NULL, NULL,
-			NULL);
+			NULL, NULL);
 }
 
 static void
@@ -840,8 +839,7 @@ finch_request_add_group(void)
 	purple_request_input(NULL, _("Add Group"), NULL, _("Enter the name of the group"),
 			NULL, FALSE, FALSE, NULL,
 			_("Add"), G_CALLBACK(add_group_cb), _("Cancel"), NULL,
-			NULL, NULL, NULL,
-			NULL);
+			NULL, NULL);
 }
 
 static PurpleBlistUiOps blist_ui_ops =
@@ -1153,8 +1151,7 @@ chat_components_edit(PurpleBlistNode *se
 
 	purple_request_fields(NULL, _("Edit Chat"), NULL, _("Please Update the necessary fields."),
 			fields, _("Edit"), G_CALLBACK(chat_components_edit_ok), _("Cancel"), NULL,
-			NULL, NULL, NULL,
-			chat);
+			NULL, chat);
 }
 
 static void
@@ -1391,8 +1388,7 @@ finch_blist_rename_node_cb(PurpleBlistNo
 	purple_request_input(node, text, prompt, _("Enter empty string to reset the name."),
 			name, FALSE, FALSE, NULL, text, G_CALLBACK(rename_blist_node),
 			_("Cancel"), NULL,
-			NULL, NULL, NULL,
-			node);
+			NULL, node);
 
 	g_free(prompt);
 }
@@ -1521,7 +1517,7 @@ finch_blist_remove_node_cb(PurpleBlistNo
 	purple_request_action(node, _("Confirm Remove"),
 			primary, sec,
 			1,
-			account, name, NULL,
+			purple_request_cpar_from_account(account),
 			node, 2,
 			_("Remove"), finch_blist_remove_node,
 			_("Cancel"), NULL);
@@ -2654,7 +2650,7 @@ block_select_cb(gpointer data, PurpleReq
 	PurpleAccount *account = purple_request_fields_get_account(fields, "account");
 	const char *name = purple_request_fields_get_string(fields,  "screenname");
 	if (account && name && *name != '\0') {
-		if (purple_request_fields_get_choice(fields, "block") == 1) {
+		if (GPOINTER_TO_INT(purple_request_fields_get_choice(fields, "block")) == 1) {
 			purple_account_privacy_deny(account, name);
 		} else {
 			purple_account_privacy_allow(account, name);
@@ -2687,9 +2683,9 @@ block_select(GntMenuItem *item, gpointer
 	purple_request_field_set_required(field, TRUE);
 	purple_request_field_group_add_field(group, field);
 
-	field = purple_request_field_choice_new("block", _("Block/Unblock"), 1);
-	purple_request_field_choice_add(field, _("Block"));
-	purple_request_field_choice_add(field, _("Unblock"));
+	field = purple_request_field_choice_new("block", _("Block/Unblock"), GINT_TO_POINTER(1));
+	purple_request_field_choice_add(field, _("Block"), GINT_TO_POINTER(1));
+	purple_request_field_choice_add(field, _("Unblock"), GINT_TO_POINTER(2));
 	purple_request_field_group_add_field(group, field);
 
 	purple_request_fields(purple_blist_get_buddy_list(), _("Block/Unblock"),
@@ -2699,8 +2695,7 @@ block_select(GntMenuItem *item, gpointer
 						fields,
 						_("OK"), G_CALLBACK(block_select_cb),
 						_("Cancel"), NULL,
-						NULL, NULL, NULL,
-						NULL);
+						NULL, NULL);
 }
 
 /* send_im_select* -- Xerox */
@@ -2750,8 +2745,7 @@ send_im_select(GntMenuItem *item, gpoint
 						fields,
 						_("OK"), G_CALLBACK(send_im_select_cb),
 						_("Cancel"), NULL,
-						NULL, NULL, NULL,
-						NULL);
+						NULL, NULL);
 }
 
 static void
@@ -2824,8 +2818,7 @@ join_chat_select(GntMenuItem *item, gpoi
 						fields,
 						_("Join"), G_CALLBACK(join_chat_select_cb),
 						_("Cancel"), NULL,
-						NULL, NULL, NULL,
-						NULL);
+						NULL, NULL);
 }
 
 static void
@@ -2886,8 +2879,7 @@ view_log_cb(GntMenuItem *item, gpointer 
 						fields,
 						_("OK"), G_CALLBACK(view_log_select_cb),
 						_("Cancel"), NULL,
-						NULL, NULL, NULL,
-						NULL);
+						NULL, NULL);
 }
 
 static void
diff --git a/finch/gntcertmgr.c b/finch/gntcertmgr.c
--- a/finch/gntcertmgr.c
+++ b/finch/gntcertmgr.c
@@ -89,8 +89,7 @@ tls_peers_mgmt_import_ok_cb(gpointer dat
 				default_hostname, FALSE, FALSE, NULL,
 				_("OK"), G_CALLBACK(tls_peers_mgmt_import_ok2_cb),
 				_("Cancel"), G_CALLBACK(tls_peers_mgmt_import_cancel2_cb),
-				NULL, NULL, NULL,
-				crt);
+				NULL, crt);
 		g_free(default_hostname);
 	} else {
 		gchar * secondary;
@@ -112,7 +111,7 @@ add_cert_cb(GntWidget *button, gpointer 
 			FALSE,
 			G_CALLBACK(tls_peers_mgmt_import_ok_cb),
 			NULL,
-			NULL, NULL, NULL, NULL );
+			NULL, NULL );
 }
 
 /* Save certs in some file */
@@ -160,8 +159,7 @@ save_cert_cb(GntWidget *button, gpointer
 			"certificate.pem", TRUE,
 			G_CALLBACK(tls_peers_mgmt_export_ok_cb),
 			G_CALLBACK(purple_certificate_destroy),
-			NULL, NULL, NULL,
-			crt);
+			NULL, crt);
 }
 
 /* Show information about a cert */
@@ -236,7 +234,7 @@ delete_cert_cb(GntWidget *button, gpoint
 	purple_request_yes_no((void *)key, _("Confirm certificate delete"),
 			primary, NULL,
 			0,
-			NULL, NULL, NULL,
+			NULL,
 			g_strdup(key),
 			tls_peers_mgmt_delete_confirm_cb,
 			g_free);
diff --git a/finch/gntconn.c b/finch/gntconn.c
--- a/finch/gntconn.c
+++ b/finch/gntconn.c
@@ -132,8 +132,7 @@ finch_connection_report_disconnect(Purpl
 				"correct the error and re-enable the account."), text);
 
 		purple_request_action(account, NULL, primary, secondary, 2,
-							account, NULL, NULL,
-							account, 3,
+			purple_request_cpar_from_account(account), account, 3,
 							_("OK"), NULL,
 							_("Modify Account"), PURPLE_CALLBACK(ce_modify_account_cb),
 							_("Re-enable Account"), PURPLE_CALLBACK(ce_enable_account_cb));
diff --git a/finch/gntplugin.c b/finch/gntplugin.c
--- a/finch/gntplugin.c
+++ b/finch/gntplugin.c
@@ -332,7 +332,7 @@ install_plugin_cb(GntWidget *w, gpointer
 	purple_request_close_with_handle(&handle);
 	purple_request_file(&handle, _("Select plugin to install"), NULL,
 			FALSE, G_CALLBACK(install_selected_file_cb), NULL,
-			NULL, NULL, NULL, &handle);
+			NULL, &handle);
 	g_signal_connect_swapped(G_OBJECT(w), "destroy", G_CALLBACK(purple_request_close_with_handle), &handle);
 }
 
@@ -532,8 +532,7 @@ process_pref_frame(PurplePluginPrefFrame
 
 	ret = purple_request_fields(NULL, _("Preferences"), NULL, NULL, fields,
 			_("Save"), G_CALLBACK(finch_request_save_in_prefs), _("Cancel"), NULL,
-			NULL, NULL, NULL,
-			NULL);
+			NULL, NULL);
 	g_signal_connect_swapped(G_OBJECT(ret), "destroy", G_CALLBACK(free_stringlist), stringlist);
 	return ret;
 }
diff --git a/finch/gntpounce.c b/finch/gntpounce.c
--- a/finch/gntpounce.c
+++ b/finch/gntpounce.c
@@ -675,8 +675,7 @@ pounces_manager_delete_cb(GntButton *but
 	pouncee = purple_pounce_get_pouncee(pounce);
 	buf = g_strdup_printf(_("Are you sure you want to delete the pounce on %s for %s?"), pouncee, pouncer);
 	purple_request_action(pounce, NULL, buf, NULL, 0,
-						account, pouncee, NULL,
-						pounce, 2,
+		purple_request_cpar_from_account(account), pounce, 2,
 						_("Delete"), pounces_manager_delete_confirm_cb,
 						_("Cancel"), NULL);
 	g_free(buf);
diff --git a/finch/gntprefs.c b/finch/gntprefs.c
--- a/finch/gntprefs.c
+++ b/finch/gntprefs.c
@@ -268,8 +268,7 @@ void finch_prefs_show_all()
 	pref_request.showing = TRUE;
 	pref_request.window = purple_request_fields(NULL, _("Preferences"), NULL, NULL, fields,
 			_("Save"), G_CALLBACK(save_cb), _("Cancel"), free_strings,
-			NULL, NULL, NULL,
-			NULL);
+			NULL, NULL);
 }
 
 static void
@@ -307,5 +306,5 @@ void finch_prefs_show_keyring(void)
 		_("Keyring settings"), NULL, NULL, fields,
 		_("Save"), G_CALLBACK(finch_prefs_keyring_save),
 		_("Cancel"), G_CALLBACK(finch_prefs_keyring_cancel),
-		NULL, NULL, NULL, NULL);
+		NULL, NULL);
 }
diff --git a/finch/gntrequest.c b/finch/gntrequest.c
--- a/finch/gntrequest.c
+++ b/finch/gntrequest.c
@@ -156,7 +156,7 @@ finch_request_input(const char *title, c
 		gboolean multiline, gboolean masked, gchar *hint,
 		const char *ok_text, GCallback ok_cb,
 		const char *cancel_text, GCallback cancel_cb,
-		PurpleAccount *account, const char *who, PurpleConversation *conv,
+		PurpleRequestCommonParameters *cpar,
 		void *user_data)
 {
 	GntWidget *window, *box, *entry;
@@ -197,7 +197,7 @@ request_choice_cb(GntWidget *button, Gnt
 {
 	PurpleRequestChoiceCb callback = g_object_get_data(G_OBJECT(button), "activate-callback");



More information about the Commits mailing list