/soc/2013/bhaskar/plugins-window: 6a2ed7189868: Merged default

Bhaskar Kandiyal bkandiyal at gmail.com
Sun Sep 22 15:58:57 EDT 2013


Changeset: 6a2ed718986864ba01c850778921ba91d69ec2fc
Author:	 Bhaskar Kandiyal <bkandiyal at gmail.com>
Date:	 2013-09-22 18:30 +0530
Branch:	 soc.2013.plugins_window
URL: https://hg.pidgin.im/soc/2013/bhaskar/plugins-window/rev/6a2ed7189868

Description:

Merged default

diffstat:

 finch/gntaccount.c                             |   32 +++-
 finch/gntblist.c                               |    5 +-
 finch/gntcertmgr.c                             |    6 +-
 finch/gntdebug.c                               |    2 +-
 finch/gntlog.c                                 |    2 +-
 finch/gntnotify.c                              |    9 +-
 finch/gntplugin.c                              |   10 +-
 finch/gntpounce.c                              |    8 +-
 finch/gntprefs.c                               |    2 +-
 finch/gntrequest.c                             |    3 +-
 finch/gntsound.c                               |    2 +-
 finch/gntstatus.c                              |    4 +-
 finch/plugins/gntclipboard.c                   |    6 +-
 finch/plugins/gnttinyurl.c                     |    2 +-
 libpurple/account.c                            |   13 +-
 libpurple/certificate.c                        |    2 +-
 libpurple/connection.c                         |    6 +-
 libpurple/conversation.c                       |    7 +-
 libpurple/dbus-analyze-functions.py            |    3 +
 libpurple/dbus-server.h                        |    2 +-
 libpurple/ft.c                                 |   20 ++-
 libpurple/keyring.c                            |    4 +-
 libpurple/notify.c                             |   31 +++-
 libpurple/notify.h                             |   36 +++-
 libpurple/plugin.c                             |    4 +-
 libpurple/plugins/autoaccept.c                 |    4 +-
 libpurple/plugins/helloworld.c                 |    4 +-
 libpurple/plugins/idle.c                       |    2 +-
 libpurple/plugins/keyrings/internalkeyring.c   |    9 +-
 libpurple/plugins/notify_example.c             |    6 +-
 libpurple/plugins/perl/common/Notify.xs        |    4 +
 libpurple/plugins/tcl/tcl_cmds.c               |    2 +-
 libpurple/protocols/gg/account.c               |   18 +-
 libpurple/protocols/gg/deprecated.c            |    4 +-
 libpurple/protocols/gg/gg.c                    |   29 ++-
 libpurple/protocols/gg/pubdir-prpl.c           |    6 +-
 libpurple/protocols/irc/dcc_send.c             |    6 +-
 libpurple/protocols/irc/irc.c                  |    6 +-
 libpurple/protocols/irc/msgs.c                 |   54 ++++--
 libpurple/protocols/irc/parse.c                |    4 +-
 libpurple/protocols/jabber/adhoccommands.c     |    6 +-
 libpurple/protocols/jabber/buddy.c             |    7 +-
 libpurple/protocols/jabber/chat.c              |   43 ++++-
 libpurple/protocols/jabber/jabber.c            |   41 +++-
 libpurple/protocols/jabber/presence.c          |    3 +-
 libpurple/protocols/jabber/si.c                |   10 +-
 libpurple/protocols/msn/contact.c              |   11 +-
 libpurple/protocols/msn/error.c                |    8 +-
 libpurple/protocols/msn/msn.c                  |   17 +-
 libpurple/protocols/msn/notification.c         |   19 +-
 libpurple/protocols/msn/userlist.c             |    5 +-
 libpurple/protocols/mxit/protocol.c            |    2 +-
 libpurple/protocols/myspace/myspace.c          |   45 ++++-
 libpurple/protocols/novell/novell.c            |   51 ++++--
 libpurple/protocols/oscar/family_chatnav.c     |    4 +-
 libpurple/protocols/oscar/family_icbm.c        |    3 +-
 libpurple/protocols/oscar/oscar.c              |   71 +++++----
 libpurple/protocols/sametime/sametime.c        |   23 ++-
 libpurple/protocols/silc/buddy.c               |   57 ++++---
 libpurple/protocols/silc/chat.c                |   16 +-
 libpurple/protocols/silc/ft.c                  |   50 ++++--
 libpurple/protocols/silc/ops.c                 |   57 +++++--
 libpurple/protocols/silc/pk.c                  |    3 +-
 libpurple/protocols/silc/silc.c                |   24 ++-
 libpurple/protocols/yahoo/libymsg.c            |   27 ++-
 libpurple/protocols/yahoo/yahoo_filexfer.c     |    6 +-
 libpurple/protocols/yahoo/yahoochat.c          |   26 ++-
 libpurple/protocols/yahoo/ycht.c               |    4 +-
 libpurple/protocols/zephyr/zephyr.c            |   15 +-
 libpurple/proxy.c                              |   10 +-
 libpurple/request.c                            |   86 +++++++++++-
 libpurple/request.h                            |   97 +++++++++++--
 libpurple/xmlnode.c                            |    2 +-
 pidgin/gtkaccount.c                            |    2 +-
 pidgin/gtkblist.c                              |    8 +-
 pidgin/gtkcertmgr.c                            |    4 +-
 pidgin/gtkconv.c                               |   26 ++-
 pidgin/gtkdebug.c                              |    2 +-
 pidgin/gtkft.c                                 |    4 +-
 pidgin/gtkimhtmltoolbar.c                      |    4 +-
 pidgin/gtklog.c                                |    4 +-
 pidgin/gtkmedia.c                              |   10 +-
 pidgin/gtknotify.c                             |   47 +++++-
 pidgin/gtkplugin.c                             |    4 +-
 pidgin/gtkpounce.c                             |    6 +-
 pidgin/gtkprefs.c                              |   18 +-
 pidgin/gtkrequest.c                            |  181 ++++++++++++++++++++++++-
 pidgin/gtkrequest.h                            |   10 +
 pidgin/gtksavedstatuses.c                      |    2 +-
 pidgin/gtksmiley.c                             |    2 +-
 pidgin/gtksound.c                              |    2 +-
 pidgin/gtkutils.c                              |   41 ++++-
 pidgin/gtkwebviewtoolbar.c                     |    4 +-
 pidgin/plugins/disco/gtkdisco.c                |    2 +-
 pidgin/plugins/disco/xmppdisco.c               |    4 +-
 pidgin/plugins/history.c                       |    2 +-
 pidgin/plugins/musicmessaging/musicmessaging.c |    8 +-
 pidgin/plugins/spellchk.c                      |    2 +-
 98 files changed, 1166 insertions(+), 461 deletions(-)

