Merged default branch soc.2013.gobjectification.plugins

Fri, 06 Dec 2013 14:50:14 +0530

author
Ankit Vani <a@nevitus.org>
date
Fri, 06 Dec 2013 14:50:14 +0530
branch
soc.2013.gobjectification.plugins
changeset 36963
6cc39a95f75b
parent 36962
bb716fcd7bb0 (current diff)
parent 35105
ed127ccd9b9f (diff)
child 36964
30cbb41e0803

Merged default branch

.hgignore file | annotate | diff | comparison | revisions
ChangeLog.API file | annotate | diff | comparison | revisions
libpurple/connection.c file | annotate | diff | comparison | revisions
libpurple/conversationtypes.c file | annotate | diff | comparison | revisions
libpurple/dbus-define-api.h file | annotate | diff | comparison | revisions
libpurple/roomlist.c file | annotate | diff | comparison | revisions
libpurple/whiteboard.c file | annotate | diff | comparison | revisions
libpurple/xfer.c file | annotate | diff | comparison | revisions
pidgin/gtknotify.c file | annotate | diff | comparison | revisions
pidgin/gtkprefs.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.h file | annotate | diff | comparison | revisions
pidgin/gtkwebviewtoolbar.c file | annotate | diff | comparison | revisions
--- a/.hgignore	Fri Dec 06 00:37:25 2013 +0530
+++ b/.hgignore	Fri Dec 06 14:50:14 2013 +0530
@@ -63,15 +63,13 @@
 doc/reference/.*/xml/.*
 doc/reference/.*/version.xml
 finch/finch$
-finch/libgnt/gntmarshal.c
-finch/libgnt/gntmarshal.h
+finch/libgnt/gntmarshal.[ch]
 gtk-doc.make
 install-sh
 intltool-.*
 libpurple/dbus-bindings.c
 libpurple/dbus-signals.c
-libpurple/dbus-types.c
-libpurple/dbus-types.h
+libpurple/dbus-types.[ch]
 libpurple/enums.[ch]
 libpurple/example/nullclient
 libpurple/gconf/purple.schemas$
@@ -82,8 +80,7 @@
 libpurple/plugins/perl/common/const-c.inc
 libpurple/plugins/perl/common/const-xs.inc
 libpurple/plugins/perl/common/lib
-libpurple/purple-client-bindings.c
-libpurple/purple-client-bindings.h
+libpurple/purple-client-bindings.[ch]
 libpurple/purple-client-example
 libpurple/Purple.gir
 libpurple/purple.h$
--- a/ChangeLog.API	Fri Dec 06 00:37:25 2013 +0530
+++ b/ChangeLog.API	Fri Dec 06 14:50:14 2013 +0530
@@ -1,5 +1,15 @@
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
+This file intends to list all changes to libpurple, Pidgin, and Finch's public
+API. We sometimes forget to add changes to this file--sorry.
+
+If your plugin fails to build with a new major version (e.g. 3.0.0) we
+suggest checking this list first, in case a function was simply renamed.
+You may still need to consult our API docs or our source code.
+
+If you notice something missing from this list, please let us know and we'll
+add it.
+
 version 3.0.0 (??/??/????):
 	libpurple:
 		Added:
--- a/libpurple/cipher.h	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/cipher.h	Fri Dec 06 14:50:14 2013 +0530
@@ -1,5 +1,5 @@
 /**
- * @file ciphers.h Purple Cipher and Hash API
+ * @file cipher.h Purple Cipher and Hash API
  * @ingroup core
  */
 
@@ -23,8 +23,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
-#ifndef PURPLE_CIPHERS_H
-#define PURPLE_CIPHERS_H
+#ifndef PURPLE_CIPHER_H
+#define PURPLE_CIPHER_H
 
 #include <glib.h>
 #include <glib-object.h>
@@ -57,7 +57,7 @@
  *
  * Modes for batch encrypters
  */
