changeset 16656:d2809bacb4a0

merge of '00655c64b5e1fd72a35c3884e30acf5bc9bef892' and '185797cd43f7688a6adffb29894d7da625cdfa22'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 29 Apr 2007 15:16:55 +0000
parents 0bad106a6c24 (current diff) b7c550dab1bc (diff)
children 5d9f6a1f4b49 1c9835f8b29c
files pidgin/gtkrequest.c
diffstat 25 files changed, 304 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Sun Apr 29 15:14:29 2007 +0000
+++ b/ChangeLog.API	Sun Apr 29 15:16:55 2007 +0000
@@ -164,14 +164,23 @@
 	* gaim_gtk_buddy_icon_get_scale_size() was changed to accept an
 	  additional parameter which is used to determine what kind of
 	  scaling should be done, if any.
-    * purple_request_input(), purple_request_choice(),
-      purple_request_choice_varg(), purple_request_action(),
-      purple_request_action_varg(), purple_request_fields(),
-      purple_request_yes_no(), purple_request_ok_cancel(),
-      purple_request_accept_cancel(), purple_request_file(), and
-      purple_request_folder() was changed to accept account, who, and
-      conversation parameters for associating the request with an account, a
-      buddy, or a conversation.
+	* purple_request_input(), purple_request_choice(),
+	  purple_request_choice_varg(), purple_request_action(),
+	  purple_request_action_varg(), purple_request_fields(),
+	  purple_request_yes_no(), purple_request_ok_cancel(),
+	  purple_request_accept_cancel(), purple_request_file(), and
+	  purple_request_folder() was changed to accept account, who, and
+	  conversation parameters for associating the request with an account, a
+	  buddy, or a conversation.
+	* Significant changes to the buddy icon and imgstore APIs.  If you
+	  were using any of it, it's best to look at the header files or
+	  Doxygen documentation, but here are some significant changes:
+	    purple_buddy_icon_new() now takes ownership of ("frees") icon_data
+	    purple_buddy_icon_set_data(): likewise for data
+	    purple_buddy_icon_set_for_user(): likewise for data
+	    purple_buddy_icon_set_for_user() now takes a checksum parameter
+	    purple_imgstore_add() was renamed to purple_imgstore_add_with_id()
+	      which takes ownership of data
 
 	Removed:
 	* gaim_gtk_sound_{get,set}_mute() (replaced by the /gaim/gtk/sound/mute
--- a/Makefile.am	Sun Apr 29 15:14:29 2007 +0000
+++ b/Makefile.am	Sun Apr 29 15:16:55 2007 +0000
@@ -17,7 +17,8 @@
 		pidgin.apspec.in \
 		pidgin.spec.in \
 		pidgin.desktop.in \
-		po/Makefile.mingw
+		po/Makefile.mingw \
+		valgrind-suppressions
 
 noinst_HEADERS = config.h
 
--- a/configure.ac	Sun Apr 29 15:14:29 2007 +0000
+++ b/configure.ac	Sun Apr 29 15:16:55 2007 +0000
@@ -11,10 +11,15 @@
 #   purple_micro_version = 0
 #   purple_major_version += 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([purple_major_version], [2])
 m4_define([purple_minor_version], [0])
 m4_define([purple_micro_version], [0])
-m4_define([purple_version_suffix], [devel])
+m4_define([purple_version_suffix], [beta7])
 m4_define([purple_version],
           [purple_major_version.purple_minor_version.purple_micro_version])
 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
--- a/libpurple/account.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/account.c	Sun Apr 29 15:16:55 2007 +0000
@@ -802,7 +802,7 @@
 
 	xmlnode_free(node);
 
-	purple_buddy_icons_account_loaded_cb();
+	_purple_buddy_icons_account_loaded_cb();
 }
 
 
--- a/libpurple/blist.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/blist.c	Sun Apr 29 15:16:55 2007 +0000
@@ -607,7 +607,7 @@
 	xmlnode_free(purple);
 
 	/* This tells the buddy icon code to do its thing. */