diffs (truncated from 4560 to 300 lines):

diff --git a/finch/gntaccount.c b/finch/gntaccount.c
--- a/finch/gntaccount.c
+++ b/finch/gntaccount.c
@@ -126,8 +126,10 @@ save_account_cb(AccountEditDialog *dialo
 	if (value == NULL || *value == '\0')
 	{
 		purple_notify_error(NULL, _("Error"),
-				dialog->account ? _("Account was not modified") : _("Account was not added"),
-				_("Username of an account must be non-empty."));
+			dialog->account ? _("Account was not modified") :
+				_("Account was not added"),
+			_("Username of an account must be non-empty."),
+			purple_request_cpar_from_account(dialog->account));
 		return;
 	}
 
@@ -168,15 +170,25 @@ save_account_cb(AccountEditDialog *dialo
 			const char *old = purple_account_get_protocol_id(account);
 			char *oldprpl;
 			if (strcmp(old, purple_plugin_get_id(plugin))) {
-				purple_notify_error(NULL, _("Error"), _("Account was not modified"),
-						_("The account's protocol cannot be changed while it is connected to the server."));
+				purple_notify_error(NULL, _("Error"),
+					_("Account was not modified"),
+					_("The account's protocol cannot be "
+					"changed while it is connected to the "
+					"server."),
+					purple_request_cpar_from_account(
+						account));
 				return;
 			}
 
 			oldprpl = g_strdup(purple_normalize(account, purple_account_get_username(account)));
 			if (g_utf8_collate(oldprpl, purple_normalize(account, username->str))) {
-				purple_notify_error(NULL, _("Error"), _("Account was not modified"),
-						_("The account's username cannot be changed while it is connected to the server."));
+				purple_notify_error(NULL, _("Error"),
+					_("Account was not modified"),
+					_("The account's username cannot be "
+					"changed while it is connected to the "
+					"server."),
+					purple_request_cpar_from_account(
+						account));
 				g_free(oldprpl);
 				return;
 			}
@@ -557,8 +569,9 @@ edit_account_continue(PurpleAccount *acc
 	list = purple_plugins_get_protocols();
 	if (list == NULL) {
 		purple_notify_error(NULL, _("Error"),
-				_("There are no protocol plugins installed."),
-				_("(You probably forgot to 'make install'.)"));
+			_("There are no protocol plugins installed."),
+			_("(You probably forgot to 'make install'.)"),
+			purple_request_cpar_from_account(account));
 		return;
 	}
 
@@ -966,7 +979,8 @@ notify_added(PurpleAccount *account, con
 
 	buffer = make_info(account, gc, remote_user, id, alias, msg);
 
-	purple_notify_info(NULL, NULL, buffer, NULL);
+	purple_notify_info(NULL, NULL, buffer, NULL,
+		purple_request_cpar_from_connection(gc));
 
 	g_free(buffer);
 }
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -645,7 +645,8 @@ add_buddy_cb(void *data, PurpleRequestFi
 	if (error)
 	{
 		finch_request_add_buddy(account, username, group, alias);
-		purple_notify_error(NULL, _("Error"), _("Error adding buddy"), error);
+		purple_notify_error(NULL, _("Error"), _("Error adding buddy"),
+			error, purple_request_cpar_from_account(account));
 		return;
 	}
 
@@ -815,7 +816,7 @@ add_group_cb(gpointer null, const char *
 
 	if (!group || !*group) {
 		purple_notify_error(NULL, _("Error"), _("Error adding group"),
-				_("You must give a name for the group to add."));
+				_("You must give a name for the group to add."), NULL);
 		return;
 	}
 
diff --git a/finch/gntcertmgr.c b/finch/gntcertmgr.c
--- a/finch/gntcertmgr.c
+++ b/finch/gntcertmgr.c
@@ -97,7 +97,7 @@ tls_peers_mgmt_import_ok_cb(gpointer dat
 		purple_notify_error(NULL,
 				_("Certificate Import Error"),
 				_("X.509 certificate import failed"),
-				secondary);
+				secondary, NULL);
 		g_free(secondary);
 	}
 }
