/soc/2013/ankitkv/gobjectification: 28ee14bbe0ab: Merged default...

Ankit Vani a at nevitus.org
Mon Jan 27 07:05:27 EST 2014


Changeset: 28ee14bbe0ab2f66e10256a616e8987f79bd1ee6
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-01-27 17:34 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/28ee14bbe0ab

Description:

Merged default branch

diffstat:

 configure.ac                              |   6 +++---
 finch/libfinch.c                          |   3 ++-
 finch/libgnt/gntfilesel.c                 |   2 +-
 libpurple/ciphers/aescipher.c             |   3 ++-
 libpurple/glibcompat.h                    |  26 +++++++++++++++++++++++++-
 libpurple/log.c                           |   2 +-
 libpurple/plugins/keyrings/gnomekeyring.c |   1 +
 libpurple/plugins/log_reader.c            |   1 +
 libpurple/protocols/gg/edisc.c            |   1 +
 libpurple/protocols/gg/message-prpl.c     |   1 +
 libpurple/protocols/msn/httpconn.c        |   1 +
 libpurple/protocols/silc/buddy.c          |   1 +
 libpurple/protocols/silc/pk.c             |   1 +
 libpurple/protocols/silc/util.c           |   1 +
 libpurple/request-datasheet.c             |   1 +
 libpurple/request.c                       |   1 +
 libpurple/util.c                          |   1 +
 pidgin/gtkconv.c                          |   4 +++-
 pidgin/gtkutils.c                         |   1 +
 pidgin/gtkwebview.c                       |   4 +++-
 pidgin/libpidgin.c                        |   3 ++-
 21 files changed, 54 insertions(+), 11 deletions(-)

