/soc/2013/ankitkv/gobjectification: 6271bcdee576: Merged default...

Ankit Vani a at nevitus.org
Tue Apr 15 10:32:22 EDT 2014


Changeset: 6271bcdee5764fd301df287258bd3e6fc2d9e9e9
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-04-15 20:01 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/6271bcdee576

Description:

Merged default branch

diffstat:

 configure.ac                                |   28 ++-
 doc/reference/libpurple/Makefile.am         |    1 -
 doc/reference/libpurple/libpurple-docs.xml  |   14 +-
 libpurple/Makefile.am                       |    4 -
 libpurple/Makefile.mingw                    |    2 -
 libpurple/buddyicon.c                       |    2 +-
 libpurple/conversation.c                    |   35 +---
 libpurple/conversation.h                    |   11 +-
 libpurple/image-store.c                     |   53 ++++++
 libpurple/image-store.h                     |  112 ++++++++++++-
 libpurple/image.c                           |   69 +++++++-
 libpurple/image.h                           |  179 ++++++++++++++++++++-
 libpurple/imgstore.c                        |  124 --------------
 libpurple/imgstore.h                        |   72 --------
 libpurple/internal.h                        |    2 +-
 libpurple/log.c                             |    7 +-
 libpurple/plugins/perl/common/Util.xs       |    9 -
 libpurple/protocols/bonjour/buddy.c         |   13 +-
 libpurple/protocols/gg/image-prpl.c         |  114 +++---------
 libpurple/protocols/gg/image-prpl.h         |   10 +-
 libpurple/protocols/gg/message-prpl.c       |  141 ++--------------
 libpurple/protocols/jabber/message.c        |   17 +-
 libpurple/protocols/msn/msg.c               |   10 +-
 libpurple/protocols/msn/msn.c               |   24 +-
 libpurple/protocols/msn/object.c            |   21 +-
 libpurple/protocols/msn/object.h            |   10 +-
 libpurple/protocols/msn/session.c           |    4 +-
 libpurple/protocols/msn/slp.c               |    6 +-
 libpurple/protocols/msn/slpcall.c           |   14 +-
 libpurple/protocols/msn/slpmsg.c            |   18 +-
 libpurple/protocols/msn/slpmsg.h            |    7 +-
 libpurple/protocols/msn/switchboard.c       |   14 +-
 libpurple/protocols/msn/user.c              |    2 +-
 libpurple/protocols/msn/user.h              |    3 +-
 libpurple/protocols/mxit/client.c           |    7 +-
 libpurple/protocols/mxit/formcmds.c         |   28 +-
 libpurple/protocols/mxit/login.c            |    2 +-
 libpurple/protocols/mxit/markup.c           |   90 +++------
 libpurple/protocols/mxit/mxit.c             |   17 +-
 libpurple/protocols/mxit/mxit.h             |    4 +-
 libpurple/protocols/mxit/profile.c          |   10 +-
 libpurple/protocols/mxit/roster.c           |    4 +
 libpurple/protocols/mxit/roster.h           |    3 +-
 libpurple/protocols/mxit/splashscreen.c     |   18 +-
 libpurple/protocols/oscar/family_oservice.c |   13 +-
 libpurple/protocols/oscar/odc.c             |   49 ++---
 libpurple/protocols/oscar/oscar.c           |   60 +++---
 libpurple/protocols/oscar/oscar.h           |    2 -
 libpurple/protocols/oscar/oscarcommon.h     |    4 +-
 libpurple/protocols/sametime/sametime.c     |  107 ++++--------
 libpurple/protocols/silc/buddy.c            |   26 +-
 libpurple/protocols/silc/ops.c              |   42 ++--
 libpurple/protocols/silc/silc.c             |    8 +-
 libpurple/protocols/silc/silcpurple.h       |    5 +-
 libpurple/protocols/silc/util.c             |   45 +---
 libpurple/protocols/yahoo/yahoo_picture.c   |    8 +-
 libpurple/protocols/yahoo/yahoo_picture.h   |    2 +-
 libpurple/protocols/yahoo/yahoo_profile.c   |   16 +-
 libpurple/protocols/yahoo/ymsg.c            |    6 +-
 libpurple/protocols/yahoo/ymsg.h            |    2 -
 libpurple/proxy.c                           |    2 +-
 libpurple/purple.h.in                       |    1 -
 libpurple/smiley-custom.c                   |   12 +-
 libpurple/smiley-list.c                     |   44 +++-
 libpurple/smiley-remote.c                   |  243 ----------------------------
 libpurple/smiley-remote.h                   |  131 ---------------
 libpurple/smiley.c                          |  139 ++++-----------
 libpurple/smiley.h                          |   53 +----
 libpurple/util.c                            |   68 +------
 libpurple/util.h                            |   23 --
 libpurple/win32/libc_interface.h            |    2 +
 pidgin/gtkconv.c                            |  191 +++++++++++++--------
 pidgin/gtksmiley-manager.c                  |   14 +-
 pidgin/gtkutils.c                           |    1 +
 pidgin/gtkwebview.c                         |   67 ++++---
 pidgin/gtkwebviewtoolbar.c                  |   25 +--
 pidgin/themes/Contents/Resources/main.css   |   17 +-
 pidgin/themes/Template.html                 |   15 +-
 po/POTFILES.skip                            |    1 -
 79 files changed, 1124 insertions(+), 1655 deletions(-)