@@ -127,7 +127,7 @@ tls_peers_mgmt_export_ok_cb(gpointer dat
 		purple_notify_error(NULL,
 				    _("Certificate Export Error"),
 				    _("X.509 certificate export failed"),
-				    secondary);
+				    secondary, NULL);
 		g_free(secondary);
 	}
 
@@ -193,7 +193,7 @@ info_cert_cb(GntWidget *button, gpointer
 	secondary = g_strdup_printf(_("Common name: %s\n\nSHA1 fingerprint:\n%s"), subject, fpr_sha1_asc);
 
 	purple_notify_info(NULL,
-			   _("SSL Host Certificate"), primary, secondary);
+			   _("SSL Host Certificate"), primary, secondary, NULL);
 
 	g_free(primary);
 	g_free(secondary);
diff --git a/finch/gntdebug.c b/finch/gntdebug.c
--- a/finch/gntdebug.c
+++ b/finch/gntdebug.c
@@ -273,7 +273,7 @@ file_save(GntFileSel *fs, const char *pa
 	FILE *fp;
 
 	if ((fp = g_fopen(path, "w+")) == NULL) {
-		purple_notify_error(NULL, NULL, _("Unable to open file."), NULL);
+		purple_notify_error(NULL, NULL, _("Unable to open file."), NULL, NULL);
 		return;
 	}
 
diff --git a/finch/gntlog.c b/finch/gntlog.c
--- a/finch/gntlog.c
+++ b/finch/gntlog.c
@@ -289,7 +289,7 @@ static FinchLogViewer *display_log_viewe
 			g_free(ht);
 		}
 
