changeset 16697:589cc5757148

propagate from branch 'im.pidgin.padding' (head 4e0b1f990f77ad0ba6efa8bf6f73f422956b36fa) to branch 'im.pidgin.pidgin' (head 05168290f094ac829b3cec45fafc858cf25342a9)
author Gary Kramlich <grim@reaperworld.com>
date Mon, 30 Apr 2007 01:28:41 +0000
parents 8f4d82a1aa6d (diff) fbf111436896 (current diff)
children 8da9fef3843a
files libpurple/plugins/psychic.c libpurple/protocols/yahoo/yahoo.c
diffstat 14 files changed, 162 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Mon Apr 30 01:18:28 2007 +0000
+++ b/configure.ac	Mon Apr 30 01:28:41 2007 +0000
@@ -1,24 +1,49 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ([2.50])
 
-# Making releases:
-#   purple_micro_version += 1
-# if any functions have been added:
+# UPDATING VERSION NUMBERS FOR RELEASES
+#
+# purple_micro_version += 1
+#
+# If any functions have been added to libpurple, Pidgin, or Finch:
 #   purple_micro_version = 0
 #   purple_minor_version += 1
-#   lt_current += 1
-# if backwards compatibility has been broken
+#   purple_lt_current += 1
+#
+# If backwards compatibility has been broken in libpurple, Pidgin, or Finch:
 #   purple_micro_version = 0
 #   purple_minor_version = 0
 #   purple_major_version += 1;
-#   lt_current += 1
+#   purple_lt_current += 1
 #
 # purple_version_suffix should be similar to one of the following:
 #   For beta releases:          [beta2]
 #   For code under development: [devel]
 #   For production releases:    []
 #
-m4_define([lt_current], [0])
+#
+# If any code has changed in libgnt:
+#   gnt_micro_version += 1
+#
+# If any functions have been added to libgnt:
+#   gnt_micro_version = 0
+#   gnt_minor_version += 1
+#   gnt_lt_current += 1
+#
+# If backwards compatibility has been broken in libgnt:
+#   gnt_micro_version = 0
+#   gnt_minor_version = 0
+#   gnt_major_version += 1;
+#   gnt_lt_current += 1
+#
+# gnt_version_suffix should be similar to one of the following:
+#   For beta releases:          [beta2]
+#   For code under development: [devel]
+#   For production releases:    []
+#
+# Make sure to update finch/libgnt/configure.ac with libgnt version changes.
+#
+m4_define([purple_lt_current], [0])
 m4_define([purple_major_version], [2])
 m4_define([purple_minor_version], [0])
 m4_define([purple_micro_version], [0])
@@ -27,6 +52,16 @@
           [purple_major_version.purple_minor_version.purple_micro_version])
 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
 
+m4_define([gnt_lt_current], [0])
+m4_define([gnt_major_version], [1])
+m4_define([gnt_minor_version], [0])
+m4_define([gnt_micro_version], [0])
+m4_define([gnt_version_suffix], [beta7])
+m4_define([gnt_version],
+          [gnt_major_version.gnt_minor_version.gnt_micro_version])
+m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
+
+
 AC_INIT([pidgin], [purple_display_version], [devel@pidgin.im])
 
 AC_CANONICAL_SYSTEM
@@ -43,11 +78,20 @@
 AC_SUBST(PURPLE_MICRO_VERSION)
 AC_SUBST(PURPLE_VERSION)
 
-m4_define([lt_revision], [purple_micro_version])
-m4_define([lt_age], [purple_minor_version])
-LT_VERSION_INFO="lt_current:lt_revision:lt_age"
-AC_SUBST(LT_VERSION_INFO)
+PURPLE_LT_VERSION_INFO="purple_lt_current:purple_micro_version:purple_minor_version"
+AC_SUBST(PURPLE_LT_VERSION_INFO)
 
