changeset 27411:e3fd06032c4b

merge of '3012bdc54e5d2391c4fe52e687e87903ecbf44cc' and 'b4d9ebda1400b338079c89d5b6ac444b73755128'
author Etan Reisner <pidgin@unreliablesource.net>
date Thu, 18 Jun 2009 23:04:07 +0000
parents 77177e6000e4 (current diff) d3b6776186ce (diff)
children c24032f5bfd7
files ChangeLog.API
diffstat 27 files changed, 425 insertions(+), 228 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Thu Jun 18 23:01:51 2009 +0000
+++ b/COPYRIGHT	Thu Jun 18 23:04:07 2009 +0000
@@ -510,6 +510,7 @@
 Ma Xuan
 Jared Yanovich
 Timmy Yee
+Li Yuan
 Nickolai Zeldovich
 Tom Zickel
 Marco Ziech
--- a/ChangeLog	Thu Jun 18 23:01:51 2009 +0000
+++ b/ChangeLog	Thu Jun 18 23:04:07 2009 +0000
@@ -99,6 +99,7 @@
 	  collapse buddy groups or contacts. (Peter Ruibal)
 	* Support saving animated custom smileys as animated images or animated
 	  custom smileys. (Andrea Piccinelli)
+	* Support for keyboard navigation on the status icon. (Li Yuan)
 
 	Finch:
 	* The hardware cursor is updated correctly. This will be useful
--- a/ChangeLog.API	Thu Jun 18 23:01:51 2009 +0000
+++ b/ChangeLog.API	Thu Jun 18 23:04:07 2009 +0000
@@ -39,6 +39,7 @@
 		* purple_network_set_turn_server
 		* purple_network_get_stun_ip
 		* purple_network_get_turn_ip
+		* purple_network_remove_port_mapping
 		* purple_plugins_get_search_paths
 		* purple_proxy_connect_udp
 		* purple_prpl_get_media_caps
--- a/libpurple/connection.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/connection.c	Thu Jun 18 23:04:07 2009 +0000
@@ -309,7 +309,7 @@
 	g_free(gc->password);
 	g_free(gc->display_name);
 
-	if (gc->disconnect_timeout)
+	if (gc->disconnect_timeout > 0)
 		purple_timeout_remove(gc->disconnect_timeout);
 
 	PURPLE_DBUS_UNREGISTER_POINTER(gc);
@@ -515,11 +515,20 @@
 static gboolean
 purple_connection_disconnect_cb(gpointer data)
 {
-	PurpleAccount *account = data;
-	char *password = g_strdup(purple_account_get_password(account));
+	PurpleAccount *account;
+	PurpleConnection *gc;
+	char *password;
+
+	account = data;
+	gc = purple_account_get_connection(account);
+
+	gc->disconnect_timeout = 0;
+
+	password = g_strdup(purple_account_get_password(account));
 	purple_account_disconnect(account);
 	purple_account_set_password(account, password);
 	g_free(password);
+
 	return FALSE;
 }
 
@@ -564,7 +573,7 @@
 	}
 
 	/* If we've already got one error, we don't need any more */
-	if (gc->disconnect_timeout)
+	if (gc->disconnect_timeout > 0)
 		return;
 
 	gc->wants_to_die = purple_connection_error_is_fatal (reason);
--- a/libpurple/network.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/network.c	Thu Jun 18 23:04:07 2009 +0000
@@ -105,6 +105,10 @@
 static gchar *stun_ip = NULL;
 static gchar *turn_ip = NULL;
 
+/* Keep track of port mappings done with UPnP and NAT-PMP */
+static GHashTable *upnp_port_mappings = NULL;
+static GHashTable *nat_pmp_port_mappings = NULL;
+
 const unsigned char *
 purple_network_ip_atoi(const char *ip)
 {
@@ -257,6 +261,15 @@
 		return;
 	}
 
+	if (success) {
+		/* add port mapping to hash table */
+		gint *key = g_new(gint, 1);
+		gint *value = g_new(gint, 1);
+		*key = purple_network_get_port_from_fd(listen_data->listenfd);
+		*value = listen_data->socket_type;
+		g_hash_table_insert(upnp_port_mappings, key, value);
+	}
+
 	if (listen_data->cb)
 		listen_data->cb(listen_data->listenfd, listen_data->cb_data);
 
@@ -270,9 +283,16 @@
 purple_network_finish_pmp_map_cb(gpointer data)
 {
 	PurpleNetworkListenData *listen_data;
+	gint *key = g_new(gint, 1);
+	gint *value = g_new(gint, 1);
 
 	listen_data = data;
 
+	/* add port mapping to hash table */
+	*key = purple_network_get_port_from_fd(listen_data->listenfd);
+	*value = listen_data->socket_type;
+	g_hash_table_insert(nat_pmp_port_mappings, key, value);
+
 	if (listen_data->cb)
 		listen_data->cb(listen_data->listenfd, listen_data->cb_data);
 
@@ -892,6 +912,61 @@
 	return &handle;
 }
 
+static void
+purple_network_upnp_mapping_remove_cb(gboolean sucess, gpointer data)
+{
+	purple_debug_info("network", "done removing UPnP port mapping\n");
+}
+
+/* the reason for these functions to have these signatures is to be able to
+ use them for g_hash_table_foreach to clean remaining port mappings, which is
+ not yet done */
+static void
+purple_network_upnp_mapping_remove(gpointer key, gpointer value,
+	gpointer user_data)
+{
+	gint port = (gint) *((gint *) key);
+	gint protocol = (gint) *((gint *) value);
+	purple_debug_info("network", "removing UPnP port mapping for port %d\n",
+		port);
+	purple_upnp_remove_port_mapping(port, 
+		protocol == SOCK_STREAM ? "TCP" : "UDP", 
+		purple_network_upnp_mapping_remove_cb, NULL);
+	g_hash_table_remove(upnp_port_mappings, key);
+}
+
+static void
+purple_network_nat_pmp_mapping_remove(gpointer key, gpointer value,
+	gpointer user_data)
+{
+	gint port = (gint) *((gint *) key);
+	gint protocol = (gint) *((gint *) value);
+	purple_debug_info("network", "removing NAT-PMP port mapping for port %d\n",
+		port);
+	purple_pmp_destroy_map(
+		protocol == SOCK_STREAM ? PURPLE_PMP_TYPE_TCP : PURPLE_PMP_TYPE_UDP, 
+		port);
+	g_hash_table_remove(nat_pmp_port_mappings, key);
+}
+
+void
+purple_network_remove_port_mapping(gint fd)
+{
+	int port = purple_network_get_port_from_fd(fd);
+	gint *protocol = g_hash_table_lookup(upnp_port_mappings, &port);
+
+	if (protocol) {
+		purple_network_upnp_mapping_remove(&port, protocol, NULL);
+		g_hash_table_remove(upnp_port_mappings, protocol);
+	} else {
+		protocol = g_hash_table_lookup(nat_pmp_port_mappings, &port);
+		if (protocol) {
+			purple_network_nat_pmp_mapping_remove(&port, protocol, NULL);
+			g_hash_table_remove(nat_pmp_port_mappings, protocol);
+		}
+	}
+}
+	
 void
 purple_network_init(void)
 {
@@ -964,8 +1039,15 @@
 		purple_prefs_get_string("/purple/network/stun_server"));
 	purple_network_set_turn_server(
 		purple_prefs_get_string("/purple/network/turn_server"));
+
+	upnp_port_mappings = 
+		g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free);
+	nat_pmp_port_mappings =
+		g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_free);
 }
 
+
+
 void
 purple_network_uninit(void)
 {
@@ -1008,4 +1090,10 @@
 	
 	if (stun_ip)
 		g_free(stun_ip);
+
+	g_hash_table_destroy(upnp_port_mappings);
+	g_hash_table_destroy(nat_pmp_port_mappings);
+
+	/* TODO: clean up remaining port mappings, note calling 
+	 purple_upnp_remove_port_mapping from here doesn't quite work... */
 }