-	purple_buddy_icons_blist_loaded_cb();
+	_purple_buddy_icons_blist_loaded_cb();
 }
 
 
--- a/libpurple/buddyicon.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/buddyicon.c	Sun Apr 29 15:16:55 2007 +0000
@@ -212,6 +212,10 @@
 {
 	const char *filename = purple_imgstore_get_filename(img);
 
+	/* If there's no filename, it can't be one of our images. */
+	if (filename == NULL)
+		return;
+
 	if (img == g_hash_table_lookup(icon_data_cache, filename))
 	{
 		purple_buddy_icon_data_uncache_file(filename);
@@ -694,11 +698,13 @@
 	{
 		const char *filename = purple_imgstore_get_filename(img);
 		purple_account_set_string(account, "buddy_icon", filename);
+		purple_account_set_int(account, "buddy_icon_timestamp", time(NULL));
 		ref_filename(filename);
 	}
 	else
 	{
 		purple_account_set_string(account, "buddy_icon", NULL);
+		purple_account_set_int(account, "buddy_icon_timestamp", 0);
 	}
 	unref_filename(old_icon);
 
@@ -721,7 +727,7 @@
 
 	if (old_img)
 		purple_imgstore_unref(old_img);
-	else
+	else if (old_icon)
 	{
 		/* The old icon may not have been loaded into memory.  In that
 		 * case, we'll need to uncache the filename.  The filenames
@@ -733,6 +739,25 @@
 	return img;
 }
 
+time_t
+purple_buddy_icons_get_account_icon_timestamp(PurpleAccount *account)
+{
+	time_t ret;
+
+	g_return_val_if_fail(account != NULL, 0);
+
+	ret = purple_account_get_int(account, "buddy_icon_timestamp", 0);
+
+	/* This deals with migration cases. */
+	if (ret == 0 && purple_account_get_string(account, "buddy_icon", NULL) != NULL)
+	{
+		ret = time(NULL);
+		purple_account_set_int(account, "buddy_icon_timestamp", ret);
+	}
+
+	return ret;
+}
+
 PurpleStoredImage *
 purple_buddy_icons_find_custom_icon(PurpleContact *contact)
 {
@@ -842,7 +867,7 @@
 }
 
 void
-purple_buddy_icon_set_old_icons_dir(const char *dirname)
+_purple_buddy_icon_set_old_icons_dir(const char *dirname)
 {
 	old_icons_dir = g_strdup(dirname);
 }
@@ -887,9 +912,19 @@
 		FILE *file;
 		char *new_filename;
 
-		if (!read_icon_file(path, &icon_data, &icon_len) ||
-		    icon_data == NULL || icon_len > 0)
+		if (!read_icon_file(path, &icon_data, &icon_len))
 		{
+			g_free(path);
+			delete_buddy_icon_settings(node, setting_name);
+			return;
+		}
+
+		if (icon_data == NULL || icon_len <= 0)
+		{
+			/* This really applies to the icon_len check.
+			 * icon_data should never be NULL if
+			 * read_icon_file() returns TRUE. */
+			purple_debug_error("buddyicon", "Empty buddy icon file: %s\n", path);
 			delete_buddy_icon_settings(node, setting_name);
 			g_free(path);
 			return;
@@ -900,8 +935,11 @@
 		new_filename = purple_buddy_icon_data_calculate_filename(icon_data, icon_len);
 		if (new_filename == NULL)
 		{
+			purple_debug_error("buddyicon",
+				"New icon filename is NULL. This should never happen! "
+				"The old filename was: %s\n", path);
 			delete_buddy_icon_settings(node, setting_name);
-			return;
+			g_return_if_reached();
 		}
 
 		path = g_build_filename(dirname, new_filename, NULL);
@@ -967,14 +1005,14 @@
 	}
 	else
 	{
-		/* If the icon is gone, drop the setting... */
+		purple_debug_error("buddyicon", "Old icon file doesn't exist: %s\n", path);
 		delete_buddy_icon_settings(node, setting_name);
 		g_free(path);
 	}
 }
 
 void
-purple_buddy_icons_account_loaded_cb()
+_purple_buddy_icons_account_loaded_cb()
 {
 	const char *dirname = purple_buddy_icons_get_cache_dir();
 	GList *cur;
@@ -999,7 +1037,7 @@
 }
 
 void
-purple_buddy_icons_blist_loaded_cb()
+_purple_buddy_icons_blist_loaded_cb()
 {
 	PurpleBlistNode *node = purple_blist_get_root();
 	const char *dirname = purple_buddy_icons_get_cache_dir();
@@ -1124,7 +1162,8 @@
 		g_direct_hash, g_direct_equal,
 		NULL, (GFreeFunc)g_hash_table_destroy);
 
-	icon_data_cache = g_hash_table_new(g_str_hash, g_str_equal);
+	icon_data_cache = g_hash_table_new_full(g_str_hash, g_str_equal,
+	                                        g_free, NULL);
 	icon_file_cache = g_hash_table_new_full(g_str_hash, g_str_equal,
 	                                        g_free, NULL);
 	pointer_icon_cache = g_hash_table_new(g_direct_hash, g_direct_equal);
--- a/libpurple/buddyicon.h	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/buddyicon.h	Sun Apr 29 15:16:55 2007 +0000
@@ -261,6 +261,19 @@
                                     guchar *icon_data, size_t icon_len);
 
 /**
+ * Returns the timestamp of when the icon was set.
+ *
+ * This is intended for use in protocols that require a timestamp for
+ * buddy icon update reasons.
+ *
+ * @param account The account
+ *
+ * @return The time the icon was set, or 0 if an error occurred.
+ */
+time_t
+purple_buddy_icons_get_account_icon_timestamp(PurpleAccount *account);
+
+/**
  * Returns the custom buddy icon image for a contact.
  *
  * The caller owns a reference to the image in the store, and must dereference
--- a/libpurple/core.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/core.c	Sun Apr 29 15:16:55 2007 +0000
@@ -641,7 +641,7 @@
 	}
 
 	old_icons_dir = g_build_filename(old_user_dir, "icons", NULL);
-	purple_buddy_icon_set_old_icons_dir(old_icons_dir);
+	_purple_buddy_icon_set_old_icons_dir(old_icons_dir);
 	g_free(old_icons_dir);
 
 	g_free(old_user_dir);
--- a/libpurple/dnsquery.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/dnsquery.c	Sun Apr 29 15:16:55 2007 +0000
@@ -140,7 +140,7 @@
  * Begin the DNS resolver child process functions.
  */
 #ifdef HAVE_SIGNAL_H