+GNT_MAJOR_VERSION=gnt_major_version
+GNT_MINOR_VERSION=gnt_minor_version
+GNT_MICRO_VERSION=gnt_micro_version
+GNT_VERSION=[gnt_display_version]
+AC_SUBST(GNT_MAJOR_VERSION)
+AC_SUBST(GNT_MINOR_VERSION)
+AC_SUBST(GNT_MICRO_VERSION)
+AC_SUBST(GNT_VERSION)
+
+GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
+AC_SUBST(GNT_LT_VERSION_INFO)
 
 AC_DEFINE(PIDGIN_NAME, "Pidgin", [The user-visible application name])
 
@@ -684,6 +728,7 @@
 	GADU_LIBS="$GADU_LIBS -lgadu"
 	AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
 fi
+GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
 
 if test "x$gadu_libs" = "xyes"; then
 	AC_MSG_CHECKING(for libgadu GPL compatibility)
--- a/doc/Makefile.am	Mon Apr 30 01:18:28 2007 +0000
+++ b/doc/Makefile.am	Mon Apr 30 01:28:41 2007 +0000
@@ -21,6 +21,7 @@
 	gtklog-signals.dox \
 	gtkimhtml-signals.dox \
 	gtkrc-2.0 \
+	imgstore-signals.dox \
 	log-signals.dox \
 	notify-signals.dox \
 	pidgin.1.in \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/imgstore-signals.dox	Mon Apr 30 01:28:41 2007 +0000
@@ -0,0 +1,24 @@
+/** @page imgstore-signals Image Store Signals
+
+ @signals
+  @signal image-deleting
+ @endsignals
+
+ <hr>
+
+ @signaldef image-deleting
+  @signalproto
+char *(*image_deleting)(const PurpleStoredImage *img);
+  @endsignalproto
+  @signaldesc
+   Emitted when a PurpleStoredImage is about to be destroyed.  This allows
+   for what amounts to weak references.  Code can hold onto a pointer to
+   the PurpleStoredImage without actually "holding" a reference.  They can
+   then use a signal handler to let them know when their img is about to
+   be destroyed.
+  @param img The image about to be destroyed.
+  @note It's not possible to purple_imgstore_ref() img to save it.
+ @endsignaldef
+
+*/
+// vim: syntax=c tw=75 et
--- a/doc/pidgin.1.in	Mon Apr 30 01:18:28 2007 +0000
+++ b/doc/pidgin.1.in	Mon Apr 30 01:28:41 2007 +0000
@@ -570,6 +570,8 @@
 
 Our crazy patch writers include:
 
+John 'rekkanoryo' Bailey
+.br
 Ka-Hing 'javabsp' Cheung
 .br
 Sadrul Habib Chowdhury
--- a/finch/gntconv.h	Mon Apr 30 01:18:28 2007 +0000
+++ b/finch/gntconv.h	Mon Apr 30 01:28:41 2007 +0000
@@ -49,6 +49,7 @@
 	GntWidget *tv;            /* text-view */
 	GntWidget *menu;          /* future use */
 	GntWidget *info;