--- a/libpurple/network.h	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/network.h	Thu Jun 18 23:04:07 2009 +0000
@@ -259,7 +259,14 @@
  */
 const gchar *purple_network_get_turn_ip(void);
 		
-	
+/**
+ * Remove a port mapping (UPnP or NAT-PMP) associated with listening socket
+ *
+ * @param fd Socket to remove the port mapping for
+ * @since 2.6.0
+ */
+void purple_network_remove_port_mapping(gint fd);	
+
 /**
  * Initializes the network subsystem.
  */
--- a/libpurple/plugins/ssl/ssl-gnutls.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/plugins/ssl/ssl-gnutls.c	Thu Jun 18 23:04:07 2009 +0000
@@ -576,7 +576,6 @@
 							  out_buf, out_size);
 
 	g_free(out_buf);
-	g_return_val_if_fail(success, FALSE);
 	return success;
 }
 
--- a/libpurple/protocols/jabber/jabber.h	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.h	Thu Jun 18 23:04:07 2009 +0000
@@ -325,8 +325,8 @@
 void jabber_add_feature(const gchar *namespace, JabberFeatureEnabled cb); /* cb may be NULL */
 void jabber_remove_feature(const gchar *namespace);
 
-/** Adds an identitiy to this jabber library instance. For list of valid values vistit the
- *	webiste of the XMPP Registrar ( http://www.xmpp.org/registrar/disco-categories.html#client ).
+/** Adds an identity to this jabber library instance. For list of valid values visit the
+ *	website of the XMPP Registrar ( http://www.xmpp.org/registrar/disco-categories.html#client ).
  *  @param category the category of the identity.
  *  @param type the type of the identity.
  *  @param language the language localization of the name. Can be NULL.
--- a/libpurple/protocols/jabber/si.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/jabber/si.c	Thu Jun 18 23:04:07 2009 +0000
@@ -1321,6 +1321,11 @@
 			jabber_iq_remove_callback_by_id(js, jsx->iq_id);
 		if (jsx->local_streamhost_fd >= 0)
 			close(jsx->local_streamhost_fd);
+		if (purple_xfer_get_type(xfer) == PURPLE_XFER_SEND &&
+			xfer->fd >= 0) {
+			purple_debug_info("jabber", "remove port mapping\n");
+			purple_network_remove_port_mapping(xfer->fd);
+		}
 		if (jsx->connect_timeout > 0)
 			purple_timeout_remove(jsx->connect_timeout);
 		if (jsx->ibb_timeout_handle > 0)
--- a/libpurple/protocols/msn/notification.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/msn/notification.c	Thu Jun 18 23:04:07 2009 +0000
@@ -327,14 +327,13 @@
 	/* NOTE: cmd is not always cmdproc->last_cmd, sometimes cmd is a queued
 	 * command and we are processing it */
 	if (cmd->payload == NULL) {
-		cmdproc->last_cmd->payload_cb  = msg_cmd_post;
+		cmdproc->last_cmd->payload_cb = msg_cmd_post;
 		cmd->payload_len = atoi(cmd->params[2]);
-
 	} else {
 		g_return_if_fail(cmd->payload_cb != NULL);
 
 #if 0 /* glib on win32 doesn't correctly support precision modifiers for a string */
-		purple_debug_info("msn", "MSG payload:{%.*s}\n", cmd->payload_len, cmd->payload);
+		purple_debug_info("msn", "MSG payload:{%.*s}\n", (guint)cmd->payload_len, cmd->payload);
 #endif
 		cmd->payload_cb(cmdproc, cmd, cmd->payload, cmd->payload_len);
 	}
--- a/libpurple/protocols/oscar/family_auth.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/oscar/family_auth.c	Thu Jun 18 23:04:07 2009 +0000
@@ -129,6 +129,8 @@
 	GSList *tlvlist = NULL;
 	int passwdlen;
 	guint8 *password_encoded;
+	const char *clientstring;
+	guint32 distrib;
 
 	passwdlen = strlen(password);
 	password_encoded = (guint8 *)g_malloc(passwdlen+1);
@@ -139,18 +141,25 @@
 
 	aim_encode_password(password, password_encoded);
 
+	clientstring = purple_prefs_get_string("/plugins/prpl/oscar/clientstring");
+	if (clientstring == NULL)
+		clientstring = ci->clientstring;
+	distrib = purple_prefs_get_int("/plugins/prpl/oscar/distid");
+	if ((gint32)distrib == -1)
+		distrib = ci->distrib;
+
 	byte_stream_put32(&frame->data, 0x00000001); /* FLAP Version */
 	aim_tlvlist_add_str(&tlvlist, 0x0001, sn);
 	aim_tlvlist_add_raw(&tlvlist, 0x0002, passwdlen, password_encoded);
 
-	if (ci->clientstring)
-		aim_tlvlist_add_str(&tlvlist, 0x0003, ci->clientstring);
+	if (clientstring)
+		aim_tlvlist_add_str(&tlvlist, 0x0003, clientstring);
 	aim_tlvlist_add_16(&tlvlist, 0x0016, (guint16)ci->clientid);
 	aim_tlvlist_add_16(&tlvlist, 0x0017, (guint16)ci->major);
 	aim_tlvlist_add_16(&tlvlist, 0x0018, (guint16)ci->minor);
 	aim_tlvlist_add_16(&tlvlist, 0x0019, (guint16)ci->point);
 	aim_tlvlist_add_16(&tlvlist, 0x001a, (guint16)ci->build);
-	aim_tlvlist_add_32(&tlvlist, 0x0014, (guint32)ci->distrib); /* distribution chan */
+	aim_tlvlist_add_32(&tlvlist, 0x0014, distrib); /* distribution chan */
 	aim_tlvlist_add_str(&tlvlist, 0x000f, ci->lang);
 	aim_tlvlist_add_str(&tlvlist, 0x000e, ci->country);
 
@@ -210,6 +219,8 @@
 	guint8 digest[16];
 	aim_snacid_t snacid;
 	size_t password_len;
+	const char *clientstring;
+	guint32 distrib;
 
 	if (!ci || !sn || !password)
 		return -EINVAL;
@@ -236,20 +247,27 @@
 
 	aim_encode_password_md5(password, password_len, key, digest);
 
+	clientstring = purple_prefs_get_string("/plugins/prpl/oscar/clientstring");
+	if (clientstring == NULL)
+		clientstring = ci->clientstring;
+	distrib = purple_prefs_get_int("/plugins/prpl/oscar/distid");
+	if ((gint32)distrib == -1)
+		distrib = ci->distrib;
+
 	aim_tlvlist_add_raw(&tlvlist, 0x0025, 16, digest);
 
 #ifndef USE_OLD_MD5
 	aim_tlvlist_add_noval(&tlvlist, 0x004c);
 #endif
 
-	if (ci->clientstring)
-		aim_tlvlist_add_str(&tlvlist, 0x0003, ci->clientstring);
+	if (clientstring)
+		aim_tlvlist_add_str(&tlvlist, 0x0003, clientstring);
 	aim_tlvlist_add_16(&tlvlist, 0x0016, (guint16)ci->clientid);
 	aim_tlvlist_add_16(&tlvlist, 0x0017, (guint16)ci->major);
 	aim_tlvlist_add_16(&tlvlist, 0x0018, (guint16)ci->minor);
 	aim_tlvlist_add_16(&tlvlist, 0x0019, (guint16)ci->point);
 	aim_tlvlist_add_16(&tlvlist, 0x001a, (guint16)ci->build);
