pidgin.vv: da762c8b: Use stream-info instead of state-changed...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Sat Mar 21 05:16:02 EDT 2009


-----------------------------------------------------------------
Revision: da762c8bd62164ac653cf747bfab7a8686352f7c
Ancestor: 2274b5a7613087cda50d16bf9436f0c5da0c261a
Author: maiku at soc.pidgin.im
Date: 2009-03-21T01:37:50
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/da762c8bd62164ac653cf747bfab7a8686352f7c

Modified files:
        finch/gntmedia.c

ChangeLog: 

Use stream-info instead of state-changed for reject.

-------------- next part --------------
============================================================
--- finch/gntmedia.c	43c53282dbb8bb48ff073f9c45b490d26264c7ff
+++ finch/gntmedia.c	50105a4b0faa7ebc384073a6f55e7134cad402bb
@@ -244,9 +244,6 @@ finch_media_state_changed_cb(PurpleMedia
 			 * 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
 }
 
 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 @@ finch_media_set_property (GObject *objec
 			}
 			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:


More information about the Commits mailing list