changeset 28838:6ea85c7fe152

merge of '016d96cd3d2c3e0c9966b9209bae225a8d3cb696' and 'c64a1adc8bda2b4aeaae1f273541afbc4f71b810'
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 01 Jan 2010 08:32:17 +0000
parents 111a0a420ac7 (diff) 249784ec2bc7 (current diff)
children 932f16167621
files
diffstat 21 files changed, 92 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Thu Dec 31 05:24:31 2009 +0000
+++ b/COPYRIGHT	Fri Jan 01 08:32:17 2010 +0000
@@ -154,6 +154,7 @@
 David Fiander
 Rob Flynn <gaim@robflynn.com>
 Rob Foehl (rwf)
+Chris Foote
 Alan Ford
 Nathan Fredrickson
 Chris J. Friesen
--- a/ChangeLog.API	Thu Dec 31 05:24:31 2009 +0000
+++ b/ChangeLog.API	Fri Jan 01 08:32:17 2010 +0000
@@ -7,6 +7,13 @@
 		  purple_xfer_request_denied if an error is found when selecting
 		  a file to send. Request denied is still used when a receive
 		  request is not allowed.
+	Perl:
+		Changed:
+		* Corrected the package names for the PurpleProxyType and
+		  PurpleLogReadFlags enums to have the correct number of colons
+		  (from Purple::ProxyType::::<type> to Purple::ProxyType::<type>
+		  and Purple::Log:ReadFlags::::<type> to
+		  Purple::Log::ReadFlags::<type>)  (Chris Foote)
 
 version 2.6.4 (11/29/2009):
 	No changes
--- a/finch/gntidle.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/gntidle.c	Fri Jan 01 08:32:17 2010 +0000
@@ -21,6 +21,8 @@
  *
  */
 
+#include <internal.h>
+
 #include "finch.h"
 #include "gntidle.h"
 #include "gntwm.h"
--- a/finch/gntrequest.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/gntrequest.c	Fri Jan 01 08:32:17 2010 +0000
@@ -23,6 +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
  */
+#include <internal.h>
+
 #include <gnt.h>
 #include <gntbox.h>
 #include <gntbutton.h>
@@ -35,7 +37,6 @@
 #include <gnttree.h>
 
 #include "finch.h"
-#include <internal.h>
 #include "gntrequest.h"
 #include "debug.h"
 #include "util.h"
--- a/finch/gntstatus.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/gntstatus.c	Fri Jan 01 08:32:17 2010 +0000
@@ -23,6 +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
  */
+#include <internal.h>
+
 #include <gnt.h>
 #include <gntbox.h>
 #include <gntbutton.h>
@@ -34,7 +36,6 @@
 #include <gntutils.h>
 
 #include "finch.h"
-#include <internal.h>
 
 #include <notify.h>
 #include <request.h>
--- a/finch/libgnt/gntinternal.h	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/libgnt/gntinternal.h	Fri Jan 01 08:32:17 2010 +0000
@@ -32,6 +32,14 @@
 # define gnt_warning g_warning
 #endif
 
+#ifndef G_GNUC_NULL_TERMINATED
+#	if defined(__GNUC__) && __GNUC__ >= 4
+#		define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
+#	else
+#		define G_GNUC_NULL_TERMINATED
+#	endif
+#endif
+
 extern int gnt_need_conversation_to_locale;
 extern const char *C_(const char *x);
 
--- a/finch/libgnt/gntline.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/libgnt/gntline.c	Fri Jan 01 08:32:17 2010 +0000
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
 
+#include "gntinternal.h"
 #include "gntline.h"
 
 enum
--- a/finch/libgnt/gntmenuitem.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/libgnt/gntmenuitem.c	Fri Jan 01 08:32:17 2010 +0000
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
 
+#include "gntinternal.h"
 #include "gntmenu.h"
 #include "gntmenuitem.h"
 