diffs (truncated from 5302 to 300 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -122,6 +122,16 @@ AC_FUNC_ALLOCA
 dnl Check for Sun compiler
 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
 
+dnl Check for Win32
+case "$host" in
+	*-*-mingw* | *-*-cygwin*)
+		is_win32="yes"
+		;;
+	*)
+		is_win32="no"
+		;;
+esac
+
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
@@ -148,12 +158,16 @@ AC_CHECK_FUNCS(getopt_long,,
 ])
 
 dnl Check for inet_aton
-AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
-				         [AC_MSG_ERROR([inet_aton not found])])])
+if test "x$is_win32" != "xyes" ; then
+	AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
+		[AC_MSG_ERROR([inet_aton not found])])])
+fi
 AC_CHECK_LIB(resolv, __res_query)
 AC_CHECK_LIB(nsl, gethostent)
-AC_CHECK_FUNC(socket, ,
-	[AC_CHECK_LIB(socket, socket, , [AC_MSG_ERROR([socket not found])])])
+if test "x$is_win32" != "xyes" ; then
+	AC_CHECK_FUNC(socket, , [AC_CHECK_LIB(socket, socket, ,
+		[AC_MSG_ERROR([socket not found])])])
+fi
 dnl If all goes well, by this point the previous two checks will have
 dnl pulled in -lsocket and -lnsl if we need them.
 AC_CHECK_FUNC(getaddrinfo,
@@ -167,7 +181,11 @@ dnl Check for socklen_t (in Unix98)
 AC_MSG_CHECKING(for socklen_t)
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 	#include <sys/types.h>
-	#include <sys/socket.h>
+	#ifdef _WIN32
+	#  include <ws2tcpip.h>
+	#else
+	#  include <sys/socket.h>
+	#endif
 	socklen_t x;
 ]], [[]])], [
 	AC_MSG_RESULT(yes)
diff --git a/doc/reference/libpurple/Makefile.am b/doc/reference/libpurple/Makefile.am
--- a/doc/reference/libpurple/Makefile.am
+++ b/doc/reference/libpurple/Makefile.am
@@ -94,7 +94,6 @@ content_files = version.xml \
 	signals_conversation.xml \
 	signals_core.xml \
 	signals_dbus_server.xml \
-	signals_imgstore.xml \
 	signals_jabber.xml \
 	signals_log.xml \
 	signals_notify.xml \
diff --git a/doc/reference/libpurple/libpurple-docs.xml b/doc/reference/libpurple/libpurple-docs.xml
--- a/doc/reference/libpurple/libpurple-docs.xml
+++ b/doc/reference/libpurple/libpurple-docs.xml
@@ -53,7 +53,6 @@
       <xi:include href="xml/purple-socket.xml" />
       <xi:include href="xml/http.xml" />
       <xi:include href="xml/idle.xml" />
-      <xi:include href="xml/imgstore.xml" />
       <xi:include href="xml/keyring.xml" />
       <xi:include href="xml/log.xml" />
       <xi:include href="xml/memorypool.xml" />
@@ -90,7 +89,6 @@
       <xi:include href="xml/sound-theme.xml" />
       <xi:include href="xml/sound-theme-loader.xml" />
       <xi:include href="xml/upnp.xml" />
-      <xi:include href="xml/whiteboard.xml" />
       <xi:include href="xml/xmlnode.xml" />
       <xi:include href="xml/version.xml" />
       <xi:include href="xml/util.xml" />
@@ -118,7 +116,6 @@
       <title>Smiley APIs</title>
 
         <xi:include href="xml/smiley.xml" />
-        <xi:include href="xml/smiley-remote.xml" />
         <xi:include href="xml/smiley-custom.xml" />
         <xi:include href="xml/smiley-list.xml" />
         <xi:include href="xml/smiley-theme.xml" />
@@ -126,6 +123,14 @@
     </reference>
 
     <reference label="c">
+      <title>Graphics</title>
+
+        <xi:include href="xml/image.xml" />
+        <xi:include href="xml/image-store.xml" />
+        <xi:include href="xml/whiteboard.xml" />
+    </reference>
+
+    <reference label="d">
       <title>Media APIs</title>
 
         <xi:include href="xml/media.xml" />
@@ -137,7 +142,7 @@
         <xi:include href="xml/enum-types.xml" />
     </reference>
 
-    <reference label="d">
+    <reference label="e">
       <title>D-Bus Server APIs</title>
 
         <xi:include href="xml/dbus-bindings.xml" />
@@ -165,7 +170,6 @@
       <xi:include href="signals_protocol.xml" />
       <xi:include href="signals_savedstatus.xml" />
       <xi:include href="signals_sound.xml" />
-      <xi:include href="signals_imgstore.xml" />
       <xi:include href="signals_jabber.xml" />
   </reference>
 
diff --git a/libpurple/Makefile.am b/libpurple/Makefile.am
--- a/libpurple/Makefile.am
+++ b/libpurple/Makefile.am
@@ -73,7 +73,6 @@ purple_coresources = \
 	idle.c \
 	image.c \
 	image-store.c \
-	imgstore.c \
 	keyring.c \
 	log.c \
 	media/backend-fs2.c \
@@ -107,7 +106,6 @@ purple_coresources = \
 	smiley-custom.c \
 	smiley-list.c \
 	smiley-parser.c \
-	smiley-remote.c \
 	smiley-theme.c \
 	smiley.c \
 	dnsquery.c \
@@ -160,7 +158,6 @@ purple_coreheaders = \
 	idle.h \
 	image.h \
 	image-store.h \
-	imgstore.h \
 	keyring.h \
 	log.h \
 	media.h \
@@ -190,7 +187,6 @@ purple_coreheaders = \
 	smiley-custom.h \
 	smiley-list.h \
 	smiley-parser.h \
-	smiley-remote.h \
 	smiley-theme.h \
 	smiley.h \
 	dnsquery.h \
diff --git a/libpurple/Makefile.mingw b/libpurple/Makefile.mingw
--- a/libpurple/Makefile.mingw
+++ b/libpurple/Makefile.mingw
@@ -97,7 +97,6 @@ C_SRC =	\
 			idle.c \
 			image.c \
 			image-store.c \
-			imgstore.c \
 			keyring.c \
 			log.c \
 			media/candidate.c \
@@ -129,7 +128,6 @@ C_SRC =	\
 			smiley-custom.c \
 			smiley-list.c \
 			smiley-parser.c \
-			smiley-remote.c \
 			smiley-theme.c \
 			sound-theme-loader.c \
 			sound-theme.c \
diff --git a/libpurple/buddyicon.c b/libpurple/buddyicon.c
--- a/libpurple/buddyicon.c
+++ b/libpurple/buddyicon.c
@@ -57,7 +57,7 @@ static GHashTable *account_cache = NULL;
  * shared across all accounts.
  *
  * Key is the filename for this image as constructed by
- * purple_util_get_image_filename().  So it is the base16 encoded
+ * purple_image_generate_filename().  So it is the base16 encoded
  * sha-1 hash plus an appropriate file extension.  For example:
  *   "0f4972d17d1e70e751c43c90c948e72efbff9796.gif"
  *
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -935,13 +935,12 @@ purple_conversation_get_max_message_size
 	return purple_protocol_client_iface_get_max_message_size(protocol, conv);
 }
 