+	void *pad;
 
 	union
 	{
@@ -60,11 +61,14 @@
 struct _FinchConvChat
 {
 	GntWidget *userlist;       /* the userlist */
+	void *pad1;
+	void *pad2;
 };
 
 struct _FinchConvIm
 {
 	void *nothing_for_now;
+	void *something_for_later;
 };
 
 /**
--- a/finch/libgnt/Makefile.am	Mon Apr 30 01:18:28 2007 +0000
+++ b/finch/libgnt/Makefile.am	Mon Apr 30 01:28:41 2007 +0000
@@ -76,7 +76,7 @@
 	$(libgnt_la_headers)
 
 libgnt_la_DEPENDENCIES = 
-libgnt_la_LDFLAGS = -export-dynamic
+libgnt_la_LDFLAGS = -export-dynamic -version_info $(GNT_LT_VERSION_INFO) -no-undefined
 libgnt_la_LIBADD = \
 	$(GLIB_LIBS) \
 	$(GNT_LIBS) \
--- a/finch/libgnt/configure.ac	Mon Apr 30 01:18:28 2007 +0000
+++ b/finch/libgnt/configure.ac	Mon Apr 30 01:28:41 2007 +0000
@@ -1,10 +1,54 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([libgnt], [0.0.0dev], [devel@pidgin.im])
+AC_PREREQ([2.50])
+
+# UPDATING VERSION NUMBERS FOR RELEASES
+#
+# gnt_micro_version += 1
+#
+# If any functions have been added to libgnt:
+#   gnt_micro_version = 0
+#   gnt_minor_version += 1
+#   gnt_lt_current += 1
+#
+# If backwards compatibility has been broken in libgnt:
+#   gnt_micro_version = 0
+#   gnt_minor_version = 0
+#   gnt_major_version += 1;
+#   gnt_lt_current += 1
+#
+# gnt_version_suffix should be similar to one of the following:
+#   For beta releases:          [beta2]
+#   For code under development: [devel]
+#   For production releases:    []
+#
+# Make sure to update ../../configure.ac with libgnt version changes.
+#
+
+m4_define([gnt_lt_current], [0])
+m4_define([gnt_major_version], [1])
+m4_define([gnt_minor_version], [0])
+m4_define([gnt_micro_version], [0])
+m4_define([gnt_version_suffix], [beta7])
+m4_define([gnt_version],
+          [gnt_major_version.gnt_minor_version.gnt_micro_version])
+m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
+
+AC_INIT([libgnt], [gnt_display_version], [devel@pidgin.im])
 AC_CANONICAL_SYSTEM
 AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
-AC_PREREQ([2.50])
+GNT_MAJOR_VERSION=gnt_major_version
+GNT_MINOR_VERSION=gnt_minor_version
+GNT_MICRO_VERSION=gnt_micro_version
+GNT_VERSION=[gnt_display_version]
+AC_SUBST(GNT_MAJOR_VERSION)
+AC_SUBST(GNT_MINOR_VERSION)
+AC_SUBST(GNT_MICRO_VERSION)
+AC_SUBST(GNT_VERSION)
+
+GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
+AC_SUBST(GNT_LT_VERSION_INFO)
 
 AC_PATH_PROG(sedpath, sed)
 
--- a/libpurple/Makefile.am	Mon Apr 30 01:18:28 2007 +0000
+++ b/libpurple/Makefile.am	Mon Apr 30 01:28:41 2007 +0000
@@ -173,7 +173,7 @@
 libpurple_client_lib = libpurple-client.la
 
 libpurple_client_la_SOURCES = purple-client.c purple-client.h
-
+libpurple_client_la_LDFLAGS = -version-info $(PURPLE_LT_VERSION_INFO) -no-undefined
 libpurple_client_la_LIBADD = $(DBUS_LIBS)
 
 purple-client-bindings.c: dbus-analyze-functions.py $(dbus_exported)
@@ -221,7 +221,7 @@
 	$(dbus_headers)
 
 libpurple_la_DEPENDENCIES = $(STATIC_LINK_LIBS)
-libpurple_la_LDFLAGS = -export-dynamic -version-info $(LT_VERSION_INFO) -no-undefined
+libpurple_la_LDFLAGS = -export-dynamic -version-info $(PURPLE_LT_VERSION_INFO) -no-undefined
 libpurple_la_LIBADD = \
 	$(DBUS_LIBS) \
 	$(GLIB_LIBS) \
--- a/libpurple/buddyicon.c	Mon Apr 30 01:18:28 2007 +0000
+++ b/libpurple/buddyicon.c	Mon Apr 30 01:28:41 2007 +0000
@@ -208,7 +208,7 @@
 }
 
 static void
-image_deleting_cb(PurpleStoredImage *img, gpointer data)
+image_deleting_cb(const PurpleStoredImage *img, gpointer data)
 {
 	const char *filename = purple_imgstore_get_filename(img);
 
--- a/libpurple/plugins/psychic.c	Mon Apr 30 01:18:28 2007 +0000
+++ b/libpurple/plugins/psychic.c	Mon Apr 30 01:28:41 2007 +0000
@@ -9,6 +9,7 @@
 #include "signals.h"
 #include "status.h"
 #include "version.h"
+#include "privacy.h"
 
 #include "plugin.h"
 #include "pluginpref.h"
@@ -47,6 +48,11 @@
     return;
   }
 
+  if(FALSE == purple_privacy_check(acct, name)) {
+    purple_debug_info("psychic", "user %s is blocked", name);
+    return;
+  }
+
   gconv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, acct);
   if(! gconv) {
     purple_debug_info("psychic", "no previous conversation exists\n");
--- a/libpurple/protocols/yahoo/yahoo.c	Mon Apr 30 01:18:28 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Mon Apr 30 01:28:41 2007 +0000
@@ -76,7 +76,8 @@
 	purple_privacy_permit_remove(gc->account,who,TRUE);
 }
 
-gboolean yahoo_privacy_check(PurpleConnection *gc, const char *who)
+gboolean
+yahoo_privacy_check(PurpleConnection *gc, const char *who)
 {
 	/* returns TRUE if allowed through, FALSE otherwise */
 	gboolean permitted;
--- a/libpurple/protocols/yahoo/yahoo_picture.c	Mon Apr 30 01:18:28 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo_picture.c	Mon Apr 30 01:28:41 2007 +0000
@@ -546,7 +546,9 @@
 
 		/* TODO: At some point, it'd be nice to fix this for real, or
 		 * TODO: at least change it to be something like:
-		 * TODO: purple_imgstore_get_filename(img); */
+		 * TODO: purple_imgstore_get_filename(img);
+		 * TODO: But it would be great if we knew how to calculate the
+		 * TODO: Checksum correctly. */
 		yd->picture_checksum = g_string_hash(s);
 
 		if ((yd->picture_checksum == oldcksum) &&
@@ -559,10 +561,8 @@
 			return;
 		}
 
-		/* TODO: FIXME: This is completely wrong.  The upload code needs to
-		 * TODO: be modified to work with a PurpleStoredImage. */
-		iconfile = g_build_filename(purple_buddy_icons_get_cache_dir(),
-		                            purple_imgstore_get_filename(img), NULL);
+		/* We use this solely for sending a filename to the server */
+		iconfile = g_strdup(purple_imgstore_get_filename(img));
 		d = g_new0(struct yahoo_buddy_icon_upload_data, 1);
 		d->gc = gc;
 		d->str = s;
--- a/pidgin/gtkdialogs.c	Mon Apr 30 01:18:28 2007 +0000
+++ b/pidgin/gtkdialogs.c	Mon Apr 30 01:28:41 2007 +0000
@@ -92,6 +92,7 @@
 
 /* Order: Alphabetical by Last Name */
 static struct developer patch_writers[] = {
+	{"John 'rekkanoryo' Bailey",	NULL,	NULL},
 	{"Ka-Hing 'javabsp' Cheung",	NULL,	NULL},
 	{"Felipe 'shx' Contreras",		NULL,	NULL},
 	{"Decklin Foster",				NULL,	NULL},
--- a/pidgin/gtkstatusbox.c	Mon Apr 30 01:18:28 2007 +0000
+++ b/pidgin/gtkstatusbox.c	Mon Apr 30 01:28:41 2007 +0000
@@ -1449,9 +1449,18 @@
 						data = pidgin_convert_buddy_icon(plug, filename, &len);
 					img = purple_buddy_icons_set_account_icon(account, data, len);
 					purple_account_set_buddy_icon_path(account, filename);
+				}
+			}
+		}
 
-					purple_account_set_bool(account, "use-global-buddyicon", (filename != NULL));
-				}
+		/* Even if no accounts were processed, load the icon that was set. */
+		if (filename != NULL)
+		{
+			gchar *contents;
+			gsize size;
+			if (g_file_get_contents(filename, &contents, &size, NULL))
+			{
+				img = purple_imgstore_add(contents, size, filename);
 			}
 		}
 	}