-		purple_notify_info(NULL, title, _("No logs were found"), log_preferences);
+		purple_notify_info(NULL, title, _("No logs were found"), log_preferences, NULL);
 		return NULL;
 	}
 
diff --git a/finch/gntnotify.c b/finch/gntnotify.c
--- a/finch/gntnotify.c
+++ b/finch/gntnotify.c
@@ -54,7 +54,8 @@ notify_msg_window_destroy_cb(GntWidget *
 
 static void *
 finch_notify_message(PurpleNotifyMsgType type, const char *title,
-		const char *primary, const char *secondary)
+	const char *primary, const char *secondary,
+	PurpleRequestCommonParameters *cpar)
 {
 	GntWidget *window, *button;
 	GntTextFormatFlags pf = 0, sf = 0;
@@ -156,7 +157,7 @@ static void *finch_notify_formatted(cons
 	void *ret;
 
 	purple_markup_html_to_xhtml(t, &xhtml, NULL);
-	ret = finch_notify_message(PURPLE_NOTIFY_FORMATTED, title, primary, xhtml);
+	ret = finch_notify_message(PURPLE_NOTIFY_FORMATTED, title, primary, xhtml, NULL);
 
 	g_free(t);
 	g_free(xhtml);
@@ -249,7 +250,7 @@ finch_notify_emails(PurpleConnection *gc
 		return NULL;
 	}
 
-	ret = finch_notify_message(PURPLE_NOTIFY_EMAIL, _("New Mail"), _("You have mail!"), message->str);
+	ret = finch_notify_message(PURPLE_NOTIFY_EMAIL, _("New Mail"), _("You have mail!"), message->str, NULL);
 	g_string_free(message, TRUE);
 	return ret;
 }
@@ -503,7 +504,7 @@ finch_notify_searchresults(PurpleConnect
 static void *
 finch_notify_uri(const char *url)
 {
-	return finch_notify_message(PURPLE_NOTIFY_URI, _("URI"), url, NULL);
+	return finch_notify_message(PURPLE_NOTIFY_URI, _("URI"), url, NULL, NULL);
 }
 
 static PurpleNotifyUiOps ops =
diff --git a/finch/gntplugin.c b/finch/gntplugin.c
--- a/finch/gntplugin.c
+++ b/finch/gntplugin.c
@@ -83,7 +83,7 @@ plugin_toggled_cb(GntWidget *tree, Purpl
 	if (gnt_tree_get_choice(GNT_TREE(tree), plugin))
 	{
 		if (!purple_plugin_load(plugin)) {
-			purple_notify_error(NULL, _("ERROR"), _("loading plugin failed"), NULL);
+			purple_notify_error(NULL, _("ERROR"), _("loading plugin failed"), NULL, NULL);
 			gnt_tree_set_choice(GNT_TREE(tree), plugin, FALSE);
 		}
 	}
@@ -92,7 +92,7 @@ plugin_toggled_cb(GntWidget *tree, Purpl
 		GntWidget *win;
 
 		if (!purple_plugin_unload(plugin)) {
-			purple_notify_error(NULL, _("ERROR"), _("unloading plugin failed"), NULL);
+			purple_notify_error(NULL, _("ERROR"), _("unloading plugin failed"), NULL, NULL);
 			purple_plugin_disable(plugin);
 			gnt_tree_set_choice(GNT_TREE(tree), plugin, TRUE);
 		}
@@ -196,7 +196,7 @@ configure_plugin_cb(GntWidget *button, g
 	if (!purple_plugin_is_loaded(plugin))
 	{
 		purple_notify_error(plugin, _("Error"),
-			_("Plugin need to be loaded before you can configure it."), NULL);
+			_("Plugin need to be loaded before you can configure it."), NULL, NULL);
 		return;
 	}
 
@@ -244,7 +244,7 @@ configure_plugin_cb(GntWidget *button, g
 	else
 	{
 		purple_notify_info(plugin, _("Error"),
-			_("No configuration options for this plugin."), NULL);
+			_("No configuration options for this plugin."), NULL, NULL);
 		return;
 	}
 }
@@ -267,7 +267,7 @@ install_selected_file_cb(gpointer handle
 	if (!plugin) {
 		purple_notify_error(handle, _("Error loading plugin"),
 				_("The selected file is not a valid plugin."),
-				_("Please open the debug window and try again to see the exact error message."));
+				_("Please open the debug window and try again to see the exact error message."), NULL);
 		return;
 	}
 	if (g_list_find(gnt_tree_get_rows(GNT_TREE(plugins.tree)), plugin)) {
diff --git a/finch/gntpounce.c b/finch/gntpounce.c
--- a/finch/gntpounce.c
+++ b/finch/gntpounce.c
@@ -192,7 +192,7 @@ save_pounce_cb(GntWidget *w, PurpleGntPo
 	if (*name == '\0')
 	{
 		purple_notify_error(NULL, NULL,
-						  _("Please enter a buddy to pounce."), NULL);
+						  _("Please enter a buddy to pounce."), NULL, NULL);
 		return;
 	}
 
@@ -631,7 +631,7 @@ pounces_manager_add_cb(GntButton *button
 	if (purple_accounts_get_all() == NULL) {
 		purple_notify_error(NULL, _("Cannot create pounce"),
 				_("You do not have any accounts."),
-				_("You must create an account first before you can create a pounce."));
+				_("You must create an account first before you can create a pounce."), NULL);
 		return;
 	}
 	finch_pounce_editor_show(NULL, NULL, NULL);
@@ -853,12 +853,12 @@ pounce_cb(PurplePounce *pounce, PurplePo
 
 		if (reason == NULL)
 		{
-			purple_notify_info(NULL, name_shown, tmp, purple_date_format_full(NULL));
+			purple_notify_info(NULL, name_shown, tmp, purple_date_format_full(NULL), NULL);
 		}
 		else
 		{
 			char *tmp2 = g_strdup_printf("%s\n\n%s", reason, purple_date_format_full(NULL));
-			purple_notify_info(NULL, name_shown, tmp, tmp2);
+			purple_notify_info(NULL, name_shown, tmp, tmp2, NULL);
 			g_free(tmp2);
 		}
 		g_free(tmp);
diff --git a/finch/gntprefs.c b/finch/gntprefs.c
--- a/finch/gntprefs.c
+++ b/finch/gntprefs.c
@@ -298,7 +298,7 @@ void finch_prefs_show_keyring(void)
 	if (fields == NULL) {
 		purple_notify_info(NULL, _("Keyring settings"),
 			_("Selected keyring doesn't allow any configuration"),
-			NULL);
+			NULL, NULL);
 		return;
 	}
 
diff --git a/finch/gntrequest.c b/finch/gntrequest.c
--- a/finch/gntrequest.c
+++ b/finch/gntrequest.c
@@ -391,7 +391,7 @@ request_fields_cb(GntWidget *button, Pur
 			!purple_request_fields_all_valid(fields))) {
 		purple_notify_error(button, _("Error"),
 			_("You must properly fill all the required fields."),
-			_("The required fields are underlined."));
+			_("The required fields are underlined."), NULL);
 		return;
 	}
 
@@ -815,6 +815,7 @@ static PurpleRequestUiOps uiops =
 	finch_request_choice,
 	finch_request_action,
 	NULL,
+	NULL,
 	finch_request_fields,
 	finch_request_file,
 	finch_request_folder,



More information about the Commits mailing list