/soc/2013/ankitkv/gobjectification: 1aee6d5eefba: Merged default...

Ankit Vani a at nevitus.org
Thu Jun 26 15:37:41 EDT 2014


Changeset: 1aee6d5eefba41b1578e7a958da6b490097e85d4
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-06-27 01:07 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/1aee6d5eefba

Description:

Merged default branch

diffstat:

 ChangeLog                                  |   2 +-
 Makefile.am                                |   2 +-
 finch/gntconv.c                            |   5 +-
 finch/plugins/lastlog.c                    |   2 +-
 libpurple/conversation.c                   |  13 +++--
 libpurple/keyring.c                        |   2 +-
 libpurple/media/backend-fs2.c              |   4 +-
 libpurple/plugins/keyrings/secretservice.c |   5 ++
 libpurple/protocols/gg/Makefile.am         |   2 -
 libpurple/protocols/gg/Makefile.mingw      |   1 -
 libpurple/protocols/gg/account.c           |  14 +----
 libpurple/protocols/gg/chat.c              |  16 +-----
 libpurple/protocols/gg/chat.h              |   2 -
 libpurple/protocols/gg/deprecated.c        |  67 ------------------------------
 libpurple/protocols/gg/deprecated.h        |  37 ----------------
 libpurple/protocols/gg/gg.c                |  39 +----------------
 libpurple/protocols/gg/gg.h                |   6 --
 libpurple/protocols/gg/libgadu-events.c    |   2 -
 libpurple/protocols/gg/libgadu-events.h    |   2 -
 libpurple/protocols/gg/libgaduw.c          |  10 +---
 libpurple/protocols/gg/message-prpl.c      |  27 +----------
 libpurple/protocols/gg/pubdir-prpl.c       |   6 ++
 libpurple/protocols/gg/status.c            |   6 --
 libpurple/protocols/gg/tcpsocket.c         |  11 ----
 libpurple/protocols/gg/validator.c         |   2 +-
 libpurple/protocols/novell/novell.c        |   4 +
 libpurple/protocols/oscar/clientlogin.c    |   8 ++-
 libpurple/protocols/oscar/visibility.c     |  11 ++--
 pidgin/gtkaccount.c                        |   2 +-
 pidgin/gtkconv.c                           |   5 +-
 pidgin/gtkprefs.c                          |   8 +++
 pidgin/plugins/disco/gtkdisco.c            |   4 +-
 po/POTFILES.in                             |   1 -
 33 files changed, 73 insertions(+), 255 deletions(-)

