changeset 27550:710cbace0076

Do not show hidden request fields.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 15 Jul 2009 06:35:19 +0000
parents b20d83875771
children 60fe5b2ded6f
files finch/gntrequest.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntrequest.c	Wed Jul 15 06:13:23 2009 +0000
+++ b/finch/gntrequest.c	Wed Jul 15 06:35:19 2009 +0000
@@ -317,6 +317,8 @@
 		{
 			PurpleRequestField *field = fields->data;
 			PurpleRequestFieldType type = purple_request_field_get_type(field);
+			if (!purple_request_field_is_visible(field))
+				continue;
 			if (type == PURPLE_REQUEST_FIELD_BOOLEAN)
 			{
 				GntWidget *check = FINCH_GET_DATA(field);
@@ -598,11 +600,13 @@
 
 		for (; fields ; fields = fields->next)
 		{
-			/* XXX: Break each of the fields into a separate function? */
 			PurpleRequestField *field = fields->data;
 			PurpleRequestFieldType type = purple_request_field_get_type(field);
 			const char *label = purple_request_field_get_label(field);
 
+			if (!purple_request_field_is_visible(field))
+				continue;
+
 			hbox = gnt_hbox_new(TRUE);   /* hrm */
 			gnt_box_add_widget(GNT_BOX(box), hbox);