changeset 26452:c0846d6659c6

Remove purple_media_reject.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Mon, 30 Mar 2009 00:55:29 +0000
parents 2862fee7acf2
children 12c7db418c3e
files finch/gntmedia.c libpurple/media.c libpurple/media.h pidgin/gtkmedia.c
diffstat 4 files changed, 16 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntmedia.c	Mon Mar 30 00:45:14 2009 +0000
+++ b/finch/gntmedia.c	Mon Mar 30 00:55:29 2009 +0000
@@ -249,6 +249,13 @@
 }
 
 static void
+finch_media_reject_cb(PurpleMedia *media, GntWidget *widget)
+{
+	purple_media_stream_info(media, PURPLE_MEDIA_INFO_REJECT,
+			NULL, NULL, TRUE);
+}
+
+static void
 finch_media_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 {
 	FinchMedia *media;
@@ -266,7 +273,7 @@
 			g_signal_connect_swapped(G_OBJECT(media->priv->accept), "activate",
 				 G_CALLBACK(purple_media_accept), media->priv->media);
 			g_signal_connect_swapped(G_OBJECT(media->priv->reject), "activate",
-				 G_CALLBACK(purple_media_reject), media->priv->media);
+				 G_CALLBACK(finch_media_reject_cb), media->priv->media);
 			g_signal_connect_swapped(G_OBJECT(media->priv->hangup), "activate",
 				 G_CALLBACK(finch_media_hangup_cb), media->priv->media);
 
--- a/libpurple/media.c	Mon Mar 30 00:45:14 2009 +0000
+++ b/libpurple/media.c	Mon Mar 30 00:55:29 2009 +0000
@@ -1392,15 +1392,6 @@
 }
 
 void
-purple_media_reject(PurpleMedia *media)
-{
-#ifdef USE_VV
-	purple_media_stream_info(media, PURPLE_MEDIA_INFO_REJECT,
-			NULL, NULL, TRUE);
-#endif
-}
-
-void
 purple_media_end(PurpleMedia *media,
 		const gchar *session_id, const gchar *participant)
 {
--- a/libpurple/media.h	Mon Mar 30 00:45:14 2009 +0000
+++ b/libpurple/media.h	Mon Mar 30 00:55:29 2009 +0000
@@ -357,13 +357,6 @@
 void purple_media_accept(PurpleMedia *media);
 
 /**
- * Set the media session to the rejected state.
- *
- * @param media The media object to set the state on.
- */
-void purple_media_reject(PurpleMedia *media);
-
-/**
  * Ends all streams that match the given parameters
  *
  * @param media The media object with which to end streams.
--- a/pidgin/gtkmedia.c	Mon Mar 30 00:45:14 2009 +0000
+++ b/pidgin/gtkmedia.c	Mon Mar 30 00:55:29 2009 +0000
@@ -812,6 +812,13 @@
 	gtkmedia->priv->state = state;
 }
 
+static void
+pidgin_media_reject_cb(PurpleMedia *media, int index)
+{
+	purple_media_stream_info(media, PURPLE_MEDIA_INFO_REJECT,
+			NULL, NULL, TRUE);
+}
+
 static gboolean
 pidgin_media_new_cb(PurpleMediaManager *manager, PurpleMedia *media,
 		PurpleConnection *pc, gchar *screenname, gpointer nul)
@@ -833,7 +840,7 @@
 		purple_request_accept_cancel(gtkmedia, "Media invitation",
 				message, NULL, PURPLE_DEFAULT_ACTION_NONE,
 				(void*)pc, screenname, NULL, media,
-				purple_media_accept, purple_media_reject);
+				purple_media_accept, pidgin_media_reject_cb);
 		g_free(message);
 	} else
 		gtk_widget_show(GTK_WIDGET(gtkmedia));