-	aim_tlvlist_add_32(&tlvlist, 0x0014, (guint32)ci->distrib);
+	aim_tlvlist_add_32(&tlvlist, 0x0014, distrib);
 	aim_tlvlist_add_str(&tlvlist, 0x000f, ci->lang);
 	aim_tlvlist_add_str(&tlvlist, 0x000e, ci->country);
 
--- a/libpurple/protocols/oscar/oscar.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Thu Jun 18 23:04:07 2009 +0000
@@ -7022,6 +7022,16 @@
 	/* Preferences */
 	purple_prefs_add_none("/plugins/prpl/oscar");
 	purple_prefs_add_bool("/plugins/prpl/oscar/recent_buddies", FALSE);
+
+	/*
+	 * These two preferences will normally not be changed.  UIs can optionally
+	 * use them to override these two version fields which are sent to the
+	 * server when logging in.  AOL requested this change to allow clients to
+	 * use custom values.
+	 */
+	purple_prefs_add_string("/plugins/prpl/oscar/clientstring", NULL);
+	purple_prefs_add_int("/plugins/prpl/oscar/distid", -1);
+
 	purple_prefs_remove("/plugins/prpl/oscar/show_idle");
 	purple_prefs_remove("/plugins/prpl/oscar/always_use_rv_proxy");
 
--- a/libpurple/protocols/yahoo/util.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/util.c	Thu Jun 18 23:04:07 2009 +0000
@@ -22,7 +22,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include "debug.h"
 #include "internal.h"
@@ -42,7 +42,7 @@
 /*
  * Returns cookies formatted as a null terminated string for the given connection.
  * Must g_free return value.
- * 
+ *
  * TODO:will work, but must test for strict correctness
  */
 gchar* yahoo_get_cookies(PurpleConnection *gc)
@@ -191,7 +191,7 @@
 /*
  * I found these on some website but i don't know that they actually
  * work (or are supposed to work). I didn't implement them yet.
- * 
+ *
      * [0;30m ---black
      * [1;37m ---white
      * [0;37m ---tan
--- a/libpurple/protocols/yahoo/yahoo.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Thu Jun 18 23:04:07 2009 +0000
@@ -64,7 +64,7 @@
 static void yahoo_add_buddy(PurpleConnection *gc, PurpleBuddy *, PurpleGroup *);
 #ifdef TRY_WEBMESSENGER_LOGIN
 static void yahoo_login_page_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *url_text, size_t len, const gchar *error_message);
-#endif
+#endif /* TRY_WEBMESSENGER_LOGIN */
 static void yahoo_set_status(PurpleAccount *account, PurpleStatus *status);
 
 static void yahoo_update_status(PurpleConnection *gc, const char *name, YahooFriend *f)
@@ -523,7 +523,7 @@
 					purple_debug_info("yahoo", "%s adding %s to the deny list because of the ignore list / no group was found\n",account->username, norm_bud);
 					purple_privacy_deny_add(account, norm_bud, 1);
 				}
-			
+
 				protocol = 0;
 				stealth = 0;
 				norm_bud = NULL;
@@ -554,7 +554,7 @@
 	}
 
 	g_hash_table_foreach(ht, yahoo_do_group_cleanup, NULL);
-	
+
 	/* Now that we have processed the buddy list, we can say yahoo has connected */
 	purple_connection_set_display_name(gc, purple_normalize(account, purple_account_get_username(account)));
 	purple_connection_set_state(gc, PURPLE_CONNECTED);
@@ -824,8 +824,8 @@
 	struct yahoo_data *yd;
 	char *server_msg = NULL;
 	char *m;
-	
-	yd = gc->proto_data;	
+
+	yd = gc->proto_data;
 	account = purple_connection_get_account(gc);
 
 	while (l != NULL) {
@@ -858,7 +858,7 @@
 		}
 		else
 			purple_notify_error(gc, NULL, _("Your SMS was not delivered"), NULL);
-		
+
 		g_free(sms->from);
 		g_free(sms);
 		return ;
@@ -871,7 +871,7 @@
 
 	m = yahoo_string_decode(gc, sms->msg, sms->utf8);
 	serv_got_im(gc, sms->from, m, 0, sms->time);
-		
+
 	g_free(m);
 	g_free(sms->from);
 	g_free(sms);
@@ -1024,7 +1024,7 @@
 				username = g_markup_escape_text(msn_from, -1);
 			else
 				username = g_markup_escape_text(im->from, -1);
-			
+
 			purple_prpl_got_attention(gc, username, YAHOO_BUZZ);
 			g_free(username);
 			g_free(m);
@@ -1043,7 +1043,7 @@
 
 		g_free(m2);
 