-typedef enum  {
+typedef enum {
 	PURPLE_CIPHER_BATCH_MODE_ECB,
 	PURPLE_CIPHER_BATCH_MODE_CBC
 } PurpleCipherBatchMode;
@@ -407,4 +407,4 @@
 
 G_END_DECLS
 
-#endif /* PURPLE_CIPHERS_H */
+#endif /* PURPLE_CIPHER_H */
--- a/libpurple/ciphers/descipher.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/ciphers/descipher.c	Fri Dec 06 14:50:14 2013 +0530
@@ -5,12 +5,12 @@
  *  Copyright (C) 1998 Free Software Foundation, Inc.
  *
  *  Please see below for more legal information!
- *  
+ *
  *   According to the definition of DES in FIPS PUB 46-2 from December 1993.
  *   For a description of triple encryption, see:
  *     Bruce Schneier: Applied Cryptography. Second Edition.
  *     John Wiley & Sons, 1996. ISBN 0-471-12845-7. Pages 358 ff.
- *  
+ *
  * 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.
@@ -63,7 +63,7 @@
 static GObjectClass *parent_class = NULL;
 static GParamSpec *properties[PROP_LAST];
 
-/*  
+/*
  *  The s-box values are permuted according to the 'primitive function P'
  */
 static guint32 sbox1[64] = {
@@ -275,11 +275,11 @@
  *            16 encryption rounds.
  *            To calculate subkeys for decryption the caller
  *                have to reorder the generated subkeys.
- *     
+ *
  *        rawkey:       8 Bytes of key data
  *        subkey:       Array of at least 32 guint32s. Will be filled
  *              with calculated subkeys.
- *     
+ *
  */
 static void
 purple_des_cipher_key_schedule(const guint8 * rawkey, guint32 * subkey) {
@@ -579,4 +579,3 @@
 purple_des_cipher_new(void) {
 	return g_object_new(PURPLE_TYPE_DES_CIPHER, NULL);
 }
-
--- a/libpurple/ciphers/rc4cipher.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/ciphers/rc4cipher.c	Fri Dec 06 14:50:14 2013 +0530
@@ -31,10 +31,10 @@
 	(G_TYPE_INSTANCE_GET_PRIVATE((obj), PURPLE_TYPE_RC4_CIPHER, PurpleRC4CipherPrivate))
 
 typedef struct {
-  guchar state[256];
-  guchar x;
-  guchar y;
-  gint key_len;
+	guchar state[256];
+	guchar x;
+	guchar y;
+	gint key_len;
 } PurpleRC4CipherPrivate;
 
 /******************************************************************************
--- a/libpurple/circularbuffer.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/circularbuffer.c	Fri Dec 06 14:50:14 2013 +0530
@@ -54,7 +54,7 @@
 
 	/** A pointer to the next byte of buffered data that should be
 	 *  read by the consumer. */
-	gchar *output;	
+	gchar *output;
 } PurpleCircularBufferPrivate;
 
 /******************************************************************************
@@ -225,7 +225,7 @@
                                      gsize grow_size)
 {
 	PurpleCircularBufferPrivate *priv =
-		PURPLE_CIRCULAR_BUFFER_GET_PRIVATE(buffer);
+			PURPLE_CIRCULAR_BUFFER_GET_PRIVATE(buffer);
 
 	priv->growsize = (grow_size != 0) ? grow_size : DEFAULT_BUF_SIZE;
 
@@ -249,7 +249,7 @@
 static void
 purple_circular_buffer_finalize(GObject *obj) {
 	PurpleCircularBufferPrivate *priv =
-		PURPLE_CIRCULAR_BUFFER_GET_PRIVATE(obj);
+			PURPLE_CIRCULAR_BUFFER_GET_PRIVATE(obj);
 
 	g_free(priv->buffer);
 
--- a/libpurple/connection.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/connection.c	Fri Dec 06 14:50:14 2013 +0530
@@ -65,9 +65,9 @@
 
 	GSList *active_chats;         /**< A list of active chats
 	                                  (#PurpleChatConversation structs). */
-	void *proto_data;             /**< Protocol-specific data.            
-	                                  TODO Remove this, and use
-	                                       protocol-specific subclasses  */
+
+	/* TODO Remove this and use protocol-specific subclasses. */
+	void *proto_data;             /**< Protocol-specific data.           */
 
 	char *display_name;           /**< How you appear to other people.   */
 	guint keepalive;              /**< Keep-alive.                       */
--- a/libpurple/conversationtypes.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/conversationtypes.c	Fri Dec 06 14:50:14 2013 +0530
@@ -1379,7 +1379,7 @@
 		case CHAT_PROP_LEFT:
 			{
 				gboolean left = g_value_get_boolean(value);
-				if (left == TRUE)
+				if (left)
 					purple_chat_conversation_leave(chat);
 			}
 			break;
--- a/libpurple/conversationtypes.h	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/conversationtypes.h	Fri Dec 06 14:50:14 2013 +0530
@@ -226,7 +226,8 @@
  * Starts the IM's typing timeout.
  *
  * @param im      The IM.
- * @param timeout The timeout.
+ * @param timeout How long in seconds to wait before setting the typing state
+ *        to PURPLE_IM_NOT_TYPING.
  */
 void purple_im_conversation_start_typing_timeout(PurpleIMConversation *im, int timeout);
 
--- a/libpurple/dbus-define-api.h	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/dbus-define-api.h	Fri Dec 06 14:50:14 2013 +0530
@@ -1,5 +1,5 @@
 #ifndef __GI_SCANNER__ /* hide this file from g-ir-scanner */
-#error "This is file is not a valid C code"
+#error "This file is not a valid C code and is not intended to be compiled."
 
 /* This file contains some of the macros from other header files as
    function declarations.  This does not make sense in C, but it
--- a/libpurple/protocols/jabber/data.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/protocols/jabber/data.c	Fri Dec 06 14:50:14 2013 +0530
@@ -1,5 +1,5 @@
 /*
- * purple - Jabber Service Discovery
+ * purple - Handling of XEP-0231: Bits of Binary.
  *
  * 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
--- a/libpurple/protocols/jabber/data.h	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/protocols/jabber/data.h	Fri Dec 06 14:50:14 2013 +0530
@@ -1,5 +1,5 @@
 /*
- * purple - Jabber Service Discovery
+ * purple - Handling of XEP-0231: Bits of Binary.
  *
  * 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
--- a/libpurple/protocols/jabber/ibb.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/protocols/jabber/ibb.c	Fri Dec 06 14:50:14 2013 +0530
@@ -1,5 +1,5 @@
 /*
- * purple - Jabber Service Discovery
+ * purple - Handling of XEP-0047: In-Band Bytestreams.
  *
  * 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
--- a/libpurple/protocols/jabber/ibb.h	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/protocols/jabber/ibb.h	Fri Dec 06 14:50:14 2013 +0530
@@ -1,5 +1,5 @@
 /*
- * purple - Jabber Service Discovery
+ * purple - Handling of XEP-0047: In-Band Bytestreams.
  *
  * 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
--- a/libpurple/protocols/msn/msnutils.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/protocols/msn/msnutils.c	Fri Dec 06 14:50:14 2013 +0530
@@ -52,7 +52,6 @@
 	char *cur;
 	GString *pre  = g_string_new(NULL);
 	GString *post = g_string_new(NULL);
-	unsigned int colors[3];
 
 	if (pre_ret  != NULL) *pre_ret  = NULL;
 	if (post_ret != NULL) *post_ret = NULL;
@@ -95,8 +94,9 @@
 	if (cur && (*(cur = cur + 3) != ';'))
 	{
 		int i;
+		guint8 colors[3];
 
-		i = sscanf(cur, "%02x%02x%02x;", &colors[0], &colors[1], &colors[2]);
+		i = sscanf(cur, "%02hhx%02hhx%02hhx;", &colors[0], &colors[1], &colors[2]);
 
 		if (i > 0)
 		{
@@ -109,7 +109,7 @@
 			}
 			else if (i == 2)
 			{
-				unsigned int temp = colors[0];
+				guint8 temp = colors[0];
 
 				colors[0] = colors[1];
 				colors[1] = temp;
@@ -117,14 +117,14 @@
 			}
 			else if (i == 3)
 			{
-				unsigned int temp = colors[2];
+				guint8 temp = colors[2];
 
 				colors[2] = colors[0];
 				colors[0] = temp;
 			}
 
 			g_snprintf(tag, sizeof(tag),
-				"<FONT COLOR=\"#%02x%02x%02x\">",
+				"<FONT COLOR=\"#%02hhx%02hhx%02hhx\">",
 				colors[0] & 0xFF, colors[1] & 0xFF,
 				colors[2] & 0xFF);
 
--- a/libpurple/protocols/oscar/family_oservice.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/protocols/oscar/family_oservice.c	Fri Dec 06 14:50:14 2013 +0530
@@ -25,8 +25,6 @@
 
 #include "oscar.h"
 
-#include "ciphers/md5hash.h"
-
 /*
  * Each time we make a FLAP connection to an oscar server the server gives
  * us a list of rate classes.  Each rate class has different properties for
--- a/libpurple/roomlist.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/roomlist.c	Fri Dec 06 14:50:14 2013 +0530
@@ -46,9 +46,9 @@
 	GList *fields;           /**< The fields.                       */
 	GList *rooms;            /**< The list of rooms.                */
 	gboolean in_progress;    /**< The listing is in progress.       */
-	gpointer proto_data;     /** Protocol private data.
-	                             TODO Remove this, and use
-	                                  protocol-specific subclasses  */
+
+	/* TODO Remove this and use protocol-specific subclasses. */
+	gpointer proto_data;     /** Protocol private data.             */
 };
 
 /**
--- a/libpurple/whiteboard.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/whiteboard.c	Fri Dec 06 14:50:14 2013 +0530
@@ -40,10 +40,10 @@
 	PurpleAccount *account;         /**< Account associated with this session */
 	char *who;                      /**< Name of the remote user              */
 
-	void *proto_data;               /**< Protocol specific data
-	                                     TODO Remove this, and use
-	                                          protocol-specific subclasses    */
-	PurpleWhiteboardOps *protocol_ops; /**< Protocol operations */
+	/* TODO Remove this and use protocol-specific subclasses. */
+	void *proto_data;               /**< Protocol specific data               */
+
+	PurpleWhiteboardOps *protocol_ops; /**< Protocol operations               */
 
 	GList *draw_list;               /**< List of drawing elements/deltas to
 	                                     send                                 */
@@ -69,7 +69,7 @@
 static PurpleWhiteboardUiOps *whiteboard_ui_ops = NULL;
 /* static PurpleWhiteboardOps *whiteboard_protocol_ops = NULL; */
 
-static GList *wbList = NULL;
+static GList *wb_list = NULL;
 
 /*static gboolean auto_accept = TRUE; */
 
@@ -144,7 +144,7 @@
 	PurpleWhiteboard *wb;
 	PurpleWhiteboardPrivate *priv;
 
-	GList *l = wbList;
+	GList *l = wb_list;
 
 	/* Look for a whiteboard session between the local user and the remote user
 	 */
@@ -398,7 +398,7 @@
 	if(priv->protocol_ops && priv->protocol_ops->start)
 		priv->protocol_ops->start(wb);
 
-	wbList = g_list_append(wbList, wb);
+	wb_list = g_list_append(wb_list, wb);
 }
 
 /* GObject finalize function */