--- a/finch/libgnt/gntmenuitemcheck.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/libgnt/gntmenuitemcheck.c	Fri Jan 01 08:32:17 2010 +0000
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
 
+#include "gntinternal.h"
 #include "gntmenuitemcheck.h"
 
 static GntMenuItemClass *parent_class = NULL;
--- a/finch/libgnt/gntprogressbar.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/libgnt/gntprogressbar.c	Fri Jan 01 08:32:17 2010 +0000
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  **/
 
+#include "gntinternal.h"
 #include "gntprogressbar.h"
 #include "gntutils.h"
 
--- a/finch/libgnt/gntslider.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/libgnt/gntslider.c	Fri Jan 01 08:32:17 2010 +0000
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
 
+#include "gntinternal.h"
 #include "gntcolors.h"
 #include "gntkeys.h"
 #include "gntslider.h"
--- a/finch/libgnt/gntwidget.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/libgnt/gntwidget.c	Fri Jan 01 08:32:17 2010 +0000
@@ -22,6 +22,7 @@
 
 /* Stuff brutally ripped from Gflib */
 
+#include "gntinternal.h"
 #include "gntwidget.h"
 #include "gntstyle.h"
 #include "gntmarshal.h"
--- a/finch/libgnt/gntwindow.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/libgnt/gntwindow.c	Fri Jan 01 08:32:17 2010 +0000
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
  */
 
+#include "gntinternal.h"
 #include "gntstyle.h"
 #include "gntwindow.h"
 
--- a/finch/libgnt/wms/irssi.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/finch/libgnt/wms/irssi.c	Fri Jan 01 08:32:17 2010 +0000
@@ -33,6 +33,8 @@
 #include <string.h>
 #include <sys/types.h>
 
+#include "gntinternal.h"
+
 #include "gnt.h"
 #include "gntbox.h"
 #include "gntmenu.h"
--- a/libpurple/conversation.h	Thu Dec 31 05:24:31 2009 +0000
+++ b/libpurple/conversation.h	Fri Jan 01 08:32:17 2010 +0000
@@ -368,7 +368,8 @@
  * @param type    The type of conversation.
  * @param account The account opening the conversation window on the purple
  *                user's end.
- * @param name    The name of the conversation.
+ * @param name    The name of the conversation.  For PURPLE_CONV_TYPE_IM,
+ *                this is the name of the buddy.
  *
  * @return The new conversation.
  */
--- a/libpurple/ft.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/libpurple/ft.c	Fri Jan 01 08:32:17 2010 +0000
@@ -69,6 +69,30 @@
 	g_free(priv);
 }
 