-		/* laters : implement buddy icon for msn friends */ 
+		/* laters : implement buddy icon for msn friends */
 		if(!msn) {
 			if ((f = yahoo_friend_find(gc, im->from)) && im->buddy_icon == 2) {
 				if (yahoo_friend_get_buddy_icon_need_request(f)) {
@@ -1625,7 +1625,7 @@
 		purple_debug_error("yahoo", "Login Failed, unable to retrieve stage 2 url: %s\n", error_message);
 		purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, error_message);
 		g_free(auth_data->seed);
-		g_free(auth_data);	
+		g_free(auth_data);
 		return;
 	}
 	else if (len > 0 && ret_data && *ret_data) {
@@ -1972,7 +1972,7 @@
 {
 #ifdef TRY_WEBMESSENGER_LOGIN
 	struct yahoo_data *yd = gc->proto_data;
-#endif
+#endif /* TRY_WEBMESSENGER_LOGIN */
 	GSList *l = pkt->hash;
 	int err = 0;
 	char *msg;
@@ -2016,7 +2016,7 @@
 				yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
 			return;
 		}
-#endif
+#endif /* TRY_WEBMESSENGER_LOGIN */
 		if (!purple_account_get_remember_password(account))
 			purple_account_set_password(account, NULL);
 
@@ -2082,7 +2082,7 @@
 		return;
 	if (!group)
 		group = "";
-	
+
 	if(msn)
 		who = g_strconcat("msn/", temp, NULL);
 	else
@@ -2123,7 +2123,7 @@
 {
 	size_t pkt_len;
 	guchar *raw_packet;
-	
+
 	/*build the raw packet and send it to the host*/
 	pkt_len = yahoo_packet_build(pkt, 0, 0, 0, &raw_packet);
 	if(write(source, raw_packet, pkt_len) != pkt_len)
@@ -2302,7 +2302,7 @@
 			yahoo_p2p_disconnect_destroy_data(data);
 		return;
 	}
-	
+
 	if(len < YAHOO_PACKET_HDRLEN)
 		return;
 
@@ -2442,7 +2442,7 @@
 void yahoo_send_p2p_pkt(PurpleConnection *gc, const char *who, int val_13)
 {
 	const char *public_ip;
-	guint32 temp[4];	
+	guint32 temp[4];
 	guint32 ip;
 	char temp_str[100];
 	gchar *base64_ip = NULL;
@@ -2463,7 +2463,7 @@
 	if( strcmp(purple_normalize(account, purple_account_get_username(account)), who) == 0)
 		return;
 
-	/* send packet to only those friends who arent p2p connected and to whom we havent already sent. Do not send if this condition doesn't hold good */ 
+	/* send packet to only those friends who arent p2p connected and to whom we havent already sent. Do not send if this condition doesn't hold good */
 	if( !( f && (yahoo_friend_get_p2p_status(f) == YAHOO_P2PSTATUS_NOT_CONNECTED) && (f->p2p_packet_sent == 0)) )
 		return;
 
@@ -2526,7 +2526,7 @@
 	if(error_message != NULL) {
 		purple_debug_warning("yahoo","p2p: %s\n",error_message);
 		yahoo_send_p2p_pkt(p2p_data->gc, p2p_data->host_username, 2);/* send p2p init packet with val_13=2 */
-		
+
 		yahoo_p2p_disconnect_destroy_data(p2p_data);
 		return;
 	}
@@ -3291,7 +3291,7 @@
 
 	purple_cipher_context_destroy(context);
 }
-#endif
+#endif /* TRY_WEBMESSENGER_LOGIN */
 
 static void yahoo_server_check(PurpleAccount *account)
 {
@@ -3898,7 +3898,7 @@
 	struct yahoo_data *yd = gc->proto_data;
 
 	g_return_if_fail(PURPLE_CONNECTION_IS_VALID(gc));
-	
+
 	yd->url_datas = g_slist_remove(yd->url_datas, url_data);
 
 	if (error_message != NULL)
@@ -4039,7 +4039,7 @@
 		xmlnode *validate_data_root = xmlnode_from_str(webdata, -1);
 		xmlnode *validate_data_child = xmlnode_get_child(validate_data_root, "mobile_no");
 		mobile_no = (char *)xmlnode_get_attrib(validate_data_child, "msisdn");
-		
+
 		validate_data_root = xmlnode_copy(validate_data_child);
 		validate_data_child = xmlnode_get_child(validate_data_root, "status");
 		status = xmlnode_get_data(validate_data_child);
@@ -4142,7 +4142,7 @@
 	struct yahoo_p2p_data *p2p_data;
 	gboolean msn = FALSE;
 	msg2 = yahoo_string_encode(gc, msg, &utf8);
-	
+
 	if(msg2) {
 		lenb = strlen(msg2);
 		lenc = g_utf8_strlen(msg2, -1);
@@ -4172,13 +4172,11 @@
 			struct yahoo_sms_carrier_cb_data *sms_cb_data;
 			sms_cb_data = g_malloc(sizeof(struct yahoo_sms_carrier_cb_data));
 			sms_cb_data->gc = gc;
-			sms_cb_data->who = g_malloc(strlen(who));
-			sms_cb_data->what = g_malloc(strlen(what));
-			strcpy(sms_cb_data->who, who);
-			strcpy(sms_cb_data->what, what);
+			sms_cb_data->who = g_strdup(who);
+			sms_cb_data->what = g_strdup(what);
 
 			purple_conversation_write(conv, NULL, "Getting mobile carrier to send the sms", PURPLE_MESSAGE_SYSTEM, time(NULL));
-			
+
 			yahoo_get_sms_carrier(gc, sms_cb_data);
 
 			g_free(msg);
@@ -4297,7 +4295,7 @@
 	if( (p2p_data = g_hash_table_lookup(yd->peers, who)) && !msn ) {
 		yahoo_packet_hash(pkt, "sssssis", 49, "TYPING", 1, purple_connection_get_display_name(gc),
 	                  14, " ", 13, state == PURPLE_TYPING ? "1" : "0",
-	                  5, who, 11, p2p_data->session_id, 1002, "1");	/* To-do: key 15 to be sent in case of p2p */	
+	                  5, who, 11, p2p_data->session_id, 1002, "1");	/* To-do: key 15 to be sent in case of p2p */
 		yahoo_p2p_write_pkt(p2p_data->source, pkt);
 		yahoo_packet_free(pkt);
 	}
--- a/libpurple/protocols/yahoo/yahoo.h	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo.h	Thu Jun 18 23:04:07 2009 +0000
@@ -53,7 +53,7 @@
 #define YAHOOJP_XFER_HOST "filetransfer.msg.yahoo.co.jp"
 #define YAHOOJP_WEBCAM_HOST "wc.yahoo.co.jp"
 /* not sure, must test: */
-#define YAHOOJP_XFER_RELAY_HOST "relay.msg.yahoo.co.jp" 
+#define YAHOOJP_XFER_RELAY_HOST "relay.msg.yahoo.co.jp"
 #define YAHOOJP_XFER_RELAY_PORT 80
 #define YAHOOJP_ROOMLIST_URL "http://insider.msg.yahoo.co.jp/ycontent/"
 #define YAHOOJP_ROOMLIST_LOCALE "ja"
@@ -201,7 +201,7 @@
 	GSList *url_datas;
 	GHashTable *xfer_peer_idstring_map;/* Hey, i dont know, but putting this HashTable next to friends gives a run time fault... */
 	GSList *cookies;/* contains all cookies, including _y and _t */
-	
+
 	/**
 	 * We may receive a list15 in multiple packets with no prior warning as to how many we'll be getting;
 	 * the server expects us to keep track of the group for which it is sending us contact names.
--- a/libpurple/protocols/yahoo/yahoo_aliases.h	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_aliases.h	Thu Jun 18 23:04:07 2009 +0000
@@ -1,38 +1,38 @@
-/*
- * purple
- *
- * 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.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * 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 "account.h"
-#include "accountopt.h"
-#include "blist.h"
-#include "debug.h"
-#include "util.h"
-#include "version.h"
-#include "yahoo.h"
-#include "yahoo_packet.h"
-
-void yahoo_update_alias(PurpleConnection *gc, const char *who, const char *alias);
-void yahoo_fetch_aliases(PurpleConnection *gc);
-
+/*
+ * purple
+ *
+ * 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.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * 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 "account.h"
+#include "accountopt.h"
+#include "blist.h"
+#include "debug.h"
+#include "util.h"
+#include "version.h"
+#include "yahoo.h"
+#include "yahoo_packet.h"
+
+void yahoo_update_alias(PurpleConnection *gc, const char *who, const char *alias);
+void yahoo_fetch_aliases(PurpleConnection *gc);
+
--- a/libpurple/protocols/yahoo/yahoo_filexfer.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_filexfer.c	Thu Jun 18 23:04:07 2009 +0000
@@ -380,12 +380,12 @@
 			28,  xfer->size,
 			301, 268,
 			303, 268);
-		g_free(filename); 
+		g_free(filename);
 	} else {
 		if(xfer_data->firstoflist == TRUE) {
 			pkt = yahoo_packet_new(YAHOO_SERVICE_FILETRANS_15,
 				YAHOO_STATUS_AVAILABLE, yd->session_id);
-	
+
 			yahoo_packet_hash(pkt, "sssi",
 				1, purple_normalize(account, purple_account_get_username(account)),
 				5, xfer->who,
@@ -394,7 +394,7 @@
 		} else {
 			pkt = yahoo_packet_new(YAHOO_SERVICE_FILETRANS_ACC_15,
 				YAHOO_STATUS_AVAILABLE, yd->session_id);
-	
+
 			yahoo_packet_hash(pkt, "sssi",
 				1, purple_normalize(account, purple_account_get_username(account)),
 				5, xfer->who,
@@ -623,7 +623,7 @@
 	else if (written <= 0)
 		purple_debug_info("yahoo", "p2p filetransfer: Unable to write HTTP OK");
 
-	/* close connection */	
+	/* close connection */
 	close(xfer->fd);
 	xfer->fd = -1;
 	g_free(tx);
@@ -644,14 +644,14 @@
 		/* Send HTTP OK in case of p2p transfer, when we act as server */
 		if((xfer_data->xfer_url != NULL) && (xfer_old->fd >=0) && (purple_xfer_get_status(xfer_old) == PURPLE_XFER_STATUS_DONE))
 			yahoo_p2p_ft_server_send_OK(xfer_old);
-		
+
 		/* removing top of filename & size list completely */
 		g_free( xfer_data->filename_list->data );
 		g_free( xfer_data->size_list->data );
-		   
+
 		xfer_data->filename_list->data = NULL;
 		xfer_data->size_list->data = NULL;
-		   
+
 		xfer_data->filename_list = g_slist_delete_link(xfer_data->filename_list, xfer_data->filename_list);
 		xfer_data->size_list = g_slist_delete_link(xfer_data->size_list, xfer_data->size_list);
 
@@ -697,16 +697,16 @@
 			/* Build the file transfer handle. */
 			xfer = purple_xfer_new(gc->account, PURPLE_XFER_RECEIVE, xfer_old->who);
 
-			
+
 			if (xfer) {
 				/* Set the info about the incoming file. */
 				char *utf8_filename = yahoo_string_decode(gc, filename, TRUE);
 				purple_xfer_set_filename(xfer, utf8_filename);
 				g_free(utf8_filename);
 				purple_xfer_set_size(xfer, filesize);
-		
+
 				xfer->data = xfer_data;
-	
+
 				/* Setup our I/O op functions */
 				purple_xfer_set_init_fnc(xfer,        yahoo_xfer_init_15);
 				purple_xfer_set_start_fnc(xfer,       yahoo_xfer_start);
@@ -1003,7 +1003,7 @@
 		purple_xfer_cancel_remote(xfer);
 		return;
 	}
-	
+
 	/* Discard the length... */
 	hosts = g_slist_remove(hosts, hosts->data);
 	if(!hosts)
@@ -1012,7 +1012,7 @@
 		purple_xfer_cancel_remote(xfer);
 		return;
 	}
-	
+
 	/* TODO:actually, u must try with addr no.1 , if its not working addr no.2 ..... */
 	addr = hosts->data;
 	actaddr = addr->sin_addr.s_addr;
@@ -1113,7 +1113,7 @@
 	while((did = read(source, buf, 998)) > 0)
 	{
 		xd->txbuflen += did;
-		buf[did] = '\0';  
+		buf[did] = '\0';
 		t = xd->txbuf;
 		xd->txbuf = g_strconcat(t,buf,NULL);
 		g_free(t);
@@ -1276,7 +1276,7 @@
 				}
 		}
 		else if(purple_xfer_get_type(xfer) == PURPLE_XFER_RECEIVE && xd->status_15 == STARTED)
-		{	
+		{
 			if(xd->info_val_249 == 1)
 				{
 				/* receiving file via p2p, connected as client */
@@ -1592,7 +1592,7 @@
 	GSList *filename_list = NULL;
 	GSList *size_list = NULL;
 	int nooffiles = 0;
-	
+
 	yd = gc->proto_data;
 
 	for (l = pkt->hash; l; l = l->next) {
@@ -1617,7 +1617,7 @@
 			break;
 		case 222:
 			val_222 = atol(pair->value);
-			/* 1=send, 2=cancel, 3=accept, 4=reject */ 
+			/* 1=send, 2=cancel, 3=accept, 4=reject */
 			break;
 
 		/* check for p2p and imviron .... not sure it comes by this service packet. Since it was bundled with filexfer in old ymsg version, still keeping it. */
@@ -1655,7 +1655,7 @@
 		*	so, purple dnsquery is used... but retries, trying with next ip
 		*	address etc. is not implemented..TODO
 		*/
-		
+
 		/* To send through p2p */
 		if( g_hash_table_lookup(yd->peers, from) )	{
 			/* send p2p file transfer information */
@@ -1685,7 +1685,7 @@
 		g_hash_table_replace(yd->imvironments, g_strdup(from), g_strdup(imv));
 		return;
 	}
-	
+
 	if (pkt->service == YAHOO_SERVICE_P2PFILEXFER) {
 		if (service && (strcmp("FILEXFER", service) != 0)) {
 			purple_debug_misc("yahoo", "unhandled service 0x%02x\n", pkt->service);
@@ -1710,7 +1710,7 @@
 	xfer_data->xfer_peer_idstring = g_strdup(xfer_peer_idstring);
 	xfer_data->filename_list = filename_list;
 	xfer_data->size_list = size_list;
-	
+
 	/* Build the file transfer handle. */
 	xfer = purple_xfer_new(gc->account, PURPLE_XFER_RECEIVE, from);
 	xfer->message = NULL;
@@ -1739,7 +1739,7 @@
 		g_hash_table_insert(yd->xfer_peer_idstring_map,
 							xfer_data->xfer_peer_idstring,
 							xfer);
-		
+
 		if(nooffiles > 1) {
 			gchar* message;
 			message = g_strdup_printf(_("%s is trying to send you a group of %d files.\n"), xfer->who, nooffiles);
@@ -1825,7 +1825,7 @@
 			purple_xfer_cancel_remote(xfer);
 			return;
 		}
-		
+
 		account = purple_connection_get_account(xfer_data->gc);
 
 		pkt_to_send = yahoo_packet_new(YAHOO_SERVICE_FILETRANS_ACC_15,
@@ -1916,7 +1916,7 @@
 	xfer_data = xfer->data;
 	if(url)
 		purple_url_parse(url, &(xfer_data->host), &(xfer_data->port), &(xfer_data->path), NULL, NULL);
-		
+
 	xfer_data->xfer_idstring_for_relay = g_strdup(xfer_idstring_for_relay);
 	xfer_data->status_15 = ACCEPTED;
 	account = purple_connection_get_account(gc);
--- a/libpurple/protocols/yahoo/yahoo_packet.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_packet.c	Thu Jun 18 23:04:07 2009 +0000
@@ -195,7 +195,7 @@
 						   "Key: %d  \tValue: %s\n", pair->key, esc);
 				g_free(esc);
 			}
-#endif
+#endif /* DEBUG */
 		} else {
 			g_free(pair);
 		}
@@ -282,7 +282,7 @@
 	}
 
 	purple_debug(PURPLE_DEBUG_MISC, NULL, "\n");
-#endif
+#endif /* YAHOO_DEBUG */
 }
 
 static void
@@ -329,7 +329,7 @@
 	if (wm)
 		pos += yahoo_put16(data + pos, YAHOO_WEBMESSENGER_PROTO_VER);
 	else if (jp)
-		pos += yahoo_put16(data + pos, YAHOO_PROTO_VER_JAPAN);		
+		pos += yahoo_put16(data + pos, YAHOO_PROTO_VER_JAPAN);
 	else
 		pos += yahoo_put16(data + pos, YAHOO_PROTO_VER);
 	pos += yahoo_put16(data + pos, 0x0000);
--- a/libpurple/protocols/yahoo/yahoo_picture.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_picture.c	Thu Jun 18 23:04:07 2009 +0000
@@ -126,7 +126,7 @@
 		gboolean use_whole_url = yahoo_account_use_http_proxy(gc);
 
 		/* FIXME: Cleanup this strtol() stuff if possible. */
-		if (b && (locksum = purple_buddy_icons_get_checksum_for_user(b)) != NULL && 
+		if (b && (locksum = purple_buddy_icons_get_checksum_for_user(b)) != NULL &&
 				(checksum == strtol(locksum, NULL, 10)))
 			return;
 
@@ -506,7 +506,7 @@
 		"Content-Length: %" G_GSIZE_FORMAT "\r\n"
 		"Cache-Control: no-cache\r\n\r\n",
 		use_whole_url ? "http://" : "", use_whole_url ? tmp : "",
-		yd->cookie_t, yd->cookie_y, 
+		yd->cookie_t, yd->cookie_y,
 		tmp,
 		pkt_buf_len + 4 + d->str->len);
 	g_free(tmp);
@@ -573,7 +573,7 @@
 	purple_debug_misc("yahoo", "Calculated buddy icon checksum: %d\n", checksum);
 
 	return checksum;
-} 
+}
 
 void yahoo_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img)
 {
--- a/libpurple/protocols/yahoo/yahoo_profile.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo_profile.c	Thu Jun 18 23:04:07 2009 +0000
@@ -29,7 +29,7 @@
 #include "util.h"
 #if PHOTO_SUPPORT
 #include "imgstore.h"
-#endif
+#endif /* PHOTO_SUPPORT */
 
 #include "yahoo.h"
 #include "yahoo_friend.h"
@@ -40,11 +40,11 @@
 } YahooGetInfoData;
 
 typedef enum profile_lang_id {
-	XX, DA, DE, EL, 
-	EN, EN_GB, 
+	XX, DA, DE, EL,
+	EN, EN_GB,
 	ES_AR, ES_ES, ES_MX, ES_US,
-	FR_CA, FR_FR, 
-	IT, JA, KO, NO, PT, SV, 
+	FR_CA, FR_FR,
+	IT, JA, KO, NO, PT, SV,
 	ZH_CN, ZH_HK, ZH_TW, ZH_US, PT_BR
 } profile_lang_id_t;
 