@@ -419,7 +419,7 @@
 	if(priv->protocol_ops && priv->protocol_ops->end)
 		priv->protocol_ops->end(wb);
 
-	wbList = g_list_remove(wbList, wb);
+	wb_list = g_list_remove(wb_list, wb);
 
 	g_free(priv->who);
 
--- a/libpurple/xfer.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/libpurple/xfer.c	Fri Dec 06 14:50:14 2013 +0530
@@ -100,9 +100,8 @@
 
 	PurpleXferUiOps *ui_ops;     /**< UI-specific operations.             */
 
-	void *proto_data;            /**< Protocol-specific data.
-	                                  TODO Remove this, and use
-	                                       protocol-specific subclasses   */
+	/* TODO Remove this and use protocol-specific subclasses. */
+	void *proto_data;            /**< Protocol-specific data.             */
 
 	/*
 	 * Used to moderate the file transfer when either the read/write ui_ops are
--- a/pidgin/gtknotify.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/pidgin/gtknotify.c	Fri Dec 06 14:50:14 2013 +0530
@@ -1376,10 +1376,6 @@
 			remote_command = g_strdup_printf("%s %s -remote "
 											 "openURL(%s,new-tab)",
 											 web_browser, args, escaped);
-		else if (place == PIDGIN_BROWSER_CURRENT)
-			remote_command = g_strdup_printf("%s %s -remote "
-											 "openURL(%s)",
-											 web_browser, args, escaped);
 	}
 	else if (!strcmp(web_browser, "netscape"))
 	{
@@ -1391,11 +1387,6 @@
 											 "openURL(%s,new-window)",
 											 escaped);
 		}
-		else if (place == PIDGIN_BROWSER_CURRENT)
-		{
-			remote_command = g_strdup_printf("netscape -remote "
-											 "openURL(%s)", escaped);
-		}
 	}
 	else if (!strcmp(web_browser, "opera"))
 	{
@@ -1403,12 +1394,6 @@
 			command = g_strdup_printf("opera -newwindow %s", escaped);
 		else if (place == PIDGIN_BROWSER_NEW_TAB)
 			command = g_strdup_printf("opera -newpage %s", escaped);
-		else if (place == PIDGIN_BROWSER_CURRENT)
-		{
-			remote_command = g_strdup_printf("opera -remote "
-											 "openURL(%s)", escaped);
-			command = g_strdup_printf("opera %s", escaped);
-		}
 		else
 			command = g_strdup_printf("opera %s", escaped);
 
--- a/pidgin/gtkprefs.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/pidgin/gtkprefs.c	Fri Dec 06 14:50:14 2013 +0530
@@ -2434,7 +2434,6 @@
 			label = pidgin_prefs_dropdown(hbox, _("_Open link in:"), PURPLE_PREF_INT,
 				PIDGIN_PREFS_ROOT "/browsers/place",
 				_("Browser default"), PIDGIN_BROWSER_DEFAULT,
-				_("Existing window"), PIDGIN_BROWSER_CURRENT,
 				_("New window"), PIDGIN_BROWSER_NEW_WINDOW,
 				_("New tab"), PIDGIN_BROWSER_NEW_TAB,
 				NULL);
@@ -4408,5 +4407,15 @@
 
 	purple_prefs_remove("/plugins/core/vvconfig");
 	purple_prefs_remove("/plugins/gtk/vvconfig");
+
+#ifndef _WIN32
+	/* Added in 3.0.0. */
+	if (purple_prefs_get_int(PIDGIN_PREFS_ROOT "/browsers/place") == 1) {
+		/* If the "open link in" pref is set to the old value for "existing
+		   window" then change it to "default." */
+		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/browsers/place",
+				PIDGIN_BROWSER_DEFAULT);
+	}
+#endif /* !_WIN32 */
 }
 