-PurpleRemoteSmiley *
+PurpleSmiley *
 purple_conversation_add_remote_smiley(PurpleConversation *conv,
 	const gchar *shortcut)
 {
 	PurpleConversationPrivate *priv = PURPLE_CONVERSATION_GET_PRIVATE(conv);
 	PurpleSmiley *smiley;
-	PurpleRemoteSmiley *rsmiley;
 
 	g_return_val_if_fail(priv != NULL, NULL);
 	g_return_val_if_fail(shortcut != NULL, NULL);
@@ -955,41 +954,30 @@ purple_conversation_add_remote_smiley(Pu
 
 	smiley = purple_smiley_list_get_by_shortcut(
 		priv->remote_smileys, shortcut);
-	if (smiley && !PURPLE_IS_REMOTE_SMILEY(smiley)) {
-		purple_debug_warning("conversation", "Invalid type of smiley "
-			"stored in remote smileys list");
-		return NULL;
-	}
 
 	/* smiley was already added */
 	if (smiley)
 		return NULL;
 
-	rsmiley = g_object_new(PURPLE_TYPE_REMOTE_SMILEY,
-		"shortcut", shortcut,
-		"is-ready", FALSE,
-		NULL);
+	smiley = purple_smiley_new_remote(shortcut);
 
-	if (!purple_smiley_list_add(priv->remote_smileys,
-		PURPLE_SMILEY(rsmiley)))
-	{
+	if (!purple_smiley_list_add(priv->remote_smileys, smiley)) {
 		purple_debug_error("conversation", "failed adding remote "
 			"smiley to the list");
-		g_object_unref(rsmiley);
+		g_object_unref(smiley);
 		return NULL;
 	}
 
 	/* priv->remote_smileys holds the only one ref */
-	g_object_unref(rsmiley);
-	return rsmiley;
+	g_object_unref(smiley);
+	return smiley;
 }
 
-PurpleRemoteSmiley *
+PurpleSmiley *
 purple_conversation_get_remote_smiley(PurpleConversation *conv,
 	const gchar *shortcut)
 {
 	PurpleConversationPrivate *priv = PURPLE_CONVERSATION_GET_PRIVATE(conv);
-	PurpleSmiley *smiley;
 
 	g_return_val_if_fail(priv != NULL, NULL);
 	g_return_val_if_fail(shortcut != NULL, NULL);
@@ -998,15 +986,8 @@ purple_conversation_get_remote_smiley(Pu
 	if (priv->remote_smileys == NULL)
 		return NULL;
 
-	smiley = purple_smiley_list_get_by_shortcut(
+	return purple_smiley_list_get_by_shortcut(
 		priv->remote_smileys, shortcut);
-	if (smiley && !PURPLE_IS_REMOTE_SMILEY(smiley)) {
-		purple_debug_warning("conversation", "Invalid type of smiley "
-			"stored in remote smileys list");
-		return NULL;
-	}
-
-	return PURPLE_REMOTE_SMILEY(smiley);
 }
 
 PurpleSmileyList *
diff --git a/libpurple/conversation.h b/libpurple/conversation.h
--- a/libpurple/conversation.h
+++ b/libpurple/conversation.h
@@ -196,7 +196,6 @@ struct _PurpleConversationClass {
 #include "e2ee.h"
 #include "log.h"
 #include "smiley-list.h"
-#include "smiley-remote.h"
 
 /**************************************************************************/
 /** PurpleConversationUiOps                                               */
@@ -681,12 +680,16 @@ purple_conversation_get_max_message_size
  * @shortcut: The shortcut for the new smiley.
  *
  * Adds new smiley to the list of remote smileys for this conversation.
- * The smiley have to be written and closed, when data is ready.
+ * The smiley image have to be written and closed, when data is ready.
+ *
+ * You can retrieve smiley's #PurpleImage object using #purple_smiley_get_image
+ * and set its data with #purple_image_transfer_write
+ * and #purple_image_transfer_close.
  *
  * Returns: (transfer none): New smiley, or %NULL if it's already being
  *          retrieved (or possibly, in case of error).
  */
-PurpleRemoteSmiley *
+PurpleSmiley *



More information about the Commits mailing list