changeset 31421:db480fe010d5

Adapt Pidgin's incoming call dialog behavior so that rejecting the addition of a stream to an active call doesn't kill the existing call. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author jakub.adam@ktknet.cz
date Thu, 24 Mar 2011 23:39:24 +0000
parents 9f8da7c21afd
children 3903cc87df4c
files pidgin/gtkmedia.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkmedia.c	Thu Mar 24 23:35:26 2011 +0000
+++ b/pidgin/gtkmedia.c	Thu Mar 24 23:39:24 2011 +0000
@@ -595,8 +595,13 @@
 static void
 pidgin_media_reject_cb(PurpleMedia *media, int index)
 {
-	purple_media_stream_info(media, PURPLE_MEDIA_INFO_REJECT,
-			NULL, NULL, TRUE);
+	GList *iter = purple_media_get_session_ids(media);
+	for (; iter; iter = g_list_delete_link(iter, iter)) {
+		const gchar *sessionid = iter->data;
+		if (!purple_media_accepted(media, sessionid, NULL))
+			purple_media_stream_info(media, PURPLE_MEDIA_INFO_REJECT,
+					sessionid, NULL, TRUE);
+	}
 }
 
 static gboolean