pidgin.vv: 1be21a88: Change the media window items' orientati...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Fri Jan 30 04:05:32 EST 2009


-----------------------------------------------------------------
Revision: 1be21a883e4ded65c863e546f0f14d8447cdd289
Ancestor: 603bb4b4fbde143586abdf5fe202fb10ee8d608e
Author: maiku at soc.pidgin.im
Date: 2009-01-30T07:59:37
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/1be21a883e4ded65c863e546f0f14d8447cdd289

Modified files:
        pidgin/gtkmedia.c

ChangeLog: 

Change the media window items' orientations to look better.

-------------- next part --------------
============================================================
--- pidgin/gtkmedia.c	633e9e189fd886957aa14039197b9a1c091ed21a
+++ pidgin/gtkmedia.c	71ca2c3e32c91d85dc3e76afa7b37b73ca46718a
@@ -186,12 +186,16 @@ pidgin_media_init (PidginMedia *media)
 static void
 pidgin_media_init (PidginMedia *media)
 {
-	GtkWidget *vbox;
+	GtkWidget *vbox, *hbox;
 	media->priv = PIDGIN_MEDIA_GET_PRIVATE(media);
 
 	vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
 	gtk_container_add(GTK_CONTAINER(media), vbox);
 
+	hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+	gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
+	gtk_widget_show(GTK_WIDGET(hbox));
+
 	media->priv->calling = gtk_label_new("Calling...");
 	media->priv->hangup = gtk_button_new_with_mnemonic("_Hangup");
 	media->priv->accept = gtk_button_new_with_mnemonic("_Accept");
@@ -201,11 +205,11 @@ pidgin_media_init (PidginMedia *media)
 	g_signal_connect(media->priv->mute, "toggled",
 			G_CALLBACK(pidgin_media_mute_toggled), media);
 
-	gtk_box_pack_end(GTK_BOX(vbox), media->priv->reject, FALSE, FALSE, 0);
-	gtk_box_pack_end(GTK_BOX(vbox), media->priv->accept, FALSE, FALSE, 0);
-	gtk_box_pack_end(GTK_BOX(vbox), media->priv->hangup, FALSE, FALSE, 0);
-	gtk_box_pack_end(GTK_BOX(vbox), media->priv->mute, FALSE, FALSE, 0);
-	gtk_box_pack_end(GTK_BOX(vbox), media->priv->calling, FALSE, FALSE, 0);
+	gtk_box_pack_end(GTK_BOX(hbox), media->priv->reject, FALSE, FALSE, 0);
+	gtk_box_pack_end(GTK_BOX(hbox), media->priv->accept, FALSE, FALSE, 0);
+	gtk_box_pack_end(GTK_BOX(hbox), media->priv->hangup, FALSE, FALSE, 0);
+	gtk_box_pack_end(GTK_BOX(hbox), media->priv->mute, FALSE, FALSE, 0);
+	gtk_box_pack_end(GTK_BOX(hbox), media->priv->calling, FALSE, FALSE, 0);
 
 	gtk_widget_show_all(media->priv->accept);
 	gtk_widget_show_all(media->priv->reject);
@@ -418,7 +422,7 @@ pidgin_media_ready_cb(PurpleMedia *media
 	if (gtkmedia->priv->recv_widget == NULL
 			&& type & (PURPLE_MEDIA_RECV_VIDEO |
 			PURPLE_MEDIA_RECV_AUDIO)) {
-		recv_widget = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);	
+		recv_widget = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);	
 		gtk_box_pack_start(GTK_BOX(gtkmedia->priv->display),
 				recv_widget, TRUE, TRUE, 0);
 		gtk_widget_show(recv_widget);
@@ -427,7 +431,7 @@ pidgin_media_ready_cb(PurpleMedia *media
 	if (gtkmedia->priv->send_widget == NULL
 			&& type & (PURPLE_MEDIA_SEND_VIDEO |
 			PURPLE_MEDIA_SEND_AUDIO)) {
-		send_widget = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
+		send_widget = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
 		gtk_box_pack_start(GTK_BOX(gtkmedia->priv->display),
 				send_widget, TRUE, TRUE, 0);
 		gtk_widget_show(send_widget);
@@ -467,7 +471,7 @@ pidgin_media_ready_cb(PurpleMedia *media
 		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), 100, -1);
+		gtk_widget_set_size_request (GTK_WIDGET(remote_video), -1, 100);
 		gtk_widget_show(remote_video);
 		gtk_widget_show(aspect);
 
@@ -506,7 +510,7 @@ pidgin_media_ready_cb(PurpleMedia *media
 		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), 100, -1);
+		gtk_widget_set_size_request (GTK_WIDGET(local_video), -1, 100);
 
 		gtk_widget_show(local_video);
 		gtk_widget_show(aspect);
@@ -516,18 +520,14 @@ pidgin_media_ready_cb(PurpleMedia *media
 
 	if (type & PURPLE_MEDIA_RECV_AUDIO) {
 		gtkmedia->priv->recv_progress = gtk_progress_bar_new();
-		gtk_widget_set_size_request(gtkmedia->priv->recv_progress, 10, 70);
-		gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(gtkmedia->priv->recv_progress),
-						 GTK_PROGRESS_BOTTOM_TO_TOP);
+		gtk_widget_set_size_request(gtkmedia->priv->recv_progress, 70, 10);
 		gtk_box_pack_end(GTK_BOX(recv_widget),
 				   gtkmedia->priv->recv_progress, FALSE, FALSE, 0);
 		gtk_widget_show(gtkmedia->priv->recv_progress);
 	}
 	if (type & PURPLE_MEDIA_SEND_AUDIO) {
 		gtkmedia->priv->send_progress = gtk_progress_bar_new();
-		gtk_widget_set_size_request(gtkmedia->priv->send_progress, 10, 70);
-		gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(gtkmedia->priv->send_progress),
-						 GTK_PROGRESS_BOTTOM_TO_TOP);
+		gtk_widget_set_size_request(gtkmedia->priv->send_progress, 70, 10);
 		gtk_box_pack_end(GTK_BOX(send_widget),
 				   gtkmedia->priv->send_progress, FALSE, FALSE, 0);
 		gtk_widget_show(gtkmedia->priv->send_progress);


More information about the Commits mailing list