@@ -702,7 +702,7 @@
 		const char *balias = purple_buddy_get_local_buddy_alias(b);
 		if(balias && balias[0]) {
 			char *aliastext = g_markup_escape_text(balias, -1);
-			purple_notify_user_info_add_pair(user_info, _("Alias"), aliastext); 
+			purple_notify_user_info_add_pair(user_info, _("Alias"), aliastext);
 			g_free(aliastext);
 		}
 		#if 0
@@ -777,7 +777,7 @@
 	char *stripped;
 	int stripped_len;
 	char *last_updated_utf8_string = NULL;
-#endif
+#endif /* !PHOTO_SUPPORT */
 	const char *last_updated_string = NULL;
 	char *url_buffer;
 	GString *s;
@@ -899,7 +899,7 @@
 
 #if PHOTO_SUPPORT
 	photo_url_text = yahoo_get_photo_url(url_text, info_data->name);
-#endif
+#endif /* PHOTO_SUPPORT */
 
 	url_buffer = g_strdup(url_text);
 
@@ -1048,7 +1048,7 @@
 			purple_debug_info("yahoo", "%s is %" G_GSIZE_FORMAT
 					" bytes\n", photo_url_text, len);
 			id = purple_imgstore_add_with_id(g_memdup(url_text, len), len, NULL);