+static const gchar *
+purple_xfer_status_type_to_string(PurpleXferStatusType type)
+{
+	static const struct {
+		PurpleXferStatusType type;
+		const char *name;
+	} type_names[] = {
+		{ PURPLE_XFER_STATUS_UNKNOWN, "unknown" },
+		{ PURPLE_XFER_STATUS_NOT_STARTED, "not started" },
+		{ PURPLE_XFER_STATUS_ACCEPTED, "accepted" },
+		{ PURPLE_XFER_STATUS_STARTED, "started" },
+		{ PURPLE_XFER_STATUS_DONE, "done" },
+		{ PURPLE_XFER_STATUS_CANCEL_LOCAL, "cancelled locally" },
+		{ PURPLE_XFER_STATUS_CANCEL_REMOTE, "cancelled remotely" }
+	};
+	int i;
+
+	for (i = 0; i < G_N_ELEMENTS(type_names); ++i)
+		if (type_names[i].type == type)
+			return type_names[i].name;
+
+	return "invalid state";
+}
+
 GList *
 purple_xfers_get_all()
 {
@@ -180,6 +204,11 @@
 {
 	g_return_if_fail(xfer != NULL);
 
+	if (purple_debug_is_verbose())
+		purple_debug_info("xfer", "Changing status of xfer %p from %s to %s\n",
+				xfer, purple_xfer_status_type_to_string(xfer->status),
+				purple_xfer_status_type_to_string(status));
+
 	if (xfer->status == status)
 		return;
 
@@ -539,6 +568,8 @@
 	type = purple_xfer_get_type(xfer);
 	account = purple_xfer_get_account(xfer);
 
+	purple_debug_misc("xfer", "request accepted for %p\n", xfer); 
+
 	if (!filename && type == PURPLE_XFER_RECEIVE) {
 		xfer->status = PURPLE_XFER_STATUS_ACCEPTED;
 		xfer->ops.init(xfer);
@@ -616,6 +647,8 @@
 {
 	g_return_if_fail(xfer != NULL);
 
+	purple_debug_misc("xfer", "xfer %p denied\n", xfer);
+
 	if (xfer->ops.request_denied != NULL)
 		xfer->ops.request_denied(xfer);
 
@@ -1144,6 +1177,8 @@
 
 			purple_input_remove(xfer->watcher);
 			xfer->watcher = 0;
+
+			purple_debug_misc("xfer", "prpl is ready on ft %p, waiting for UI\n", xfer);
 			return;
 		}
 	}
@@ -1206,8 +1241,12 @@
 	priv = g_hash_table_lookup(xfers_data, xfer);
 	priv->ready |= PURPLE_XFER_READY_UI;
 
-	if (0 == (priv->ready & PURPLE_XFER_READY_PRPL))
+	if (0 == (priv->ready & PURPLE_XFER_READY_PRPL)) {
+		purple_debug_misc("xfer", "UI is ready on ft %p, waiting for prpl\n", xfer);
 		return;
+	}
+
+	purple_debug_misc("xfer", "UI (and prpl) ready on ft %p, so proceeding\n", xfer);
 
 	type = purple_xfer_get_type(xfer);
 	if (type == PURPLE_XFER_SEND)
@@ -1234,8 +1273,12 @@
 	priv->ready |= PURPLE_XFER_READY_PRPL;
 
 	/* I don't think fwrite/fread are ever *not* ready */
-	if (xfer->dest_fp == NULL && 0 == (priv->ready & PURPLE_XFER_READY_UI))
+	if (xfer->dest_fp == NULL && 0 == (priv->ready & PURPLE_XFER_READY_UI)) {
+		purple_debug_misc("xfer", "prpl is ready on ft %p, waiting for UI\n", xfer);
 		return;
+	}
+
+	purple_debug_misc("xfer", "Prpl (and UI) ready on ft %p, so proceeding\n", xfer);
 
 	priv->ready = PURPLE_XFER_READY_NONE;
 
--- a/libpurple/media.h	Thu Dec 31 05:24:31 2009 +0000
+++ b/libpurple/media.h	Fri Jan 01 08:32:17 2010 +0000
@@ -75,7 +75,7 @@
 	PURPLE_MEDIA_CAPS_VIDEO_SINGLE_DIRECTION = 1 << 3,
 	PURPLE_MEDIA_CAPS_AUDIO_VIDEO = 1 << 4,
 	PURPLE_MEDIA_CAPS_MODIFY_SESSION = 1 << 5,
-	PURPLE_MEDIA_CAPS_CHANGE_DIRECTION = 1 << 6,
+	PURPLE_MEDIA_CAPS_CHANGE_DIRECTION = 1 << 6
 } PurpleMediaCaps;
 
 /** Media session types */
@@ -93,7 +93,7 @@
 typedef enum {
 	PURPLE_MEDIA_STATE_NEW = 0,
 	PURPLE_MEDIA_STATE_CONNECTED,
-	PURPLE_MEDIA_STATE_END,
+	PURPLE_MEDIA_STATE_END
 } PurpleMediaState;
 
 /** Media info types */
@@ -106,7 +106,7 @@
 	PURPLE_MEDIA_INFO_PAUSE,
 	PURPLE_MEDIA_INFO_UNPAUSE,
 	PURPLE_MEDIA_INFO_HOLD,
-	PURPLE_MEDIA_INFO_UNHOLD,
+	PURPLE_MEDIA_INFO_UNHOLD
 } PurpleMediaInfoType;
 
 typedef enum {
@@ -114,18 +114,18 @@
 	PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX,
 	PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX,
 	PURPLE_MEDIA_CANDIDATE_TYPE_RELAY,
-	PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST,
+	PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST
 } PurpleMediaCandidateType;
 
 typedef enum {
 	PURPLE_MEDIA_COMPONENT_NONE = 0,
 	PURPLE_MEDIA_COMPONENT_RTP = 1,
-	PURPLE_MEDIA_COMPONENT_RTCP = 2,
+	PURPLE_MEDIA_COMPONENT_RTCP = 2
 } PurpleMediaComponentType;
 
 typedef enum {
 	PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
-	PURPLE_MEDIA_NETWORK_PROTOCOL_TCP,
+	PURPLE_MEDIA_NETWORK_PROTOCOL_TCP
 } PurpleMediaNetworkProtocol;
 
 #include "signals.h"