-static void
+G_GNUC_NORETURN static void
 trap_gdb_bug()
 {
 	const char *message =
@@ -158,7 +158,7 @@
 }
 #endif
 
-static void
+G_GNUC_NORETURN static void
 purple_dnsquery_resolver_run(int child_out, int child_in, gboolean show_debug)
 {
 	dns_params_t dns_params;
--- a/libpurple/dnssrv.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/dnssrv.c	Sun Apr 29 15:16:55 2007 +0000
@@ -92,7 +92,7 @@
 
 #ifndef _WIN32
 
-static void
+G_GNUC_NORETURN static void
 resolve(int in, int out)
 {
 	GList *ret = NULL;
--- a/libpurple/gaim-compat.h	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/gaim-compat.h	Sun Apr 29 15:16:55 2007 +0000
@@ -345,7 +345,7 @@
 #define gaim_buddy_icon_update   purple_buddy_icon_update
 
 #define gaim_buddy_icon_set_data(icon, data, len) \
-        purple_buddy_icon_set_protocol_data(icon, g_memdup(data, len), len, NULL);
+        purple_buddy_icon_set_data(icon, g_memdup(data, len), len, NULL);
 
 #define gaim_buddy_icon_get_account   purple_buddy_icon_get_account
 #define gaim_buddy_icon_get_username  purple_buddy_icon_get_username
@@ -353,7 +353,7 @@
 #define gaim_buddy_icon_get_type      purple_buddy_icon_get_extension
 
 #define gaim_buddy_icons_set_for_user(icon, data, len) \
-        purple_buddy_icons_set_for_user(icon, g_memdup(data, len), len)
+        purple_buddy_icons_set_for_user(icon, g_memdup(data, len), len, NULL)
 #define gaim_buddy_icons_find           purple_buddy_icons_find
 #define gaim_buddy_icons_set_caching    purple_buddy_icons_set_caching
 #define gaim_buddy_icons_is_caching     purple_buddy_icons_is_caching
@@ -961,7 +961,8 @@
 
 #define GaimStoredImage  PurpleStoredImage
 
-#define gaim_imgstore_add(data, size, filename) purple_imgstore_add_with_id(g_memdup(data, size), size, filename)
+#define gaim_imgstore_add(data, size, filename) \
+        purple_imgstore_add_with_id(g_memdup(data, size), size, filename)
 #define gaim_imgstore_get           purple_imgstore_find_by_id
 #define gaim_imgstore_get_data      purple_imgstore_get_data
 #define gaim_imgstore_get_size      purple_imgstore_get_size
--- a/libpurple/internal.h	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/internal.h	Sun Apr 29 15:16:55 2007 +0000
@@ -187,17 +187,17 @@
 /* This is for the accounts code to notify the buddy icon code that
  * it's done loading.  We may want to replace this with a signal. */
 void
-purple_buddy_icons_account_loaded_cb(void);
+_purple_buddy_icons_account_loaded_cb(void);
 
 /* This is for the buddy list to notify the buddy icon code that
  * it's done loading.  We may want to replace this with a signal. */
 void
-purple_buddy_icons_blist_loaded_cb(void);
+_purple_buddy_icons_blist_loaded_cb(void);
 
 /* This is for the purple_core_migrate() code to tell the buddy
  * icon subsystem about the old icons directory so it can
  * migrate any icons in use. */
 void
-purple_buddy_icon_set_old_icons_dir(const char *dirname);
+_purple_buddy_icon_set_old_icons_dir(const char *dirname);
 
 #endif /* _PURPLE_INTERNAL_H_ */
--- a/libpurple/protocols/msn/slp.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/protocols/msn/slp.c	Sun Apr 29 15:16:55 2007 +0000
@@ -955,7 +955,7 @@
 
 	if (obj == NULL)
 	{
-/*		purple_buddy_icons_set_for_user(account, user->passport, NULL, 0, NULL); */
+		purple_buddy_icons_set_for_user(account, user->passport, NULL, 0, NULL);
 		return;
 	}
 
--- a/libpurple/protocols/oscar/oscar.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Sun Apr 29 15:16:55 2007 +0000
@@ -1941,9 +1941,9 @@
 		purple_debug_info("oscar",
 				   "Sending buddy icon to %s (%d bytes)\n",
 				   userinfo->sn, len);
-		/* TODO: XXX: FIXME: Does this actually need the mtime of the file? */
 		aim_im_sendch2_icon(od, userinfo->sn, data, len,
-			time(NULL), aimutil_iconsum(data, len));
+			purple_buddy_icons_get_account_icon_timestamp(account),
+			aimutil_iconsum(data, len));
 	}
 	purple_imgstore_unref(img);
 
