changeset 29502:5802999803db

merge of 'bbf372ad40c4d6c10e323048d26215e4769e079c' and 'd6b03d30f4751e3fa383c0e15a03515536f9b57c'
author Paul Aurich <paul@darkrain42.org>
date Sun, 28 Feb 2010 19:19:37 +0000
parents 5ffe7f1d4efa (diff) 1326fd4dfdc9 (current diff)
children 7adebf6acc50
files
diffstat 7 files changed, 24 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Sun Feb 28 08:22:12 2010 +0000
+++ b/COPYRIGHT	Sun Feb 28 19:19:37 2010 +0000
@@ -303,6 +303,7 @@
 Peter McCurdy
 Kurt McKee
 Torrey McMahon
+Greg McNew
 Robert McQueen
 Mihály Mészáros
 Robert Mibus
--- a/ChangeLog	Sun Feb 28 08:22:12 2010 +0000
+++ b/ChangeLog	Sun Feb 28 19:19:37 2010 +0000
@@ -15,8 +15,11 @@
 	* Use GtkStatusIcon for the docklet, providing better integration in
 	  notification area.
 	* Added UI for sending attentions (buzz, nudge) on supporting protocols.
-	* Make the search dialog unobtrusive in the conversation window (by making
-	  it look and behave like the search dialog in Firefox)
+	* Make the search dialog unobtrusive in the conversation window (by
+	  making it look and behave like the search dialog in Firefox)
+	* The Recent Log Activity sort method for the Buddy List now
+	  distinguishes between no activity and a small amount of activity
+	  in the distant past.  (Greg McNew)
 
 	Bonjour:
 	* Added support for IPv6. (Thanks to T_X for testing)
--- a/libpurple/log.c	Sun Feb 28 08:22:12 2010 +0000
+++ b/libpurple/log.c	Sun Feb 28 19:19:37 2010 +0000
@@ -36,6 +36,8 @@
 #include "imgstore.h"
 #include "time.h"
 
+#include <math.h>
+
 static GSList *loggers = NULL;
 
 static PurpleLogLogger *html_logger;
@@ -302,7 +304,7 @@
 			}
 		}
 
-		score = (gint)score_double;
+		score = (gint) ceil(score_double);
 		g_hash_table_replace(logsize_users_decayed, lu, GINT_TO_POINTER(score));
 	}
 	return score;
--- a/libpurple/protocols/jabber/pep.c	Sun Feb 28 08:22:12 2010 +0000
+++ b/libpurple/protocols/jabber/pep.c	Sun Feb 28 19:19:37 2010 +0000
@@ -89,10 +89,11 @@
 	JabberIq *iq = jabber_iq_new(js, JABBER_IQ_GET);
 	xmlnode *pubsub, *items;
 
-	xmlnode_set_attrib(iq->node,"to",to);
+	if (to)
+		xmlnode_set_attrib(iq->node, "to", to);
+
 	pubsub = xmlnode_new_child(iq->node,"pubsub");
-
-	xmlnode_set_namespace(pubsub,"http://jabber.org/protocol/pubsub");
+	xmlnode_set_namespace(pubsub, "http://jabber.org/protocol/pubsub");
 
 	items = xmlnode_new_child(pubsub, "items");
 	xmlnode_set_attrib(items,"node",node);
--- a/libpurple/protocols/jabber/useravatar.c	Sun Feb 28 08:22:12 2010 +0000
+++ b/libpurple/protocols/jabber/useravatar.c	Sun Feb 28 19:19:37 2010 +0000
@@ -239,16 +239,12 @@
 
 void jabber_avatar_fetch_mine(JabberStream *js)
 {
-	char *jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain);
-
 	if (js->initial_avatar_hash) {
-		jabber_pep_request_item(js, jid, NS_AVATAR_0_12_METADATA, NULL,
+		jabber_pep_request_item(js, NULL, NS_AVATAR_0_12_METADATA, NULL,
 		                        do_got_own_avatar_0_12_cb);
-		jabber_pep_request_item(js, jid, NS_AVATAR_1_1_METADATA, NULL,
+		jabber_pep_request_item(js, NULL, NS_AVATAR_1_1_METADATA, NULL,
 		                        do_got_own_avatar_cb);
 	}
-
-	g_free(jid);
 }
 
 typedef struct _JabberBuddyAvatarUpdateURLInfo {
--- a/libpurple/protocols/jabber/usernick.c	Sun Feb 28 08:22:12 2010 +0000
+++ b/libpurple/protocols/jabber/usernick.c	Sun Feb 28 19:19:37 2010 +0000
@@ -86,14 +86,12 @@
 }
 
 static void do_nick_set_nick(PurplePluginAction *action) {
-	PurpleConnection *gc = (PurpleConnection *) action->context;
-	JabberStream *js = gc->proto_data;
-	char *jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain);
+	PurpleConnection *gc = action->context;
+	JabberStream *js = purple_connection_get_protocol_data(gc);
 
 	/* since the nickname might have been changed by another resource of this account, we always have to request the old one
 		from the server to present as the default for the new one */
-	jabber_pep_request_item(js, jid, "http://jabber.org/protocol/nick", NULL, do_nick_got_own_nick_cb);
-	g_free(jid);
+	jabber_pep_request_item(js, NULL, "http://jabber.org/protocol/nick", NULL, do_nick_got_own_nick_cb);
 }
 
 void jabber_nick_init(void) {
--- a/pidgin/plugins/xmppconsole.c	Sun Feb 28 08:22:12 2010 +0000
+++ b/pidgin/plugins/xmppconsole.c	Sun Feb 28 19:19:37 2010 +0000
@@ -621,7 +621,7 @@
 }
 
 static void
-signed_on_cb(PurpleConnection *gc)
+signing_on_cb(PurpleConnection *gc)
 {
 	if (!console)
 		return;
@@ -630,7 +630,9 @@
 	console->accounts = g_list_append(console->accounts, gc);
 	console->count++;
 
-	if (console->count > 1)
+	if (console->count == 1)
+		console->gc = gc;
+	else
 		gtk_widget_show_all(console->hbox);
 }
 
@@ -680,8 +682,8 @@
 			    PURPLE_CALLBACK(xmlnode_received_cb), NULL);
 	purple_signal_connect(jabber, "jabber-sending-text", xmpp_console_handle,
 			    PURPLE_CALLBACK(xmlnode_sent_cb), NULL);
-	purple_signal_connect(purple_connections_get_handle(), "signed-on",
-			    plugin, PURPLE_CALLBACK(signed_on_cb), NULL);
+	purple_signal_connect(purple_connections_get_handle(), "signing-on",
+			    plugin, PURPLE_CALLBACK(signing_on_cb), NULL);
 	purple_signal_connect(purple_connections_get_handle(), "signed-off",
 			    plugin, PURPLE_CALLBACK(signed_off_cb), NULL);