pidgin.next.minor: dd8cccbb: applied changes from 4c5110037671f84e3e7...

evands at pidgin.im evands at pidgin.im
Tue Apr 29 00:07:33 EDT 2008


-----------------------------------------------------------------
Revision: dd8cccbbce697e7fc1acc0a050c414d7d4f4fac6
Ancestor: 91a643a04016322c0da1e540889a828686bb5d8d
Author: evands at pidgin.im
Date: 2008-04-29T03:59:28
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/dd8cccbbce697e7fc1acc0a050c414d7d4f4fac6

Modified files:
        ChangeLog.API configure.ac libpurple/conversation.c
        libpurple/protocols/jabber/chat.c
        libpurple/protocols/jabber/presence.c libpurple/server.c
        libpurple/server.h

ChangeLog: 

applied changes from 4c5110037671f84e3e775214c32692b5b23c11e1
             through ae37fe6b64c30704715a369df88bd76674a39b1a

applied changes from 4c5110037671f84e3e775214c32692b5b23c11e1
             through ae37fe6b64c30704715a369df88bd76674a39b1a

applied changes from b28057d6ade7c221b0616c3b02e86659e2d8b10b
             through 52c0efb045580dac7b6f5e40c91002e917e0cae3

Plucked changes for the chat-join-failed signal and associated server.c
function from im.pidgin.pidgin, as these necessitate a minor version bump.

-------------- next part --------------
============================================================
--- ChangeLog.API	995229847d848306797e89cc9a4592828277c8d7
+++ ChangeLog.API	82e09660214f06e9a811c1bab8edf31e3beb1d3f
@@ -1,9 +1,9 @@ Pidgin and Finch: The Pimpin' Penguin IM
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
-version 2.x.x:
+version 2.5.0:
     libpurple:
         Added:
-        * serv_got_join_chat_failed
+        * purple_serv_got_join_chat_failed
         * chat-join-failed signal (see conversation-signals.dox)
 	perl:
 		Added:
============================================================
--- configure.ac	3b26612e7eafb66176ebfdaf09f681359fdfca4a
+++ configure.ac	e5ea03929a6d8a2cec9bca46d60a3ec34d42448a
@@ -43,19 +43,19 @@ AC_PREREQ([2.50])
 #
 # Make sure to update finch/libgnt/configure.ac with libgnt version changes.
 #
-m4_define([purple_lt_current], [4])
+m4_define([purple_lt_current], [5])
 m4_define([purple_major_version], [2])
-m4_define([purple_minor_version], [4])
-m4_define([purple_micro_version], [2])
+m4_define([purple_minor_version], [5])
+m4_define([purple_micro_version], [0])
 m4_define([purple_version_suffix], [devel])
 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]))
 
-m4_define([gnt_lt_current], [4])
+m4_define([gnt_lt_current], [5])
 m4_define([gnt_major_version], [2])
-m4_define([gnt_minor_version], [4])
-m4_define([gnt_micro_version], [2])
+m4_define([gnt_minor_version], [5])
+m4_define([gnt_micro_version], [0])
 m4_define([gnt_version_suffix], [devel])
 m4_define([gnt_version],
           [gnt_major_version.gnt_minor_version.gnt_micro_version])
============================================================
--- libpurple/conversation.c	17b8b84a715854e1cab3ba81023f83cbebcc4399
+++ libpurple/conversation.c	933fb27de584a3aee0c80c0a9b68d9e0c2e5fbbf
@@ -2368,6 +2368,12 @@ purple_conversations_init(void)
 						 purple_value_new(PURPLE_TYPE_SUBTYPE,
 										PURPLE_SUBTYPE_CONVERSATION));
 