--- a/libpurple/plugins/perl/common/Log.xs	Thu Dec 31 05:24:31 2009 +0000
+++ b/libpurple/plugins/perl/common/Log.xs	Fri Jan 01 08:32:17 2010 +0000
@@ -6,7 +6,7 @@
 BOOT:
 {
 	HV *type_stash = gv_stashpv("Purple::Log::Type", 1);
-	HV *flags_stash = gv_stashpv("Purple::Log:ReadFlags::", 1);
+	HV *flags_stash = gv_stashpv("Purple::Log::ReadFlags", 1);
 
 	static const constiv *civ, type_const_iv[] = {
 #define const_iv(name) {#name, (IV)PURPLE_LOG_##name}
--- a/libpurple/plugins/perl/common/Proxy.xs	Thu Dec 31 05:24:31 2009 +0000
+++ b/libpurple/plugins/perl/common/Proxy.xs	Fri Jan 01 08:32:17 2010 +0000
@@ -5,7 +5,7 @@
 
 BOOT:
 {
-	HV *stash = gv_stashpv("Purple::ProxyType::", 1);
+	HV *stash = gv_stashpv("Purple::ProxyType", 1);
 
 	static const constiv *civ, const_iv[] = {
 #define const_iv(name) {#name, (IV)PURPLE_PROXY_##name}
--- a/libpurple/protocols/msn/slplink.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/libpurple/protocols/msn/slplink.c	Fri Jan 01 08:32:17 2010 +0000
@@ -669,7 +669,7 @@
 #define MAX_FILE_NAME_LEN 0x226
 
 static gchar *
-gen_context(const char *file_name, const char *file_path)
+gen_context(PurpleXfer *xfer, const char *file_name, const char *file_path)
 {
 	struct stat st;
 	gsize size = 0;
@@ -683,7 +683,10 @@
 	glong uni_len = 0;
 	gsize len;
 
-	if (g_stat(file_path, &st) == 0)
+	if (xfer)
+		size = purple_xfer_get_size(xfer);
+
+	if (size == 0 && g_stat(file_path, &st) == 0)
 		size = st.st_size;
 
 	if(!file_name) {
@@ -761,7 +764,7 @@
 
 	xfer->data = slpcall;
 
-	context = gen_context(fn, fp);
+	context = gen_context(xfer, fn, fp);
 
 	msn_slpcall_invite(slpcall, MSN_FT_GUID, 2, context);
 
--- a/libpurple/protocols/mxit/splashscreen.c	Thu Dec 31 05:24:31 2009 +0000
+++ b/libpurple/protocols/mxit/splashscreen.c	Fri Jan 01 08:32:17 2010 +0000
@@ -24,7 +24,6 @@
  */
 
 #include "internal.h"
-#include <glib/gstdio.h>
 
 #include "purple.h"
 #include "imgstore.h"