changeset 32596:1b6ac48c5ffa

Fix media call initiation for UI manager.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 28 Jul 2009 05:47:09 +0000
parents b4f15d6d5b7e
children b960be0f3423
files pidgin/gtkconv.c
diffstat 1 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Tue Jul 28 05:38:26 2009 +0000
+++ b/pidgin/gtkconv.c	Tue Jul 28 05:47:09 2009 +0000
@@ -1227,15 +1227,25 @@
 static void 
 #if GTK_CHECK_VERSION(2,6,0)
 menu_initiate_media_call_cb(GtkAction *action, gpointer data)
-#else
-menu_initiate_media_call_cb(gpointer data, guint action, GtkWidget *widget)
-#endif
 {
 	PidginWindow *win = (PidginWindow *)data;
 	PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win);
 	PurpleAccount *account = purple_conversation_get_account(conv);
 
-	/* FIXME: action is not an int... */
+	purple_prpl_initiate_media(account,
+			purple_conversation_get_name(conv),
+			action == win->audio_call ? PURPLE_MEDIA_AUDIO :
+			action == win->video_call ? PURPLE_MEDIA_VIDEO :
+			action == win->audio_video_call ? PURPLE_MEDIA_AUDIO |
+			PURPLE_MEDIA_VIDEO : PURPLE_MEDIA_NONE);
+}
+#else
+menu_initiate_media_call_cb(gpointer data, guint action, GtkWidget *widget)
+{
+	PidginWindow *win = (PidginWindow *)data;
+	PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win);
+	PurpleAccount *account = purple_conversation_get_account(conv);
+
 	purple_prpl_initiate_media(account,
 			purple_conversation_get_name(conv),
 			action == 0 ? PURPLE_MEDIA_AUDIO :
@@ -1244,6 +1254,7 @@
 			PURPLE_MEDIA_VIDEO : PURPLE_MEDIA_NONE);
 }
 #endif
+#endif
 
 static void
 #if GTK_CHECK_VERSION(2,6,0)