-			
+
 			tmp = g_strdup_printf("<img id=\"%d\"><br>", id);
 			purple_notify_user_info_add_pair(user_info, NULL, tmp);
 			g_free(tmp);
@@ -1259,7 +1259,7 @@
 	g_free(info2_data);
 	if (id != -1)
 		purple_imgstore_unref_by_id(id);
-#endif
+#endif /* PHOTO_SUPPORT */
 }
 
 void yahoo_get_info(PurpleConnection *gc, const char *name)
--- a/libpurple/protocols/yahoo/yahoochat.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoochat.c	Thu Jun 18 23:04:07 2009 +0000
@@ -30,7 +30,7 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include "debug.h"
 #include "privacy.h"
--- a/libpurple/protocols/yahoo/ycht.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/libpurple/protocols/yahoo/ycht.c	Thu Jun 18 23:04:07 2009 +0000
@@ -225,7 +225,7 @@
 	}
 
 	purple_debug(PURPLE_DEBUG_MISC, NULL, "\n");
-#endif
+#endif /* YAHOO_YCHT_DEBUG */
 }
 
 static YchtPkt *ycht_packet_new(guint version, guint service, int status)
--- a/pidgin/eggtrayicon.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/pidgin/eggtrayicon.c	Thu Jun 18 23:04:07 2009 +0000
@@ -400,9 +400,35 @@
 static gboolean
 transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
 {
-	gdk_window_clear_area (widget->window, event->area.x, event->area.y,
-	                      event->area.width, event->area.height);
-	return FALSE;
+  GtkWidget *focus_child = NULL;
+  gint border_width, x, y, width, height;
+  gboolean retval = FALSE;
+
+  gdk_window_clear_area (widget->window, event->area.x, event->area.y,
+                         event->area.width, event->area.height);
+
+  if (GTK_WIDGET_CLASS (parent_class)->expose_event)
+    retval = GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
+
+  if (GTK_CONTAINER (widget)->focus_child)
+    focus_child = GTK_CONTAINER (GTK_CONTAINER (widget)->focus_child)->focus_child;
+  if (focus_child && GTK_WIDGET_HAS_FOCUS (focus_child))
+    {
+      border_width = GTK_CONTAINER (widget)->border_width;
+
+      x = widget->allocation.x + border_width;
+      y = widget->allocation.y + border_width;
+
+      width  = widget->allocation.width  - 2 * border_width;
+      height = widget->allocation.height - 2 * border_width;
+
+      gtk_paint_focus (widget->style, widget->window,
+                       GTK_WIDGET_STATE (widget),
+                       &event->area, widget, "tray_icon",
+                       x, y, width, height);
+    }
+
+  return retval;
 }
 
 static void
--- a/pidgin/gtkdocklet-x11.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/pidgin/gtkdocklet-x11.c	Thu Jun 18 23:04:07 2009 +0000
@@ -32,6 +32,7 @@
 
 #include "eggtrayicon.h"
 #include "gtkdocklet.h"
+#include <gdk/gdkkeysyms.h>
 
 #define SHORT_EMBED_TIMEOUT 5000
 #define LONG_EMBED_TIMEOUT 15000
@@ -89,6 +90,33 @@
 	return TRUE;
 }
 