@@ -4232,8 +4232,7 @@
 			gconstpointer data = purple_imgstore_get_data(img);
 			args.iconlen   = purple_imgstore_get_size(img);
 			args.iconsum   = aimutil_iconsum(data, args.iconlen);
-			/* TODO: XXX: FIXME: Deal with the timestamp issue. */
-			args.iconstamp = time(NULL);
+			args.iconstamp = purple_buddy_icons_get_account_icon_timestamp(account);
 
 			if ((args.iconlen != bi->ico_me_len) || (args.iconsum != bi->ico_me_csum) || (args.iconstamp != bi->ico_me_time)) {
 				bi->ico_informed = FALSE;
--- a/libpurple/protocols/silc/buddy.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/protocols/silc/buddy.c	Sun Apr 29 15:16:55 2007 +0000
@@ -1706,7 +1706,7 @@
 	if (!mime)
 		return;
 
-	t = purple_util_get_image_extension(purple_imgstore_get_data(img), purple_imgstore_get_size(img));
+	t = purple_imgstore_get_extension(img);
 	if (!t || !strcmp(t, "icon")) {
 		silc_mime_free(mime);
 		return;
--- a/libpurple/savedstatuses.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/savedstatuses.c	Sun Apr 29 15:16:55 2007 +0000
@@ -154,7 +154,7 @@
 }
 
 /**
- * A magic number is calcuated for each status, and then the
+ * A magic number is calculated for each status, and then the
  * statuses are ordered by the magic number.  The magic number
  * is the date the status was last used offset by one day for
  * each time the status has been used (but only by 10 days at
--- a/libpurple/win32/targets.mak	Sun Apr 29 15:14:29 2007 +0000
+++ b/libpurple/win32/targets.mak	Sun Apr 29 15:16:55 2007 +0000
@@ -8,16 +8,13 @@
 $(PIDGIN_CONFIG_H): $(PIDGIN_TREE_TOP)/config.h.mingw
 	cp $(PIDGIN_TREE_TOP)/config.h.mingw $(PIDGIN_CONFIG_H)
 
-$(PURPLE_VERSION_H): $(PURPLE_VERSION_H).in
+$(PURPLE_VERSION_H): $(PURPLE_VERSION_H).in $(PIDGIN_TREE_TOP)/configure.ac
 	cp $(PURPLE_VERSION_H).in $(PURPLE_VERSION_H)
 	awk 'BEGIN {FS="[\\(\\)\\[\\]]"} \
 	  /^m4_define..purple_major_version/ {system("sed -i -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $(PURPLE_VERSION_H)");} \
 	  /^m4_define..purple_minor_version/ {system("sed -i -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $(PURPLE_VERSION_H)");} \
 	  /^m4_define..purple_micro_version/ {system("sed -i -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $(PURPLE_VERSION_H)"); exit}' $(PIDGIN_TREE_TOP)/configure.ac
 
-	sed -e s/@PURPLE_MAJOR_VERSION@/2/ -e s/@PURPLE_MINOR_VERSION@/0/ -e s/@PURPLE_MICRO_VERSION@/0/ $(PURPLE_TOP)/version.h.in > $(PURPLE_VERSION_H)
-
-
 $(PURPLE_DLL) $(PURPLE_DLL).a: $(PURPLE_VERSION_H)
 	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) libpurple.dll
 
--- a/pidgin.spec.in	Sun Apr 29 15:14:29 2007 +0000
+++ b/pidgin.spec.in	Sun Apr 29 15:16:55 2007 +0000
@@ -6,10 +6,10 @@
 # When not doing betas comment this out
 # NOTE: %defines in spec files are evaluated in comments so the correct
 #       way to comment it out is to replace the % with #
-#define beta 7
+%define beta 7
 
 %if 0%{?beta}
-%define pidginver %(echo "@VERSION@"|sed -e 's/dev//; s/beta.*//')
+%define pidginver %(echo "@VERSION@"|sed -e 's/dev.*//; s/beta.*//')
 %else
 %define pidginver @VERSION@
 %endif
@@ -237,24 +237,24 @@
 find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
 
 %if 0%{!?_with_howl:1} && 0%{!?_with_avahi:1}
-rm -f $RPM_BUILD_ROOT%{_libdir}/libpurple/libbonjour.so
+rm -f $RPM_BUILD_ROOT%{_libdir}/purple-2/libbonjour.so
 %endif
 
 %if 0%{!?_with_meanwhile:1}
-rm -f $RPM_BUILD_ROOT%{_libdir}/libpurple/libsametime.so
+rm -f $RPM_BUILD_ROOT%{_libdir}/purple-2/libsametime.so
 %endif
 
 %if 0%{!?_with_mono:1}
-rm -f $RPM_BUILD_ROOT%{_libdir}/libpurple/mono.so
-rm -f $RPM_BUILD_ROOT%{_libdir}/libpurple/*.dll
+rm -f $RPM_BUILD_ROOT%{_libdir}/purple-2/mono.so
+rm -f $RPM_BUILD_ROOT%{_libdir}/purple-2/*.dll
 %endif
 
 %if 0%{?_without_silc:1}
-rm -f $RPM_BUILD_ROOT%{_libdir}/libpurple/libsilcpurple.so
+rm -f $RPM_BUILD_ROOT%{_libdir}/purple-2/libsilcpurple.so
 %endif
 
 %if 0%{?_without_tcl:1}
-rm -f $RPM_BUILD_ROOT%{_libdir}/libpurple/tcl.so
+rm -f $RPM_BUILD_ROOT%{_libdir}/purple-2/tcl.so
 %endif
 
 %if 0%{?_without_text:1}
@@ -265,7 +265,7 @@
 
 %find_lang %{name}
 
-find $RPM_BUILD_ROOT%{_libdir}/libpurple -xtype f -print | \
+find $RPM_BUILD_ROOT%{_libdir}/purple-2 -xtype f -print | \
         sed "s@^$RPM_BUILD_ROOT@@g" | \
         grep -v /libbonjour.so | \
         grep -v /libsametime.so | \
@@ -334,8 +334,8 @@
 
 %dir %{_libdir}/pidgin
 %dir %{perl_vendorarch}/Purple
-%attr(755, root, root) %{perl_vendorarch}/Purple/*
-%attr(755, root, root) %{perl_vendorarch}/auto/Purple/GtkUI*
+%attr(755, root, root) %{perl_vendorarch}/Pidgin.pm
+%attr(755, root, root) %{perl_vendorarch}/auto/Pidgin
 
 %{_bindir}/pidgin
 %{_datadir}/pixmaps/pidgin
@@ -352,9 +352,7 @@
 %{_libdir}/libpurple.so.*
 %dir %{_libdir}/purple-2
 %attr(755, root, root) %{perl_vendorarch}/Purple.pm
-%dir %{perl_vendorarch}/auto/Purple
-%attr(755, root, root) %{perl_vendorarch}/auto/Purple/Purple.so
-%attr(755, root, root) %{perl_vendorarch}/auto/Purple/autosplit.ix
+%attr(755, root, root) %{perl_vendorarch}/auto/Purple
 
 %{_datadir}/pixmaps/purple
 
@@ -436,6 +434,9 @@
 %endif
 
 %changelog
+* Sun Apr 29 2007 Stu Tomlinson <stu@nosnilmot.com>
+- Update to reflect perl Purple::GtkUI -> Pidgin change
+
 * Wed Apr 25 2007 Stu Tomlinson <stu@nosnilmot.com>
 - Update libpurple to pick up plugins in %%{_libdir}/purple
 
--- a/pidgin/gtkconv.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/pidgin/gtkconv.c	Sun Apr 29 15:16:55 2007 +0000
@@ -2370,8 +2370,13 @@
 
 	gtkconv = PIDGIN_CONVERSATION(conv);
 	account = purple_conversation_get_account(conv);
-	if(account && account->gc)
+
+	if(account && account->gc) {
 		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
+	} else {
+		gtkconv->u.im->icon_timer = 0;
+		return FALSE;
+	}
 
 	gtkconv->auto_resize = TRUE;
 	g_idle_add(reset_auto_resize_cb, gtkconv);
--- a/pidgin/gtkdocklet.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/pidgin/gtkdocklet.c	Sun Apr 29 15:16:55 2007 +0000
@@ -118,6 +118,9 @@
 	DockletStatus newstatus = DOCKLET_STATUS_OFFLINE;
 	gboolean pending = FALSE, connecting = FALSE;
 
+	/* get the current savedstatus */
+	saved_status = purple_savedstatus_get_current();
+
 	/* determine if any ims have unseen messages */
 	convs = get_pending_list(DOCKLET_TOOLTIP_LINE_LIMIT);
 
@@ -168,7 +171,10 @@
 		g_list_free(convs);
 
 	} else if (ui_ops->set_tooltip) {
-		ui_ops->set_tooltip(PIDGIN_NAME);
+		char *tooltip_text = g_strconcat(PIDGIN_NAME " - ",
+			purple_savedstatus_get_title(saved_status), NULL);
+		ui_ops->set_tooltip(tooltip_text);
+		g_free(tooltip_text);
 	}
 
 	for(l = purple_accounts_get_all(); l != NULL; l = l->next) {
@@ -187,7 +193,6 @@
 			connecting = TRUE;
 	}
 