diffs (truncated from 970 to 300 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1527,7 +1527,7 @@ version 2.6.4 (11/29/2009):
 	Finch:
 	* The TinyURL plugin now creates shorter URLs for long non-conversation
 	  URLs, e.g. URLs to open Inbox in Yahoo/MSN protocols, or the Yahoo
-	  Captcha when joining chat rooms.
+	  CAPTCHA when joining chat rooms.
 	* Fix displaying umlauts etc. in non-utf8 locale (fix in libgnt).
 
 	Pidgin:
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -118,7 +118,7 @@ package_revision_raw.txt: .FORCE
 	(hg --cwd $(srcdir) id -i --debug) 2>/dev/null >$@.new \
 	|| rm -f $@.new
 	$(AM_V_at)if test -f $@.new; then \
-		if ! diff $@ $@.new > /dev/null; then \
+		if ! test -f "$@" || ! diff "$@" "$@".new > /dev/null ; then \
 			mv $@.new $@; \
 		else \
 			rm $@.new; \
diff --git a/finch/gntconv.c b/finch/gntconv.c
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -1335,8 +1335,9 @@ help_command_cb(PurpleConversation *conv
 			g_string_append(s, _("No such command (in this context)."));
 		}
 	} else {
-		s = g_string_new(_("Use \"/help <command>\" for help on a specific command.\n"
-											 "The following commands are available in this context:\n"));
+		s = g_string_new(_("Use \"/help <command>\" for help with a "
+				"specific command.\nThe following commands are available in "
+				"this context:\n"));
 
 		text = purple_cmd_list(conv);
 		for (l = text; l; l = l->next)
diff --git a/finch/plugins/lastlog.c b/finch/plugins/lastlog.c
--- a/finch/plugins/lastlog.c
+++ b/finch/plugins/lastlog.c
@@ -118,7 +118,7 @@ plugin_load(PurplePlugin *plugin, GError
 {
 	cmd = purple_cmd_register("lastlog", "s", PURPLE_CMD_P_DEFAULT,
 			PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM, NULL,
-			/* Translator Note: The "backlog" is the conversation buffer/history. */
+			/* Translators: The "backlog" here refers to the the conversation buffer/history. */
 			lastlog_cb, _("lastlog: Searches for a substring in the backlog."), NULL);
 	return TRUE;
 }
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -88,7 +88,8 @@ common_send(PurpleConversation *conv, co
 	PurpleConnection *gc;
 	PurpleConversationPrivate *priv = PURPLE_CONVERSATION_GET_PRIVATE(conv);
 	PurpleMessage *msg;
-	char *displayed = NULL, *sent = NULL;
+	char *displayed = NULL;
+	const char *sent;
 	int err = 0;
 
 	g_return_if_fail(priv != NULL);
@@ -113,9 +114,9 @@ common_send(PurpleConversation *conv, co
 
 	if (displayed && (priv->features & PURPLE_CONNECTION_FLAG_HTML) &&
 		!(msgflags & PURPLE_MESSAGE_RAW)) {
-		sent = g_strdup(displayed);
+		sent = displayed;
 	} else
-		sent = g_strdup(message);
+		sent = message;
 
 	msgflags |= PURPLE_MESSAGE_SEND;
 
@@ -130,8 +131,11 @@ common_send(PurpleConversation *conv, co
 
 			err = purple_serv_send_im(gc, msg);
 
-			if ((err > 0) && (displayed != NULL))
+			if ((err > 0) && (displayed != NULL)) {
+				/* revert the contents in case sending-im-msg changed it */
+				purple_message_set_contents(msg, displayed);
 				purple_conversation_write_message(conv, msg);
+			}
 
 			purple_signal_emit(purple_conversations_get_handle(),
 				"sent-im-msg", account, msg);
@@ -187,7 +191,6 @@ common_send(PurpleConversation *conv, co
 	}
 
 	g_free(displayed);
-	g_free(sent);
 }
 
 static void
diff --git a/libpurple/keyring.c b/libpurple/keyring.c
--- a/libpurple/keyring.c
+++ b/libpurple/keyring.c
@@ -716,7 +716,7 @@ purple_keyring_import_password(PurpleAcc
 		if (error != NULL) {
 			*error = g_error_new(PURPLE_KEYRING_ERROR,
 				PURPLE_KEYRING_ERROR_INTERNAL,
-				_("Specified keyring id does not match the "
+				_("Specified keyring ID does not match the "
 				"loaded one."));
 		}
 		purple_debug_error("keyring",
diff --git a/libpurple/media/backend-fs2.c b/libpurple/media/backend-fs2.c
--- a/libpurple/media/backend-fs2.c
+++ b/libpurple/media/backend-fs2.c
@@ -1004,7 +1004,7 @@ gst_handle_message_element(GstBus *bus, 
 			case FS_ERROR_NEGOTIATION_FAILED:
 				purple_media_error_fs(priv->media,
 				                      _("Codec negotiation failed. "
-				                        "This problem might be resolved by installing"
+				                        "This problem might be resolved by installing "
 				                        "more GStreamer codecs."),
 				                      structure);
 				error_emitted = TRUE;
@@ -1014,7 +1014,7 @@ gst_handle_message_element(GstBus *bus, 
 				purple_media_error(priv->media,
 				                   _("No codecs found. "
 				                     "Install some GStreamer codecs found "
-				                     " in GStreamer plugins packages."));
+				                     "in GStreamer plugins packages."));
 				error_emitted = TRUE;
 				purple_media_end(priv->media, NULL, NULL);
 				break;
diff --git a/libpurple/plugins/keyrings/secretservice.c b/libpurple/plugins/keyrings/secretservice.c
--- a/libpurple/plugins/keyrings/secretservice.c
+++ b/libpurple/plugins/keyrings/secretservice.c
@@ -43,6 +43,11 @@
 
 #include <libsecret/secret.h>
 
+/* Translators: Secret Service is a service that runs on the user's computer.
+   It is one option for where the user's passwords can be stored. It is a
+   project name. It may not be appropriate to translate this string, but
+   transliterating to your alphabet is reasonable. More info about the
+   project can be found at https://wiki.gnome.org/Projects/Libsecret */
 #define SECRETSERVICE_NAME        N_("Secret Service")
 #define SECRETSERVICE_ID          "keyring-libsecret"
 #define SECRETSERVICE_DOMAIN      (g_quark_from_static_string(SECRETSERVICE_ID))
diff --git a/libpurple/protocols/gg/Makefile.am b/libpurple/protocols/gg/Makefile.am
--- a/libpurple/protocols/gg/Makefile.am
+++ b/libpurple/protocols/gg/Makefile.am
@@ -67,8 +67,6 @@ GGSOURCES = \
 	blist.h \
 	chat.c \
 	chat.h \
-	deprecated.c \
-	deprecated.h \
 	edisc.c \
 	edisc.h \
 	gg.c \
diff --git a/libpurple/protocols/gg/Makefile.mingw b/libpurple/protocols/gg/Makefile.mingw
--- a/libpurple/protocols/gg/Makefile.mingw
+++ b/libpurple/protocols/gg/Makefile.mingw
@@ -49,7 +49,6 @@ C_SRC =	\
 	avatar.c \
 	blist.c \
 	chat.c \
-	deprecated.c \
 	edisc.c \
 	gg.c \
 	html.c \
diff --git a/libpurple/protocols/gg/account.c b/libpurple/protocols/gg/account.c
--- a/libpurple/protocols/gg/account.c
+++ b/libpurple/protocols/gg/account.c
@@ -32,7 +32,6 @@
 #include <libgadu.h>
 #include <debug.h>
 
-#include "deprecated.h"
 #include "purplew.h"
 #include "utils.h"
 #include "libgaduw.h"
@@ -72,11 +71,6 @@ void ggp_account_token_request(PurpleCon
 	purple_debug_info("gg", "ggp_account_token_request: "
 		"requesting token...\n");
 
-	if (!ggp_deprecated_setup_proxy(gc)) {
-		callback(gc, NULL, user_data);
-		return;
-	}
-
 	h = gg_token(TRUE);
 
 	if (!h) {
@@ -234,7 +228,7 @@ static void ggp_account_register_dialog(
 		_("Remember password"), register_data->password_remember);
 	purple_request_field_group_add_field(password_group, field);
 
-	token_group = purple_request_field_group_new(_("Captcha"));
+	token_group = purple_request_field_group_new(_("CAPTCHA"));
 	purple_request_fields_add_group(fields, token_group);
 
 	field = purple_request_field_string_new("token_value",
@@ -245,7 +239,7 @@ static void ggp_account_register_dialog(
 	purple_request_field_group_add_field(token_group, field);
 	purple_debug_info("gg", "token set %p\n", register_data->token);
 
-	field = purple_request_field_image_new("token_image", _("Captcha"),
+	field = purple_request_field_image_new("token_image", _("CAPTCHA"),
 		token->data, token->size);
 	purple_request_field_group_add_field(token_group, field);
 
@@ -490,7 +484,7 @@ static void ggp_account_chpass_dialog(Pu
 		field_password);
 	purple_request_field_group_add_field(password_group, field);
 
-	token_group = purple_request_field_group_new(_("Captcha"));
+	token_group = purple_request_field_group_new(_("CAPTCHA"));
 	purple_request_fields_add_group(fields, token_group);
 
 	field = purple_request_field_string_new("token_value",
@@ -500,7 +494,7 @@ static void ggp_account_chpass_dialog(Pu
 	purple_request_field_set_validator(field, ggp_validator_token, token);
 	purple_request_field_group_add_field(token_group, field);
 
-	field = purple_request_field_image_new("token_image", _("Captcha"),
+	field = purple_request_field_image_new("token_image", _("CAPTCHA"),
 		token->data, token->size);
 	purple_request_field_group_add_field(token_group, field);
 
diff --git a/libpurple/protocols/gg/chat.c b/libpurple/protocols/gg/chat.c
--- a/libpurple/protocols/gg/chat.c
+++ b/libpurple/protocols/gg/chat.c
@@ -33,8 +33,6 @@
 #include "utils.h"
 #include "message-prpl.h"
 
-#if GGP_ENABLE_GG11
-
 typedef struct _ggp_chat_local_info ggp_chat_local_info;
 
 struct _ggp_chat_session_data
@@ -588,6 +586,10 @@ PurpleRoomlist * ggp_chat_roomlist_get_l
 		if (chat->conv)
 			status = _("Joined");
 		else if (chat->left)
+			/* Translators: For Gadu-Gadu, this is one possible status for a
+			   chat room. It means you had previously joined the chat room but
+			   you have since left it. You cannot rejoin without another
+			   invitation. */
 			status = _("Chat left");
 		else {
 			status = _("Can join chat");
@@ -611,13 +613,3 @@ PurpleRoomlist * ggp_chat_roomlist_get_l
 	purple_timeout_add(1, ggp_chat_roomlist_get_list_finish, roomlist);
 	return roomlist;
 }
-
-#else
-void ggp_chat_setup(PurpleConnection *gc)
-{
-}
-
-void ggp_chat_cleanup(PurpleConnection *gc)
-{
-}
-#endif
diff --git a/libpurple/protocols/gg/chat.h b/libpurple/protocols/gg/chat.h
--- a/libpurple/protocols/gg/chat.h
+++ b/libpurple/protocols/gg/chat.h
@@ -38,7 +38,6 @@ typedef struct _ggp_chat_session_data gg
 void ggp_chat_setup(PurpleConnection *gc);
 void ggp_chat_cleanup(PurpleConnection *gc);
 
-#if GGP_ENABLE_GG11
 void ggp_chat_got_event(PurpleConnection *gc, const struct gg_event *ev);
 
 GList * ggp_chat_info(PurpleConnection *gc);
@@ -55,6 +54,5 @@ void ggp_chat_got_message(PurpleConnecti
 	const char *message, time_t time, uin_t who);
 
 PurpleRoomlist * ggp_chat_roomlist_get_list(PurpleConnection *gc);
-#endif
 
 #endif /* _GGP_CHAT_H */
diff --git a/libpurple/protocols/gg/deprecated.c b/libpurple/protocols/gg/deprecated.c
deleted file mode 100644
--- a/libpurple/protocols/gg/deprecated.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* purple
- *
- * Purple is the legal property of its developers, whose names are too numerous
- * to list here.  Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * Rewritten from scratch during Google Summer of Code 2012
- * by Tomek Wasilczyk (http://www.wasilczyk.pl).
- *
- * Previously implemented by:
- *  - Arkadiusz Miskiewicz <misiek at pld.org.pl> - first implementation (2001);
- *  - Bartosz Oler <bartosz at bzimage.us> - reimplemented during GSoC 2005;
- *  - Krzysztof Klinikowski <grommasher at gmail.com> - some parts (2009-2011).



More information about the Commits mailing list