+	purple_signal_register(handle, "chat-join-failed",
+						   purple_marshal_VOID__POINTER_POINTER, NULL, 2,
+						   purple_value_new(PURPLE_TYPE_SUBTYPE,
+										PURPLE_SUBTYPE_CONNECTION),
+						   purple_value_new(PURPLE_TYPE_STRING));
+
 	purple_signal_register(handle, "chat-left",
 						 purple_marshal_VOID__POINTER, NULL, 1,
 						 purple_value_new(PURPLE_TYPE_SUBTYPE,
============================================================
--- libpurple/protocols/jabber/chat.c	922040aed6450ac224b540538183be49daf143d6
+++ libpurple/protocols/jabber/chat.c	0aadd2a92f2f7471d50b36a3165971c86b044b63
@@ -222,33 +222,39 @@ void jabber_chat_join(PurpleConnection *
 	if(!handle)
 		handle = js->user->node;
 
+	tmp = g_strdup_printf("%s@%s", room, server);
+	room_jid = g_strdup(jabber_normalize(NULL, tmp));
+	g_free(tmp);
+
 	if(!jabber_nodeprep_validate(room)) {
 		char *buf = g_strdup_printf(_("%s is not a valid room name"), room);
 		purple_notify_error(gc, _("Invalid Room Name"), _("Invalid Room Name"),
 				buf);
+		purple_serv_got_join_chat_failed(gc, room_jid);
+		g_free(room_jid);
 		g_free(buf);
 		return;
 	} else if(!jabber_nameprep_validate(server)) {
 		char *buf = g_strdup_printf(_("%s is not a valid server name"), server);
 		purple_notify_error(gc, _("Invalid Server Name"),
 				_("Invalid Server Name"), buf);
+		purple_serv_got_join_chat_failed(gc, room_jid);
+		g_free(room_jid);
 		g_free(buf);
 		return;
 	} else if(!jabber_resourceprep_validate(handle)) {
 		char *buf = g_strdup_printf(_("%s is not a valid room handle"), handle);
 		purple_notify_error(gc, _("Invalid Room Handle"),
 				_("Invalid Room Handle"), buf);
+		purple_serv_got_join_chat_failed(gc, room_jid);
 		g_free(buf);
+		g_free(room_jid);
 		return;
 	}
 
 	if(jabber_chat_find(js, room, server))
 		return;
 
-	tmp = g_strdup_printf("%s@%s", room, server);
-	room_jid = g_strdup(jabber_normalize(NULL, tmp));
-	g_free(tmp);
-
 	chat = g_new0(JabberChat, 1);
 	chat->js = gc->proto_data;
 
============================================================
--- libpurple/protocols/jabber/presence.c	2b0f7846f1356123376598e49a935328b8921248
+++ libpurple/protocols/jabber/presence.c	094c611574b77d442a9b97d28ca549f39020882e
@@ -575,6 +575,7 @@ void jabber_presence_parse(JabberStream 
 					serv_got_chat_left(js->gc, chat->id);
 			} else {
 				title = g_strdup_printf(_("Error joining chat %s"), from);
+				purple_serv_got_join_chat_failed(js->gc, room_jid);
 			}
 			purple_notify_error(js->gc, title, title, msg);
 			g_free(title);
============================================================
--- libpurple/server.c	6f8e729ec6c6920f6ea090d8778bc2814c76f132
+++ libpurple/server.c	cfad78cf203a79f1a25987a813c811ebd198c2db
@@ -967,6 +967,12 @@ void serv_got_chat_left(PurpleConnection
 	purple_signal_emit(purple_conversations_get_handle(), "chat-left", conv);
 }
 
+void purple_serv_got_join_chat_failed(PurpleConnection *gc, const char *name)
+{
+	purple_signal_emit(purple_conversations_get_handle(), "chat-join-failed",
+					gc, name);
+}
+
 void serv_got_chat_in(PurpleConnection *g, int id, const char *who,
 					  PurpleMessageFlags flags, const char *message, time_t mtime)
 {
============================================================
--- libpurple/server.h	28c75b20775231ef3c25d445bcf7a748bde04ae5
+++ libpurple/server.h	4928a407fd71581673c26469eb9ef0f71ae9c546
@@ -166,6 +166,15 @@ PurpleConversation *serv_got_joined_chat
 
 PurpleConversation *serv_got_joined_chat(PurpleConnection *gc,
 									   int id, const char *name);
+/**
+ * Called by a prpl when an attempt to join a chat via serv_join_chat()
+ * fails.
+ *
+ * @param gc      The connection on which chat joining failed
+ * @param name    The name of the chat which we did not join
+ */
+void purple_serv_got_join_chat_failed(PurpleConnection *gc, const char *name);
+	
 void serv_got_chat_left(PurpleConnection *g, int id);
 void serv_got_chat_in(PurpleConnection *g, int id, const char *who,
 					  PurpleMessageFlags flags, const char *message, time_t mtime);


More information about the Commits mailing list