/soc/2013/ankitkv/gobjectification: 4fb1914491f1: Merged default...

Ankit Vani a at nevitus.org
Sat Nov 23 12:58:08 EST 2013


Changeset: 4fb1914491f1c1669c7e152e3dd718dd998561f2
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-11-23 23:27 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/4fb1914491f1

Description:

Merged default branch

diffstat:

 ChangeLog                             |   6 +++++-
 libpurple/Makefile.mingw              |   2 ++
 libpurple/protocols/gg/lib/handlers.c |   2 +-
 pidgin/gtkdialogs.c                   |   8 ++++++--
 pidgin/gtkthemes.c                    |  17 +++++++++++++++--
 5 files changed, 29 insertions(+), 6 deletions(-)

diffs (128 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,9 +62,13 @@ version 3.0.0 (??/??/????):
 	* Various core components of libpurple are now GObjects.
 	* Ciphers are now built from the libpurple directory.
 
+	Gadu-Gadu:
+	* Disabled buddy list import/export from/to server (it didn't worked
+	  anymore). Buddy list synchronization will be implemented in 3.0.0.
+
 	Windows-Specific Changes:
 	* Updates to dependencies:
-		* NSS 3.14.3 and NSPR 4.9.5
+		* NSS 3.15.2 and NSPR 4.10.1
 
 version 2.10.7 (02/13/2013):
 	Alien hatchery:
diff --git a/libpurple/Makefile.mingw b/libpurple/Makefile.mingw
--- a/libpurple/Makefile.mingw
+++ b/libpurple/Makefile.mingw
@@ -91,6 +91,7 @@ C_SRC =	\
 			debug.c \
 			dnsquery.c \
 			dnssrv.c \
+			e2ee.c \
 			eventloop.c \
 			http.c \
 			idle.c \
@@ -115,6 +116,7 @@ C_SRC =	\
 			prpl.c \
 			purple-socket.c \
 			request.c \
+			request-datasheet.c \
 			roomlist.c \
 			savedstatuses.c \
 			server.c \
diff --git a/libpurple/protocols/gg/lib/handlers.c b/libpurple/protocols/gg/lib/handlers.c
--- a/libpurple/protocols/gg/lib/handlers.c
+++ b/libpurple/protocols/gg/lib/handlers.c
@@ -1755,7 +1755,7 @@ static const gg_packet_handler_t handler
 	{ GG_DISCONNECT_ACK, GG_STATE_DISCONNECTING, 0, gg_session_handle_disconnect_ack },
 	{ GG_XML_EVENT, GG_STATE_CONNECTED, 0, gg_session_handle_xml_event },
 	{ GG_PUBDIR50_REPLY, GG_STATE_CONNECTED, 0, gg_session_handle_pubdir50_reply },
-	{ GG_USERLIST_REPLY, GG_STATE_CONNECTED, 0, gg_session_handle_userlist_reply },
+	{ GG_USERLIST_REPLY, GG_STATE_CONNECTED, sizeof(char), gg_session_handle_userlist_reply },
 	{ GG_DCC7_ID_REPLY, GG_STATE_CONNECTED, sizeof(struct gg_dcc7_id_reply), gg_session_handle_dcc7_id_reply },
 	{ GG_DCC7_ACCEPT, GG_STATE_CONNECTED, sizeof(struct gg_dcc7_accept), gg_session_handle_dcc7_accept },
 	{ GG_DCC7_NEW, GG_STATE_CONNECTED, sizeof(struct gg_dcc7_new), gg_session_handle_dcc7_new },
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -97,7 +97,7 @@ static const struct developer developers
 	{"Will 'resiak' Thompson",             NULL,                  NULL},
 	{"Stu 'nosnilmot' Tomlinson",          NULL,                  NULL},
 	{"Jorge 'Masca' Villaseñor",           NULL,                  NULL},
-	{"Tomasz Wasilczyk",                   NULL,                  NULL},
+	{"Tomasz Wasilczyk",                   NULL,                  "https://www.wasilczyk.pl"},
 	{NULL, NULL, NULL}
 };
 
@@ -348,8 +348,12 @@ add_developers(GString *str, const struc
 {
 	for (; list->name != NULL; list++) {
 		if (list->email != NULL) {
+			const gchar *proto = "mailto:";
+			if (strchr(list->email, ':') != NULL)
+				proto = "";
 			g_string_append_printf(str,
-			                       "<li><a href=\"mailto:%s\" title=\"%s\">%s</a>%s%s%s</li>",
+			                       "<li><a href=\"%s%s\" title=\"%s\">%s</a>%s%s%s</li>",
+			                       proto,
 			                       list->email, list->email, _(list->name),
 			                       list->role ? " (" : "",
 			                       list->role ? _(list->role) : "",
diff --git a/pidgin/gtkthemes.c b/pidgin/gtkthemes.c
--- a/pidgin/gtkthemes.c
+++ b/pidgin/gtkthemes.c
@@ -207,9 +207,10 @@ pidgin_smiley_themes_remove_non_existing
 
 void pidgin_themes_load_smiley_theme(const char *file, gboolean load)
 {
-	FILE *f = g_fopen(file, "r");
+	FILE *f = g_fopen(file, "rb");
 	char buf[256];
 	char *i;
+	gsize line_nbr = 0;
 	struct smiley_theme *theme=NULL;
 	struct smiley_list *list = NULL;
 	GSList *lst = smiley_themes;
@@ -245,6 +246,7 @@ void pidgin_themes_load_smiley_theme(con
 		if (!fgets(buf, sizeof(buf), f)) {
 			break;
 		}
+		line_nbr++;
 
 		if (buf[0] == '#' || buf[0] == '\0')
 			continue;
@@ -256,6 +258,11 @@ void pidgin_themes_load_smiley_theme(con
 				continue;
 		}
 
+		if (! g_utf8_validate(buf, -1, NULL)) {
+			purple_debug_error("gtkthemes", "%s:%d is invalid UTF-8\n", file, line_nbr);
+			continue;
+		}
+
 		i = buf;
 		while (isspace(*i))
 			i++;
@@ -296,10 +303,16 @@ void pidgin_themes_load_smiley_theme(con
 			while  (*i) {
 				char l[64];
 				gsize li = 0;
+				char *next;
 				while (*i && !isspace(*i) && li < sizeof(l) - 1) {
 					if (*i == '\\' && *(i+1) != '\0')
 						i++;
-					l[li++] = *(i++);
+					next = g_utf8_next_char(i);
+					if ((next - i) > (sizeof(l) - li -1)) {
+						break;
+					}
+					while (i != next)
+						l[li++] = *(i++);
 				}
 				l[li] = 0;
 				if (!sfile) {



More information about the Commits mailing list