changeset 26325:31236ac583ef

Use stream-info instead of state-changed for reject.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Sat, 21 Mar 2009 01:37:50 +0000
parents 065d865e7dd1
children 8c21dbe149d8
files finch/gntmedia.c
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntmedia.c	Sat Mar 21 01:11:48 2009 +0000
+++ b/finch/gntmedia.c	Sat Mar 21 01:37:50 2009 +0000
@@ -244,9 +244,6 @@
 			 * to free the FinchMedia widget.
 			 */
 			g_object_unref(gntmedia);
-		} else if (type == PURPLE_MEDIA_STATE_CHANGED_REJECTED) {
-			finch_media_emit_message(gntmedia,
-					_("You have rejected the call."));
 		}
 	} else if (type == PURPLE_MEDIA_STATE_CHANGED_NEW
 			&& sid != NULL && name != NULL) {
@@ -257,6 +254,16 @@
 }
 
 static void
+finch_media_stream_info_cb(PurpleMedia *media, PurpleMediaInfoType type,
+		gchar *sid, gchar *name, FinchMedia *gntmedia)
+{
+	if (type == PURPLE_MEDIA_INFO_REJECT) {
+		finch_media_emit_message(gntmedia,
+				_("You have rejected the call."));
+	}
+}
+
+static void
 finch_media_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 {
 	FinchMedia *media;
@@ -285,6 +292,8 @@
 			}
 			g_signal_connect(G_OBJECT(media->priv->media), "state-changed",
 				G_CALLBACK(finch_media_state_changed_cb), media);
+			g_signal_connect(G_OBJECT(media->priv->media), "stream-info",
+				G_CALLBACK(finch_media_stream_info_cb), media);
 			break;
 		}
 		default: