changeset 19228:7131e5699991

Two changes here 1. In gtk_request_fields(), if there are enough fields to justify the scrollbar, then add a 6 pixel padding around the inside of the scrolled window so that the fields aren't crammed in there like sardines. See /config in an XMPP chat, or Set User Info for an XMPP account to see what it's like. 2. In the same place, if the dialog is resized larger then have the widgets within the dialog expand to fill the extra space.
author Mark Doliner <mark@kingant.net>
date Mon, 13 Aug 2007 04:50:41 +0000
parents f0fc615c217d
children f1fb41d31c70
files pidgin/gtkrequest.c
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkrequest.c	Mon Aug 13 04:23:57 2007 +0000
+++ b/pidgin/gtkrequest.c	Mon Aug 13 04:50:41 2007 +0000
@@ -1107,7 +1107,7 @@
 
 	/* Setup the vbox */
 	vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER);
-	gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
 	gtk_widget_show(vbox);
 
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
@@ -1132,6 +1132,8 @@
 		total_fields += g_list_length(purple_request_field_group_get_fields(gl->data));
 
 	if(total_fields > 9) {
+		GtkWidget *hbox_for_spacing, *vbox_for_spacing;
+
 		sw = gtk_scrolled_window_new(NULL, NULL);
 		gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
 				GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
@@ -1141,8 +1143,19 @@
 		gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0);
 		gtk_widget_show(sw);
 
+		hbox_for_spacing = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER);
+		gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw),
+				hbox_for_spacing);
+		gtk_widget_show(hbox_for_spacing);
+
+		vbox_for_spacing = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER);
+		gtk_box_pack_start(GTK_BOX(hbox_for_spacing),
+				vbox_for_spacing, TRUE, TRUE, PIDGIN_HIG_BOX_SPACE);
+		gtk_widget_show(vbox_for_spacing);
+
 		vbox2 = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER);
-		gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), vbox2);
+		gtk_box_pack_start(GTK_BOX(vbox_for_spacing),
+				vbox2, TRUE, TRUE, PIDGIN_HIG_BOX_SPACE);
 		gtk_widget_show(vbox2);
 	} else {
 		vbox2 = vbox;