changeset 28455:268b821de5c5

merge of '18135201f43ac87c932feae03881d46e30d93030' and '5e877772051b0cfb57b3eda07a70bb59562d0111'
author maiku@pidgin.im
date Thu, 27 Aug 2009 05:58:57 +0000
parents 18e361e0a3ec (current diff) 7a66b8d66456 (diff)
children f628e98e6dff 4bbf24889934 cbc06e756ead 1da2ea10c2d0
files
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkmedia.c	Wed Aug 26 05:56:20 2009 +0000
+++ b/pidgin/gtkmedia.c	Thu Aug 27 05:58:57 2009 +0000
@@ -499,13 +499,14 @@
 	}
 
 	gtkmedia->priv->request_type = PURPLE_MEDIA_NONE;
-
-	purple_request_accept_cancel(gtkmedia, _("Incoming Call"),
-			message, NULL, PURPLE_DEFAULT_ACTION_NONE,
-			(void*)account, gtkmedia->priv->screenname, NULL,
-			gtkmedia->priv->media,
-			pidgin_media_accept_cb,
-			pidgin_media_reject_cb);
+	if (!purple_media_accepted(gtkmedia->priv->media, NULL, NULL)) {
+		purple_request_accept_cancel(gtkmedia, _("Incoming Call"),
+				message, NULL, PURPLE_DEFAULT_ACTION_NONE,
+				(void*)account, gtkmedia->priv->screenname,
+				NULL, gtkmedia->priv->media,
+				pidgin_media_accept_cb,
+				pidgin_media_reject_cb);
+	}
 	pidgin_media_emit_message(gtkmedia, message);
 	g_free(message);
 	return FALSE;
@@ -772,6 +773,8 @@
 		pidgin_media_emit_message(gtkmedia,
 				_("You have rejected the call."));
 	} else if (type == PURPLE_MEDIA_INFO_ACCEPT) {
+		if (local == TRUE)
+			purple_request_close_with_handle(gtkmedia);
 		pidgin_media_set_state(gtkmedia, PIDGIN_MEDIA_ACCEPTED);
 		pidgin_media_emit_message(gtkmedia, _("Call in progress."));
 		gtk_statusbar_push(GTK_STATUSBAR(gtkmedia->priv->statusbar),