pidgin: 854990d6: Remove the "accepted" signal from Purple...
maiku at soc.pidgin.im
maiku at soc.pidgin.im
Tue Aug 4 23:40:49 EDT 2009
-----------------------------------------------------------------
Revision: 854990d63dfa2b6aae75ea348c378b795738e68c
Ancestor: b8752e1e3464dbbb2b0368a112a6d9350cef35cb
Author: maiku at soc.pidgin.im
Date: 2009-08-05T03:37:45
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/854990d63dfa2b6aae75ea348c378b795738e68c
Modified files:
libpurple/media.c libpurple/protocols/jabber/jingle/rtp.c
pidgin/gtkmedia.c
ChangeLog:
Remove the "accepted" signal from PurpleMedia as it was redundant.
-------------- next part --------------
============================================================
--- libpurple/media.c af854178db05dbeb0b4f15f00082fb424bc54c9e
+++ libpurple/media.c a59a1201b26e1fc4e9b739bdc74a35d38a7f8c39
@@ -157,7 +157,6 @@ enum {
enum {
S_ERROR,
- ACCEPTED,
CANDIDATES_PREPARED,
CODECS_CHANGED,
NEW_CANDIDATE,
@@ -332,10 +331,6 @@ purple_media_class_init (PurpleMediaClas
G_SIGNAL_RUN_LAST, 0, NULL, NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
- purple_media_signals[ACCEPTED] = g_signal_new("accepted", G_TYPE_FROM_CLASS(klass),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- purple_smarshal_VOID__STRING_STRING,
- G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
purple_media_signals[CANDIDATES_PREPARED] = g_signal_new("candidates-prepared", G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL,
purple_smarshal_VOID__STRING_STRING,
@@ -2155,9 +2150,6 @@ purple_media_stream_info(PurpleMedia *me
stream->session->type), NULL);
stream->accepted = TRUE;
}
-
- g_signal_emit(media, purple_media_signals[ACCEPTED],
- 0, NULL, NULL);
} else if (local == TRUE && (type == PURPLE_MEDIA_INFO_MUTE ||
type == PURPLE_MEDIA_INFO_UNMUTE)) {
GList *sessions;
============================================================
--- libpurple/protocols/jabber/jingle/rtp.c 6a89490279c2bcf0c5a379165313c73d5ef5b098
+++ libpurple/protocols/jabber/jingle/rtp.c e7a8115d8ded3c16a65a5e84d206ede32b83fb6c
@@ -355,14 +355,6 @@ static void
static void jingle_rtp_ready(JingleSession *session);
static void
-jingle_rtp_accepted_cb(PurpleMedia *media, gchar *sid, gchar *name,
- JingleSession *session)
-{
- purple_debug_info("jingle-rtp", "jingle_rtp_accepted_cb\n");
- jingle_rtp_ready(session);
-}
-
-static void
jingle_rtp_candidates_prepared_cb(PurpleMedia *media,
gchar *sid, gchar *name, JingleSession *session)
{
@@ -480,6 +472,9 @@ jingle_rtp_stream_info_cb(PurpleMedia *m
jabber_iq_send(jingle_session_terminate_packet(
session, "decline"));
g_object_unref(session);
+ } else if (type == PURPLE_MEDIA_INFO_ACCEPT &&
+ jingle_session_is_initiator(session) == FALSE) {
+ jingle_rtp_ready(session);
}
}
@@ -504,8 +499,6 @@ jingle_rtp_ready(JingleSession *session)
}
g_signal_handlers_disconnect_by_func(G_OBJECT(media),
- G_CALLBACK(jingle_rtp_accepted_cb), session);
- g_signal_handlers_disconnect_by_func(G_OBJECT(media),
G_CALLBACK(jingle_rtp_candidates_prepared_cb),
session);
g_signal_handlers_disconnect_by_func(G_OBJECT(media),
@@ -539,9 +532,6 @@ jingle_rtp_create_media(JingleContent *c
purple_media_set_prpl_data(media, session);
/* connect callbacks */
- if (jingle_session_is_initiator(session) == FALSE)
- g_signal_connect(G_OBJECT(media), "accepted",
- G_CALLBACK(jingle_rtp_accepted_cb), session);
g_signal_connect(G_OBJECT(media), "candidates-prepared",
G_CALLBACK(jingle_rtp_candidates_prepared_cb), session);
g_signal_connect(G_OBJECT(media), "codecs-changed",
============================================================
--- pidgin/gtkmedia.c 855da4cce0cfdd7bf220ebfe558df429182f52a4
+++ pidgin/gtkmedia.c 36ef82ace364ecd11aadcb0d96a7cb0425765f7f
@@ -501,17 +501,6 @@ static void
}
static void
-pidgin_media_accepted_cb(PurpleMedia *media, const gchar *session_id,
- const gchar *participant, PidginMedia *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),
- 0, _("Call in progress."));
- gtk_widget_show(GTK_WIDGET(gtkmedia));
-}
-
-static void
pidgin_media_accept_cb(PurpleMedia *media, int index)
{
purple_media_stream_info(media, PURPLE_MEDIA_INFO_ACCEPT,
@@ -843,6 +832,12 @@ pidgin_media_stream_info_cb(PurpleMedia
if (type == PURPLE_MEDIA_INFO_REJECT) {
pidgin_media_emit_message(gtkmedia,
_("You have rejected the call."));
+ } else if (type == PURPLE_MEDIA_INFO_ACCEPT) {
+ pidgin_media_set_state(gtkmedia, PIDGIN_MEDIA_ACCEPTED);
+ pidgin_media_emit_message(gtkmedia, _("Call in progress."));
+ gtk_statusbar_push(GTK_STATUSBAR(gtkmedia->priv->statusbar),
+ 0, _("Call in progress."));
+ gtk_widget_show(GTK_WIDGET(gtkmedia));
}
}
@@ -869,8 +864,6 @@ pidgin_media_set_property (GObject *obje
g_signal_connect(G_OBJECT(media->priv->media), "error",
G_CALLBACK(pidgin_media_error_cb), media);
- g_signal_connect(G_OBJECT(media->priv->media), "accepted",
- 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",
More information about the Commits
mailing list