changeset 26160:27b553a07800

Make the sinks better default sizes and display them immediately.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Mon, 02 Feb 2009 10:51:10 +0000
parents 46a6ba93c376
children 2b843d38d1f2
files pidgin/gtkmedia.c
diffstat 1 files changed, 5 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkmedia.c	Mon Feb 02 10:24:55 2009 +0000
+++ b/pidgin/gtkmedia.c	Mon Feb 02 10:51:10 2009 +0000
@@ -251,7 +251,7 @@
 	gtk_widget_show_all(media->priv->accept);
 	gtk_widget_show_all(media->priv->reject);
 
-	media->priv->display = gtk_vbox_new(TRUE, PIDGIN_HIG_BOX_SPACE);
+	media->priv->display = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
 	gtk_box_pack_start(GTK_BOX(vbox), media->priv->display,
 			TRUE, TRUE, PIDGIN_HIG_BOX_SPACE);
 	gtk_widget_show(vbox);
@@ -495,7 +495,7 @@
 		g_signal_connect(G_OBJECT(remote_video), "realize",
 				G_CALLBACK(realize_cb), data);
 		gtk_container_add(GTK_CONTAINER(plug), remote_video);
-		gtk_widget_set_size_request (GTK_WIDGET(remote_video), -1, 100);
+		gtk_widget_set_size_request (GTK_WIDGET(remote_video), 320, 240);
 		gtk_widget_show(remote_video);
 		gtk_widget_show(aspect);
 
@@ -536,7 +536,7 @@
 		g_signal_connect(G_OBJECT(local_video), "realize",
 				G_CALLBACK(realize_cb), data);
 		gtk_container_add(GTK_CONTAINER(plug), local_video);
-		gtk_widget_set_size_request (GTK_WIDGET(local_video), -1, 100);
+		gtk_widget_set_size_request (GTK_WIDGET(local_video), 160, 120);
 
 		gtk_widget_show(local_video);
 		gtk_widget_show(aspect);
@@ -591,6 +591,8 @@
 		pidgin_media_emit_message(gtkmedia, message);
 		g_free(message);
 	}
+
+	gtk_widget_show(gtkmedia->priv->display);
 }
 
 static void
@@ -613,15 +615,6 @@
 	} else if (type == PURPLE_MEDIA_STATE_CHANGED_NEW &&
 			sid != NULL && name != NULL) {
 		pidgin_media_ready_cb(media, gtkmedia, sid);
-	} else if (type == PURPLE_MEDIA_STATE_CHANGED_CONNECTED) {
-		GstElement *audiosendbin = NULL, *audiorecvbin = NULL;
-		GstElement *videosendbin = NULL, *videorecvbin = NULL;
-
-		purple_media_get_elements(media, &audiosendbin, &audiorecvbin,
-					  &videosendbin, &videorecvbin);
-
-		if (audiorecvbin || audiosendbin || videorecvbin || videosendbin)
-			gtk_widget_show(gtkmedia->priv->display);
 	}
 }