+static gboolean
+docklet_x11_pressed_cb(GtkWidget *button, GdkEventKey *event)
+{
+	guint state, keyval;
+
+	state = event->state & gtk_accelerator_get_default_mod_mask();
+	keyval = event->keyval;
+	if (state == 0 &&
+	    (keyval == GDK_Return ||
+	     keyval == GDK_KP_Enter ||
+	     keyval == GDK_ISO_Enter ||
+	     keyval == GDK_space ||
+	     keyval == GDK_KP_Space))
+	{
+		pidgin_docklet_clicked(1);
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
+static void
+docklet_x11_popup_cb(GtkWidget *button)
+{
+	pidgin_docklet_clicked(3);
+}
+
 static void
 docklet_x11_update_icon(PurpleStatusPrimitive status, gboolean connecting, gboolean pending)
 {
@@ -259,11 +287,14 @@
 	docklet = egg_tray_icon_new(PIDGIN_NAME);
 	box = gtk_event_box_new();
 	image = gtk_image_new();
+	GTK_WIDGET_SET_FLAGS (image, GTK_CAN_FOCUS);
 
 	g_signal_connect(G_OBJECT(docklet), "embedded", G_CALLBACK(docklet_x11_embedded_cb), NULL);
 	g_signal_connect(G_OBJECT(docklet), "destroy", G_CALLBACK(docklet_x11_destroyed_cb), NULL);
 	g_signal_connect(G_OBJECT(docklet), "size-allocate", G_CALLBACK(docklet_x11_resize_icon), NULL);
 	g_signal_connect(G_OBJECT(box), "button-press-event", G_CALLBACK(docklet_x11_clicked_cb), NULL);
+	g_signal_connect(G_OBJECT(box), "key-press-event", G_CALLBACK(docklet_x11_pressed_cb), NULL);
+	g_signal_connect(G_OBJECT(box), "popup-menu", G_CALLBACK(docklet_x11_popup_cb), NULL);
 	gtk_container_add(GTK_CONTAINER(box), image);
 	gtk_container_add(GTK_CONTAINER(docklet), box);
 
--- a/pidgin/gtkft.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/pidgin/gtkft.c	Thu Jun 18 23:04:07 2009 +0000
@@ -705,12 +705,12 @@
 	};
 
 	/* Setup the initial table */
-	dialog->table = table = gtk_table_new(9, 2, FALSE);
+	dialog->table = table = gtk_table_new(G_N_ELEMENTS(labels) + 1, 2, FALSE);
 	gtk_table_set_row_spacings(GTK_TABLE(table), PIDGIN_HIG_BOX_SPACE);
 	gtk_table_set_col_spacings(GTK_TABLE(table), PIDGIN_HIG_BOX_SPACE);
 
 	/* Setup the labels */
-	for (i = 0; i < sizeof(labels) / sizeof(*labels); i++) {
+	for (i = 0; i < G_N_ELEMENTS(labels); i++) {
 		GtkWidget *label;
 		char buf[256];
 
@@ -734,7 +734,9 @@
 
 	/* Setup the progress bar */
 	dialog->progress = gtk_progress_bar_new();
-	gtk_table_attach(GTK_TABLE(table), dialog->progress, 0, 2, 8, 9,
+	gtk_table_attach(GTK_TABLE(table), dialog->progress,
+					 0, 2,
+					 G_N_ELEMENTS(labels), G_N_ELEMENTS(labels) + 1,
 					 GTK_FILL, GTK_FILL, 0, 0);
 	gtk_widget_show(dialog->progress);
 
--- a/pidgin/gtkicon-theme-loader.c	Thu Jun 18 23:01:51 2009 +0000
+++ b/pidgin/gtkicon-theme-loader.c	Thu Jun 18 23:04:07 2009 +0000
@@ -41,7 +41,7 @@
 	filename_full = g_build_filename(dir, "theme.xml", NULL);
 
 	if (g_file_test(filename_full, G_FILE_TEST_IS_REGULAR))
-		root_node = xmlnode_from_file(dir, "theme.xml", "sound themes", "sound-theme-loader");
+		root_node = xmlnode_from_file(dir, "theme.xml", "icon themes", "icon-theme-loader");
 
 	g_free(filename_full);
 	g_return_val_if_fail(root_node != NULL, NULL);
--- a/po/de.po	Thu Jun 18 23:01:51 2009 +0000
+++ b/po/de.po	Thu Jun 18 23:04:07 2009 +0000
@@ -11,9 +11,9 @@
 msgstr ""
 "Project-Id-Version: de\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-06-01 12:31+0200\n"
-"PO-Revision-Date: 2009-06-01 12:31+0200\n"
-"Last-Translator: Björn Voigt <bjoern@cs.tu-berlin.de>\n"
+"POT-Creation-Date: 2009-06-11 12:42+0200\n"
+"PO-Revision-Date: 2009-06-11 12:40+0200\n"
+"Last-Translator: Bjoern Voigt <bjoern@cs.tu-berlin.de>\n"
 "Language-Team: Deutsch <de@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -877,7 +877,7 @@
 msgstr "System-Mitschnitt"
 
 msgid "Calling ... "
-msgstr "Anrufen..."
+msgstr "Anrufen ... "
 
 msgid "Hangup"
 msgstr "Auflegen"
@@ -3169,6 +3169,10 @@
 msgid "Chat _name:"
 msgstr "Chat_name:"
 
+#. should this be a settings error?
+msgid "Unable to resolve server"
+msgstr "Verbindung zum Server nicht möglich"
+
 msgid "Chat error"
 msgstr "Chatfehler"
 
@@ -3217,6 +3221,10 @@
 msgid "Gadu-Gadu User"
 msgstr "Gadu-Gadu-Benutzer"
 
+#, fuzzy
+msgid "GG server"
+msgstr "Hole server"
+
 #, c-format
 msgid "Unknown command: %s"
 msgstr "Unbekanntes Kommando: %s"
@@ -3463,7 +3471,7 @@
 #. notify the user that their /nick command didn't go.
 #, c-format
 msgid "The nickname \"%s\" is already being used."
-msgstr "Der Spitzname \"%s\" existiert bereits."
+msgstr "Der Spitzname „%s“ existiert bereits."
 
 #, fuzzy
 msgid "Nickname in use"
@@ -4215,9 +4223,8 @@
 msgid "Invalid XMPP ID. Domain must be set."
 msgstr "Falsche XMPP-ID. Die Domain muss gesetzt werden."
 
-#, fuzzy
 msgid "Malformed BOSH Connect Server"
-msgstr "Verbindung zum Server nicht möglich."
+msgstr ""
 
 #, c-format
 msgid "Registration of %s@%s successful"
@@ -4243,9 +4250,6 @@
 msgid "Unregistration Failed"
 msgstr "Aufheben der Registrierung gescheitert"
 
-msgid "Already Registered"
-msgstr "Schon registriert"
-
 msgid "State"
 msgstr "Provinz/Bundesland"
 
@@ -4258,6 +4262,9 @@
 msgid "Date"
 msgstr "Datum"
 
+msgid "Already Registered"
+msgstr "Schon registriert"
+
 msgid "Unregister"
 msgstr "Aufheben der Registrierung"
 
@@ -4631,7 +4638,7 @@
 "session."
 msgstr ""
 "Bitte wählen Sie die Ressource von %s, mir der Sie eine Medien-Sitzung "
-"starten möchten"
+"starten möchten."
 
 msgid "Select a Resource"
 msgstr "Wählen Sie eine Ressource"
@@ -4795,12 +4802,11 @@
 msgid "Error in chat %s"
 msgstr "Fehler im Chat %s"
 
-#, fuzzy
 msgid "An error occured on the in-band bytestream transfer\n"
-msgstr "Beim Öffnen der Datei trat ein Fehler auf."
+msgstr "Beim Übertragen der Datei trat ein Fehler auf\n"
 
 msgid "Transfer was closed."
-msgstr "Übertragung wurde geschlossen"
+msgstr "Übertragung wurde geschlossen."
 
 msgid "Failed to open the file"
 msgstr "Öffnen der Datei fehlgeschlagen"
@@ -5441,32 +5447,6 @@
 msgid "The following users are missing from your addressbook"
 msgstr "Die folgenden Benutzer fehlen in Ihrem Adressbuch"
 
-#, c-format
-msgid "Unable to add user on %s (%s)"
-msgstr "Kann den Benutzer nicht zu %s (%s) hinzufügen"
-
-#, c-format
-msgid "Unable to block user on %s (%s)"
-msgstr "Kann den Benutzer nicht für %s (%s) blockieren"
-
-#, c-format
-msgid "Unable to permit user on %s (%s)"
-msgstr "Kann den Benutzer nicht für %s (%s) erlauben"
-
-#, c-format
-msgid "%s could not be added because your buddy list is full."
-msgstr "%s konnte nicht hinzugefügt werden, da Ihre Buddy-Liste voll ist."
-
-#, c-format
-msgid "%s is not a valid passport account."
-msgstr "%s ist kein gültiges Passport-Konto."
-
-msgid "Service Temporarily Unavailable."
-msgstr "Dienst momentan nicht verfügbar."
-
-msgid "Unknown error."
-msgstr "Unbekannter Fehler."
-
 msgid "Mobile message was not sent because it was too long."
 msgstr "Mobile Nachricht wurde nicht gesendet, da sie zu lang war."
 
@@ -5566,6 +5546,9 @@
 "Ihre MSN-Buddy-Liste ist temporär nicht verfügbar. Bitte warten Sie und "
 "versuchen Sie es später nochmal."
 
+msgid "Unknown error."
+msgstr "Unbekannter Fehler."
+
 msgid "Handshaking"
 msgstr "Abgleich"
 
@@ -5669,6 +5652,29 @@
 msgid "%s on %s (%s)"
 msgstr "%s auf %s (%s)"
 
+#, c-format
+msgid "Unable to add user on %s (%s)"
+msgstr "Kann den Benutzer nicht zu %s (%s) hinzufügen"
+
+#, c-format
+msgid "Unable to block user on %s (%s)"
+msgstr "Kann den Benutzer nicht für %s (%s) blockieren"
+
+#, c-format
+msgid "Unable to permit user on %s (%s)"
+msgstr "Kann den Benutzer nicht für %s (%s) erlauben"
+
+#, c-format
+msgid "%s could not be added because your buddy list is full."
+msgstr "%s konnte nicht hinzugefügt werden, da Ihre Buddy-Liste voll ist."
+
+#, c-format
+msgid "%s is not a valid passport account."
+msgstr "%s ist kein gültiges Passport-Konto."
+
+msgid "Service Temporarily Unavailable."
+msgstr "Dienst momentan nicht verfügbar."
+
 msgid "Unable to rename group"
 msgstr "Kann die Gruppe nicht umbenennen"
 
@@ -6783,7 +6789,7 @@
 msgstr "Möchten Sie diesen Buddy zu Ihrer Buddy-Liste hinzufügen?"
 
 msgid "_Add"
-msgstr "_Hinzufügen"
+msgstr "Hinzu_fügen"
 
 msgid "_Decline"
 msgstr "_Ablehnen"
@@ -9568,16 +9574,26 @@
 msgstr "Falsches Passwort"
 
 #. security lock from too many failed login attempts
-msgid "Account locked: Too many failed login attempts"
-msgstr "Konto gesperrt: Zu viele erfolglose Login-Versuche"
+#, fuzzy
+msgid ""
+"Account locked: Too many failed login attempts.\n"
+"Logging into the Yahoo! website may fix this."
+msgstr ""
+"Unbekannte Fehlernummer %d. Vielleicht kann dies repariert werden, wenn Sie "
+"sich auf der Yahoo! Webseite anmelden."
 
 #. the username does not exist
 msgid "Username does not exist"
 msgstr "Benutzername existiert nicht"
 
 #. indicates a lock of some description
-msgid "Account locked: See the debug log"
-msgstr "Konto gesperrt: Sehen Sie in den Debug-Mitschnitt"
+#, fuzzy
+msgid ""
+"Account locked: Unknown reason.\n"
+"Logging into the Yahoo! website may fix this."
+msgstr ""
+"Unbekannte Fehlernummer %d. Vielleicht kann dies repariert werden, wenn Sie "
+"sich auf der Yahoo! Webseite anmelden."
 
 #. username or password missing
 msgid "Username or password missing"
@@ -10492,9 +10508,8 @@
 msgid "Please update the necessary fields."
 msgstr "Bitte aktualisieren Sie die erforderlichen Felder."
 
-#, fuzzy
 msgid "A_ccount"
-msgstr "Konto"
+msgstr "K_onto"
 
 msgid ""
 "Please enter the appropriate information about the chat you would like to "
@@ -11646,7 +11661,7 @@
 msgstr "_Name"
 
 msgid "_Account"
-msgstr "_Konto"
+msgstr "K_onto"
 
 msgid "Get User Info"
 msgstr "Benutzer-Info abrufen"
@@ -12400,19 +12415,19 @@
 msgstr "Bei wem alarmieren"
 
 msgid "_Account:"
-msgstr "_Konto:"
+msgstr "K_onto:"
 
 msgid "_Buddy name:"
-msgstr "_Buddy-Name:"
+msgstr "Budd_y-Name:"
 
 msgid "Si_gns on"
-msgstr "_sich anmeldet"
+msgstr "si_ch anmeldet"
 
 msgid "Signs o_ff"
 msgstr "sich abmel_det"
 
 msgid "Goes a_way"
-msgstr "_hinausgeht"
+msgstr "hinausgeh_t"
 
 msgid "Ret_urns from away"
 msgstr "wi_eder anwesend ist"
@@ -12421,22 +12436,22 @@
 msgstr "_untätig wird"
 
 msgid "Is no longer i_dle"
-msgstr "nicht meh_r untätig ist"
+msgstr "nicht _mehr untätig ist"
 
 msgid "Starts _typing"
-msgstr "zu _tippen beginnt"
+msgstr "zu tippen _beginnt"
 
 msgid "P_auses while typing"
-msgstr "beim Tippen an_hält"
+msgstr "beim Tippen anh_ält"
 
 msgid "Stops t_yping"
 msgstr "aufhört _zu tippen"
 
 msgid "Sends a _message"
-msgstr "eine _Nachricht sendet"
+msgstr "eine Nachr_icht sendet"
 
 msgid "Ope_n an IM window"
-msgstr "Gesprächsfenster ö_ffnen"
+msgstr "_Gesprächsfenster öffnen"
 
 msgid "_Pop up a notification"
 msgstr "_Popup-Benachrichtigung"
@@ -12445,22 +12460,22 @@
 msgstr "_Nachricht senden"
 
 msgid "E_xecute a command"
-msgstr "Befeh_l ausführen"
+msgstr "Befehl ausfüh_ren"
 
 msgid "P_lay a sound"
-msgstr "einen _Klang abspielen"
+msgstr "Einen _Klang abspielen"
 
 msgid "Brows_e..."
-msgstr "Aus_wählen..."
+msgstr "Au_swählen..."
 
 msgid "Br_owse..."
-msgstr "Aus_wählen..."
+msgstr "Auswäh_len..."
 
 msgid "Pre_view"
 msgstr "_Vorschau"
 
 msgid "P_ounce only when my status is not Available"
-msgstr "Nur _alarmieren, wenn ich nicht verfügbar bin"
+msgstr "Nur alarmieren, wenn ich nicht ver_fügbar bin"
 
 msgid "_Recurring"
 msgstr "_Wiederkehrend"
@@ -13802,12 +13817,6 @@
 "- Es sendet eine Nachricht zu Leuten in Ihrer Buddy Liste, direkt wenn Sie "
 "sich angemeldet haben"
 
-msgid "Cursor Color"
-msgstr "Cursor-Farbe"
-
-msgid "Secondary Cursor Color"
-msgstr "Sekundäre Cursor-Farbe"
-
 msgid "Hyperlink Color"
 msgstr "Hyperlink-Farbe"
 
@@ -13817,6 +13826,10 @@
 msgid "Highlighted Message Name Color"
 msgstr "Farbe des Absendernamens für hervorgehobene Nachrichten"
 
+#, fuzzy
+msgid "Typing Notification Color"
+msgstr "Farbe der Tipp-Benachrichtigung"
+
 msgid "GtkTreeView Horizontal Separation"
 msgstr "GtkTreeview horizontaler Abstand"
 
@@ -13845,35 +13858,24 @@
 msgid "GTK+ Text Shortcut Theme"
 msgstr "GTK+ Text Shortcut-Thema"
 
-#.
-#. for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) {
-#. hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE);
-#. gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0);
-#.
-#. check = pidgin_prefs_checkbox(_(widget_bool_names[i]),
-#. widget_bool_prefs_set[i], hbox);
-#. gtk_size_group_add_widget(labelsg, check);
-#.
-#. widget_bool_widgets[i] = pidgin_prefs_checkbox("", widget_bool_prefs[i], hbox);
-#. *
-#. gtk_size_group_add_widget(widgetsb, widget_bool_widgets[i]);
-#. *
-#. gtk_widget_set_sensitive(widget_bool_widgets[i],
-#. purple_prefs_get_bool(widget_bool_prefs_set[i]));
-#. g_signal_connect(G_OBJECT(check), "toggled",
-#. G_CALLBACK(pidgin_toggle_sensitive),
-#. widget_bool_widgets[i]);
-#. }
-#.
-msgid "Interface colors"
-msgstr "UI-Farben"
-
-msgid "Widget Sizes"
-msgstr "Widget-Größen"
+#, fuzzy
+msgid "Disable Typing Notification Text"
+msgstr "Tipp-Benachrichtigung aktivieren"
+
+#, fuzzy
+msgid "GTK+ Theme Control Settings"
+msgstr "Pidgin GTK+ Themenkontrolle"
+
+#, fuzzy
+msgid "Colors"
+msgstr "Schließen"
 
 msgid "Fonts"
 msgstr "Schrift"
 
+msgid "Miscellaneous"
+msgstr ""
+
 msgid "Gtkrc File Tools"
 msgstr "Gtkrc-Datei-Werkzeuge"