pidgin.vv: 2274b5a7: Use stream-info for reject instead of st...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Sat Mar 21 05:15:39 EDT 2009


-----------------------------------------------------------------
Revision: 2274b5a7613087cda50d16bf9436f0c5da0c261a
Ancestor: 52290707e8b86474c4566569d493325719fe1588
Author: maiku at soc.pidgin.im
Date: 2009-03-21T01:11:48
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/2274b5a7613087cda50d16bf9436f0c5da0c261a

Modified files:
        pidgin/gtkmedia.c

ChangeLog: 

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

-------------- next part --------------
============================================================
--- pidgin/gtkmedia.c	1b87ee1698c4447cb2ce472ed42429e6bdbdcf56
+++ pidgin/gtkmedia.c	766f8e1b45748007d5f231bde29ed83953c1ae2d
@@ -671,10 +671,6 @@ pidgin_media_state_changed_cb(PurpleMedi
 			pidgin_media_emit_message(gtkmedia,
 					_("The call has been terminated."));
 			gtk_widget_destroy(GTK_WIDGET(gtkmedia));
-			
-		} else if (type == PURPLE_MEDIA_STATE_CHANGED_REJECTED) {
-			pidgin_media_emit_message(gtkmedia,
-					_("You have rejected the call."));
 		}
 	} else if (type == PURPLE_MEDIA_STATE_CHANGED_NEW &&
 			sid != NULL && name != NULL) {
@@ -690,6 +686,16 @@ static void
 }
 
 static void
+pidgin_media_stream_info_cb(PurpleMedia *media, PurpleMediaInfoType type,
+		gchar *sid, gchar *name, PidginMedia *gtkmedia)
+{
+	if (type == PURPLE_MEDIA_INFO_REJECT) {
+		pidgin_media_emit_message(gtkmedia,
+				_("You have rejected the call."));
+	}
+}
+
+static void
 pidgin_media_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 {
 	PidginMedia *media;
@@ -718,6 +724,8 @@ pidgin_media_set_property (GObject *obje
 				G_CALLBACK(pidgin_media_accepted_cb), media);
 			g_signal_connect(G_OBJECT(media->priv->media), "state-changed",
 				G_CALLBACK(pidgin_media_state_changed_cb), media);
+			g_signal_connect(G_OBJECT(media->priv->media), "stream-info",
+				G_CALLBACK(pidgin_media_stream_info_cb), media);
 			break;
 		}
 		case PROP_SCREENNAME:


More information about the Commits mailing list