--- a/pidgin/gtkutils.h	Fri Dec 06 00:37:25 2013 +0530
+++ b/pidgin/gtkutils.h	Fri Dec 06 14:50:14 2013 +0530
@@ -58,8 +58,8 @@
 typedef enum
 {
 	PIDGIN_BROWSER_DEFAULT = 0,
-	PIDGIN_BROWSER_CURRENT,
-	PIDGIN_BROWSER_NEW_WINDOW,
+	/* value '1' was used by PIDGIN_BROWSER_CURRENT, which no longer exists */
+	PIDGIN_BROWSER_NEW_WINDOW = 2,
 	PIDGIN_BROWSER_NEW_TAB
 
 } PidginBrowserPlace;
--- a/pidgin/gtkwebviewtoolbar.c	Fri Dec 06 00:37:25 2013 +0530
+++ b/pidgin/gtkwebviewtoolbar.c	Fri Dec 06 14:50:14 2013 +0530
@@ -1529,7 +1529,7 @@
 	gtk_action_set_sensitive(priv->attention, FALSE);
 
 	gtk_action_set_sensitive(priv->smiley,
-		pidgin_themes_get_proto_smileys(NULL) != NULL);
+			pidgin_themes_get_proto_smileys(NULL) != NULL);
 
 	purple_prefs_connect_callback(toolbar,
 	                              PIDGIN_PREFS_ROOT "/conversations/toolbar/wide",

mercurial