-	saved_status = purple_savedstatus_get_current();
 	prim = purple_savedstatus_get_type(saved_status);
 	if (pending)
 		newstatus = DOCKLET_STATUS_PENDING;
--- a/pidgin/gtkrequest.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/pidgin/gtkrequest.c	Sun Apr 29 15:16:55 2007 +0000
@@ -472,7 +472,9 @@
 
 	if (title != NULL)
 		gtk_window_set_title(GTK_WINDOW(dialog), title);
-
+#ifdef _WIN32
+		gtk_window_set_title(GTK_WINDOW(dialog), PIDGIN_ALERT_TITLE);
+#endif
 
 	gtk_dialog_add_button(GTK_DIALOG(dialog),
 			      text_to_stock(cancel_text), 0);
@@ -580,6 +582,9 @@
 
 	if (title != NULL)
 		gtk_window_set_title(GTK_WINDOW(dialog), title);
+#ifdef _WIN32
+		gtk_window_set_title(GTK_WINDOW(dialog), PIDGIN_ALERT_TITLE);
+#endif
 
 	for (i = 0; i < action_count; i++) {
 		gtk_dialog_add_button(GTK_DIALOG(dialog),
@@ -1068,6 +1073,9 @@
 
 	if (title != NULL)
 		gtk_window_set_title(GTK_WINDOW(win), title);
+#ifdef _WIN32
+		gtk_window_set_title(GTK_WINDOW(win), PIDGIN_ALERT_TITLE);
+#endif
 
 	gtk_window_set_role(GTK_WINDOW(win), "multifield");
 	gtk_container_set_border_width(GTK_CONTAINER(win), PIDGIN_HIG_BORDER);
@@ -1610,7 +1618,7 @@
 	data->cbs[0] = cancel_cb;
 	data->cbs[1] = ok_cb;
 	data->u.file.savedialog = FALSE;
-	
+
 #if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */
 	dirsel = gtk_file_chooser_dialog_new(
 						title ? title : _("Select Folder..."),
--- a/pidgin/gtksavedstatuses.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/pidgin/gtksavedstatuses.c	Sun Apr 29 15:16:55 2007 +0000
@@ -1677,7 +1677,7 @@
 	GList *sorted, *cur;
 	int i = 0;
 	int index = -1;
-	GdkPixbuf *pixbuf, *emblem;
+	GdkPixbuf *pixbuf;
 	GtkTreeIter iter;
 	GtkCellRenderer *text_rend;
 	GtkCellRenderer *icon_rend;
--- a/pidgin/gtkstatusbox.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/pidgin/gtkstatusbox.c	Sun Apr 29 15:16:55 2007 +0000
@@ -2071,7 +2071,9 @@
 pidgin_status_box_set_buddy_icon(PidginStatusBox *status_box, PurpleStoredImage *img)
 {
 	purple_imgstore_unref(status_box->buddy_icon_img);
-	status_box->buddy_icon_img = purple_imgstore_ref(img);
+	status_box->buddy_icon_img = img;
+	if (status_box->buddy_icon_img != NULL)
+		purple_imgstore_ref(status_box->buddy_icon_img);
 
 	pidgin_status_box_redisplay_buddy_icon(status_box);
 }
@@ -2225,7 +2227,8 @@
 							PurpleSavedStatusSub *sub = purple_savedstatus_get_substatus(ss, acct);
 							if (sub) {
 								const PurpleStatusType *sub_type = purple_savedstatus_substatus_get_type(sub);
-								if (!strcmp(purple_status_type_get_id(sub_type),
+								const char *subtype_status_id = purple_status_type_get_id(sub_type);
+								if (subtype_status_id && !strcmp(subtype_status_id,
 										purple_status_type_get_id(acct_status_type)))
 									found = TRUE;
 							}
--- a/pidgin/gtkutils.c	Sun Apr 29 15:14:29 2007 +0000
+++ b/pidgin/gtkutils.c	Sun Apr 29 15:16:55 2007 +0000
@@ -3070,7 +3070,6 @@
         for (i = 1; i < height - 1; i++) {
                 row = pixels + (i*rowstride);
                 if (row[3] != 0xff || row[rowstride-1] != 0xff) {
-                        printf("0: %d, last: %d\n", row[3], row[rowstride-1]);
                         return FALSE;
                 }
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/valgrind-suppressions	Sun Apr 29 15:16:55 2007 +0000
@@ -0,0 +1,154 @@
+{
+   X oddness 1
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:_XReply
+}
+{
+   NSS
+   Memcheck:Cond
+   obj:/usr/lib/libsoftokn3.so
+   obj:/usr/lib/libsoftokn3.so
+   obj:/usr/lib/libsoftokn3.so
+   obj:/usr/lib/libsoftokn3.so
+}
+{
+   X oddness 2
+   Memcheck:Param
+   writev(vector[...])
+   fun:writev
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:_X11TransWritev
+   fun:_XSend
+}
+{
+   X oddness 3
+   Memcheck:Cond
+   fun:XcursorImageHash
+   fun:XcursorNoticePutBitmap
+   fun:_XNoticePutBitmap
+   fun:XPutImage
+}
+{
+   X oddness 4
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:XFlush
+}
+{
+   X oddness 5
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:XDrawLine
+}
+{
+   X oddness 6
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:_XEventsQueued
+}
+{
+   File selector
+   Memcheck:Value4
+   fun:_itoa_word
+   fun:_IO_vfprintf_internal
+   fun:_IO_vsprintf_internal
+   fun:_IO_sprintf
+}
+{
+   File selector 2
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:XRenderComposite
+}
+{
+   TCL leak
+   Memcheck:Leak
+   fun:malloc
+   fun:TclpAlloc
+   fun:Tcl_Alloc
+   fun:Tcl_StaticPackage
+}
+{
+   FontConfig Maybe
+   Memcheck:Leak
+   fun:malloc
+   fun:FcStrCopy
+   fun:FcStrSetAdd
+   fun:FcLangSetCopy
+}
+{
+   File selector 3
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:_XFlushGCCache
+}
+{
+   File selector 4
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:XCreateGC
+}
+{
+   Something else
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:_XSetClipRectangles
+}
+{
+   New conversation windows
+   Memcheck:Cond
+   obj:/usr/lib/libgtk-x11-2.0.so.0.400.14
+   obj:/usr/lib/libgtk-x11-2.0.so.0.400.14
+   obj:/usr/lib/libgtk-x11-2.0.so.0.400.14
+   obj:/usr/lib/libgtk-x11-2.0.so.0.400.14
+}
+{
+   New conversation windows 2
+   Memcheck:Cond
+   obj:/usr/lib/libgtk-x11-2.0.so.0.400.14
+   obj:/usr/lib/libgtk-x11-2.0.so.0.400.14
+   obj:/usr/lib/libgtk-x11-2.0.so.0.400.14
+   obj:/usr/lib/libgobject-2.0.so.0.400.8
+}
+{
+   NSS Init
+   Memcheck:Leak
+   fun:malloc
+   fun:PR_Malloc
+   fun:PR_CreateStack
+   fun:_PR_InitFdCache
+   fun:_PR_InitIO
+   fun:_PR_ImplicitInitialization
+   fun:PR_Init
+   fun:rsa_nss_init
+   fun:GE_plugin_load
+   fun:gaim_plugin_load
+   fun:gaim_plugins_load_saved
+   fun:main
+}
+