diffs (truncated from 343 to 300 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -474,7 +474,7 @@ running configure.
 	PKG_CHECK_MODULES(PANGO, [pango >= 1.4.0],
 			AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
 
-	WEBKIT_VERSION=1.3.1
+	WEBKIT_VERSION=1.3.7
 	if test "x$with_gtk" = "x3"; then
 		WEBKIT_PC_MODULE="webkitgtk-3.0"
 		PKG_CHECK_MODULES(WEBKIT, [$WEBKIT_PC_MODULE >= $WEBKIT_VERSION], , [
@@ -829,10 +829,10 @@ dnl ####################################
 dnl # Check for JSON-GLib (required)
 dnl #######################################################################
 
-PKG_CHECK_MODULES([JSON], [json-glib-1.0 >= 0.14.0], , [
+PKG_CHECK_MODULES([JSON], [json-glib-1.0 >= 0.10.0], , [
 	AC_MSG_RESULT(no)
 	AC_MSG_ERROR([
-You must have JSON-GLib >= 0.14.0 development headers installed to build.
+You must have JSON-GLib >= 0.10.0 development headers installed to build.
 ])])
 
 AC_SUBST(JSON_CFLAGS)
diff --git a/finch/libfinch.c b/finch/libfinch.c
--- a/finch/libfinch.c
+++ b/finch/libfinch.c
@@ -27,7 +27,7 @@
 #include "core.h"
 #include "debug.h"
 #include "eventloop.h"
-#include "xfer.h"
+#include "glibcompat.h"
 #include "log.h"
 #include "notify.h"
 #include "plugins.h"
@@ -38,6 +38,7 @@
 #include "status.h"
 #include "util.h"
 #include "whiteboard.h"
+#include "xfer.h"
 
 #include "gntdebug.h"
 #include "gntprefs.h"
diff --git a/finch/libgnt/gntfilesel.c b/finch/libgnt/gntfilesel.c
--- a/finch/libgnt/gntfilesel.c
+++ b/finch/libgnt/gntfilesel.c
@@ -161,7 +161,7 @@ local_read_fn(const char *path, GList **
 
 	while ((str = g_dir_read_name(dir)) != NULL) {
 		char *fp = g_build_filename(path, str, NULL);
-		GStatBuf st;
+		struct stat st;
 
 		if (g_stat(fp, &st)) {
 			gnt_warning("Error stating location %s", fp);
diff --git a/libpurple/ciphers/aescipher.c b/libpurple/ciphers/aescipher.c
--- a/libpurple/ciphers/aescipher.c
+++ b/libpurple/ciphers/aescipher.c
@@ -362,7 +362,8 @@ purple_aes_cipher_nss_crypt(const guchar
 		return FALSE;
 	}
 
-	ret = PK11_CipherOp(context.enc_context, output, &outlen, len, input, len);
+	ret = PK11_CipherOp(context.enc_context, output, &outlen, len,
+			(guchar *)input, len);
 	if (ret != SECSuccess) {
 		purple_debug_error("cipher-aes",
 			"PK11_CipherOp failed: %d\n", PR_GetError());
diff --git a/libpurple/glibcompat.h b/libpurple/glibcompat.h
--- a/libpurple/glibcompat.h
+++ b/libpurple/glibcompat.h
@@ -41,6 +41,11 @@
 
 #if !GLIB_CHECK_VERSION(2, 32, 0)
 
+#include <glib.h>
+#include <glib-object.h>
+
+#include <string.h>
+
 #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 #define G_GNUC_END_IGNORE_DEPRECATIONS
 
@@ -50,6 +55,21 @@ static inline GThread * g_thread_try_new
 	return g_thread_create(func, data, TRUE, error);
 }
 
+#if !GLIB_CHECK_VERSION(2, 30, 0)
+
+static inline gchar *g_utf8_substring(const gchar *str, glong start_pos,
+	glong end_pos)
+{
+	gchar *start = g_utf8_offset_to_pointer(str, start_pos);
+	gchar *end = g_utf8_offset_to_pointer(start, end_pos - start_pos);
+	gchar *out = g_malloc(end - start + 1);
+
+	memcpy(out, start, end - start);
+	out[end - start] = 0;
+
+	return out;
+}
+
 #if !GLIB_CHECK_VERSION(2, 28, 0)
 
 static inline gint64 g_get_monotonic_time(void)
@@ -75,6 +95,8 @@ static inline void g_slist_free_full(GSL
 
 #if !GLIB_CHECK_VERSION(2, 26, 0)
 
+typedef struct stat GStatBuf;
+
 static inline void g_object_notify_by_pspec(GObject *object, GParamSpec *pspec)
 {
 	g_object_notify(object, g_param_spec_get_name(pspec));
@@ -83,7 +105,7 @@ static inline void g_object_notify_by_ps
 static inline void g_object_class_install_properties(GObjectClass *oclass,
 	guint n_pspecs, GParamSpec **pspecs)
 {
-	gint i;
+	guint i;
 	for (i = 1; i < n_pspecs; ++i)
 		g_object_class_install_property(oclass, i, pspecs[i]);
 }
@@ -92,6 +114,8 @@ static inline void g_object_class_instal
 
 #endif /* < 2.28.0 */
 
+#endif /* < 2.30.0 */
+
 #endif /* < 2.32.0 */
 
 #endif /* _PIDGINGLIBCOMPAT_H_ */
diff --git a/libpurple/log.c b/libpurple/log.c
--- a/libpurple/log.c
+++ b/libpurple/log.c
@@ -28,7 +28,7 @@
 #include "account.h"
 #include "dbus-maybe.h"
 #include "debug.h"
-#include "internal.h"
+#include "glibcompat.h"
 #include "log.h"
 #include "prefs.h"
 #include "util.h"
diff --git a/libpurple/plugins/keyrings/gnomekeyring.c b/libpurple/plugins/keyrings/gnomekeyring.c
--- a/libpurple/plugins/keyrings/gnomekeyring.c
+++ b/libpurple/plugins/keyrings/gnomekeyring.c
@@ -27,6 +27,7 @@
 #include "internal.h"
 #include "account.h"
 #include "debug.h"
+#include "glibcompat.h"
 #include "keyring.h"
 #include "plugins.h"
 #include "version.h"
diff --git a/libpurple/plugins/log_reader.c b/libpurple/plugins/log_reader.c
--- a/libpurple/plugins/log_reader.c
+++ b/libpurple/plugins/log_reader.c
@@ -3,6 +3,7 @@
 #include <stdio.h>
 
 #include "debug.h"
+#include "glibcompat.h"
 #include "log.h"
 #include "plugins.h"
 #include "pluginpref.h"
diff --git a/libpurple/protocols/gg/edisc.c b/libpurple/protocols/gg/edisc.c
--- a/libpurple/protocols/gg/edisc.c
+++ b/libpurple/protocols/gg/edisc.c
@@ -1,6 +1,7 @@
 #include "edisc.h"
 
 #include <debug.h>
+#include <glibcompat.h>
 
 #include "gg.h"
 #include "libgaduw.h"
diff --git a/libpurple/protocols/gg/message-prpl.c b/libpurple/protocols/gg/message-prpl.c
--- a/libpurple/protocols/gg/message-prpl.c
+++ b/libpurple/protocols/gg/message-prpl.c
@@ -1,6 +1,7 @@
 #include "message-prpl.h"
 
 #include <debug.h>
+#include <glibcompat.h>
 
 #include "gg.h"
 #include "chat.h"
diff --git a/libpurple/protocols/msn/httpconn.c b/libpurple/protocols/msn/httpconn.c
--- a/libpurple/protocols/msn/httpconn.c
+++ b/libpurple/protocols/msn/httpconn.c
@@ -25,6 +25,7 @@
 #include "httpconn.h"
 
 #include "debug.h"
+#include "glibcompat.h"
 #include "http.h"
 
 #include "msn.h"
diff --git a/libpurple/protocols/silc/buddy.c b/libpurple/protocols/silc/buddy.c
--- a/libpurple/protocols/silc/buddy.c
+++ b/libpurple/protocols/silc/buddy.c
@@ -18,6 +18,7 @@
 */
 
 #include "internal.h"
+#include "glibcompat.h"
 #include "silc.h"
 #include "silcclient.h"
 #include "silcpurple.h"
diff --git a/libpurple/protocols/silc/pk.c b/libpurple/protocols/silc/pk.c
--- a/libpurple/protocols/silc/pk.c
+++ b/libpurple/protocols/silc/pk.c
@@ -18,6 +18,7 @@
 */
 
 #include "internal.h"
+#include "glibcompat.h"
 #include "silc.h"
 #include "silcclient.h"
 #include "silcpurple.h"
diff --git a/libpurple/protocols/silc/util.c b/libpurple/protocols/silc/util.c
--- a/libpurple/protocols/silc/util.c
+++ b/libpurple/protocols/silc/util.c
@@ -18,6 +18,7 @@
 */
 
 #include "internal.h"
+#include "glibcompat.h"
 #include "silc.h"
 #include "silcclient.h"
 #include "silcpurple.h"
diff --git a/libpurple/request-datasheet.c b/libpurple/request-datasheet.c
--- a/libpurple/request-datasheet.c
+++ b/libpurple/request-datasheet.c
@@ -27,6 +27,7 @@
 #include "request-datasheet.h"
 
 #include "debug.h"
+#include "glibcompat.h"
 #include "signals.h"
 
 struct _PurpleRequestDatasheet
diff --git a/libpurple/request.c b/libpurple/request.c
--- a/libpurple/request.c
+++ b/libpurple/request.c
@@ -27,6 +27,7 @@
 
 #include "internal.h"
 
+#include "glibcompat.h"
 #include "notify.h"
 #include "request.h"
 #include "debug.h"
diff --git a/libpurple/util.c b/libpurple/util.c
--- a/libpurple/util.c
+++ b/libpurple/util.c
@@ -27,6 +27,7 @@
 #include "conversation.h"
 #include "core.h"
 #include "debug.h"
+#include "glibcompat.h"
 #include "notify.h"
 #include "protocol.h"
 #include "prefs.h"
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -39,6 +39,7 @@
 #include "cmds.h"
 #include "core.h"
 #include "debug.h"
+#include "glibcompat.h"
 #include "idle.h"
 #include "imgstore.h"
 #include "log.h"
@@ -9844,7 +9845,8 @@ notebook_remove_tab_from_menu_cb(GtkNote
 	GtkWidget *item;
 
 	/* Disconnecting the "child-notify::menu-label" signal. */
-	g_signal_handlers_disconnect_by_data(child, notebook);
+	g_signal_handlers_disconnect_matched(child, G_SIGNAL_MATCH_DATA, 0, 0,
+			NULL, NULL, notebook);
 
 	item = g_object_get_data(G_OBJECT(child), "popup-menu-item");
 	gtk_container_remove(GTK_CONTAINER(win->notebook_menu), item);
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -26,6 +26,7 @@
 #define _PIDGIN_GTKUTILS_C_
 
 #include "internal.h"
+#include "glibcompat.h"
 #include "pidgin.h"
 
 #ifdef _WIN32
diff --git a/pidgin/gtkwebview.c b/pidgin/gtkwebview.c



More information about the Commits mailing list