# HG changeset patch
# Node ID 61b419df225f
# Parent  a74103355a4f
diff --git a/finch/gntrequest.c b/finch/gntrequest.c
--- a/finch/gntrequest.c
+++ b/finch/gntrequest.c
@@ -293,12 +293,12 @@ request_fields_cb(GntWidget *button, Pur
 			PurpleRequestFieldType type = purple_request_field_get_field_type(field);
 			if (!purple_request_field_is_visible(field))
 				continue;
-			if (type == PURPLE_REQUEST_FIELD_BOOLEAN)
-			{
+			if(PURPLE_IS_REQUEST_FIELD_BOOL(field)) {
 				GntWidget *check = g_object_get_data(G_OBJECT(field),
 				                                     "finch-ui-data");
 				gboolean value = gnt_check_box_get_checked(GNT_CHECK_BOX(check));
-				purple_request_field_bool_set_value(field, value);
+				purple_request_field_bool_set_value(PURPLE_REQUEST_FIELD_BOOL(field),
+				                                    value);
 			} else if(PURPLE_IS_REQUEST_FIELD_STRING(field)) {
 				GntWidget *entry = g_object_get_data(G_OBJECT(field),
 				                                     "finch-ui-data");
@@ -416,10 +416,11 @@ update_selected_account(GntEntry *userna
 static GntWidget*
 create_boolean_field(PurpleRequestField *field)
 {
+	PurpleRequestFieldBool *boolfield = PURPLE_REQUEST_FIELD_BOOL(field);
 	const char *label = purple_request_field_get_label(field);
 	GntWidget *check = gnt_check_box_new(label);
 	gnt_check_box_set_checked(GNT_CHECK_BOX(check),
-			purple_request_field_bool_get_default_value(field));
+			purple_request_field_bool_get_default_value(boolfield));
 	return check;
 }
 
@@ -649,8 +650,7 @@ finch_request_fields(const char *title, 
 			hbox = gnt_hbox_new(TRUE);   /* hrm */
 			gnt_box_add_widget(GNT_BOX(box), hbox);
 
-			if (type != PURPLE_REQUEST_FIELD_BOOLEAN && label)
-			{
+			if(!PURPLE_IS_REQUEST_FIELD_BOOL(field) && label) {
 				GntWidget *l;
 				if (purple_request_field_is_required(field))
 					l = gnt_label_new_with_format(label, GNT_TEXT_FLAG_UNDERLINE);
@@ -660,7 +660,7 @@ finch_request_fields(const char *title, 
 				gnt_box_add_widget(GNT_BOX(hbox), l);
 			}
 
-			if (type == PURPLE_REQUEST_FIELD_BOOLEAN) {
+			if(PURPLE_IS_REQUEST_FIELD_BOOL(field)) {
 				widget = create_boolean_field(field);
 			} else if(PURPLE_IS_REQUEST_FIELD_STRING(field)) {
 				widget = create_string_field(field, &username);
@@ -873,7 +873,10 @@ finch_request_save_in_prefs(G_GNUC_UNUSE
 			gpointer val = NULL;
 			const char *id = purple_request_field_get_id(field);
 
-			if(PURPLE_IS_REQUEST_FIELD_STRING(field)) {
+			if(PURPLE_IS_REQUEST_FIELD_BOOL(field)) {
+				PurpleRequestFieldBool *bfield = PURPLE_REQUEST_FIELD_BOOL(field);
+				val = GINT_TO_POINTER(purple_request_field_bool_get_value(bfield));
+			} else if(PURPLE_IS_REQUEST_FIELD_STRING(field)) {
 				PurpleRequestFieldString *sfield = PURPLE_REQUEST_FIELD_STRING(field);
 				val = (gpointer)purple_request_field_string_get_value(sfield);
 			} else {
@@ -882,9 +885,6 @@ finch_request_save_in_prefs(G_GNUC_UNUSE
 					val = purple_request_field_list_get_selected(field)->data;
 					val = purple_request_field_list_get_data(field, val);
 					break;
-				case PURPLE_REQUEST_FIELD_BOOLEAN:
-					val = GINT_TO_POINTER(purple_request_field_bool_get_value(field));
-					break;
 				case PURPLE_REQUEST_FIELD_INTEGER:
 					val = GINT_TO_POINTER(purple_request_field_int_get_value(field));
 					break;
@@ -922,15 +922,14 @@ finch_request_save_in_prefs(G_GNUC_UNUSE
 GntWidget *finch_request_field_get_widget(PurpleRequestField *field)
 {
 	GntWidget *ret = NULL;
-	if(PURPLE_IS_REQUEST_FIELD_STRING(field)) {
+	if(PURPLE_IS_REQUEST_FIELD_BOOL(field)) {
+		ret = create_boolean_field(field);
+	} else if(PURPLE_IS_REQUEST_FIELD_STRING(field)) {
 		ret = create_string_field(field, NULL);
 	} else if(PURPLE_IS_REQUEST_FIELD_ACCOUNT(field)) {
 		ret = create_account_field(field);
 	} else {
 	switch (purple_request_field_get_field_type(field)) {
-		case PURPLE_REQUEST_FIELD_BOOLEAN:
-			ret = create_boolean_field(field);
-			break;
 		case PURPLE_REQUEST_FIELD_INTEGER:
 			ret = create_integer_field(field);
 			break;
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -38,6 +38,7 @@
 #include "purpleprotocolmanager.h"
 #include "purpleprotocolserver.h"
 #include "request.h"
+#include "request/purplerequestfieldbool.h"
 #include "request/purplerequestfieldstring.h"
 #include "server.h"
 #include "signals.h"
diff --git a/libpurple/meson.build b/libpurple/meson.build
--- a/libpurple/meson.build
+++ b/libpurple/meson.build
@@ -98,6 +98,7 @@ purple_coresources = [
 	'queuedoutputstream.c',
 	'request.c',
 	'request/purplerequestfieldaccount.c',
+	'request/purplerequestfieldbool.c',
 	'request/purplerequestfieldstring.c',
 	'request-datasheet.c',
 	'roomlist.c',
@@ -223,6 +224,7 @@ purple_coreheaders = [
 
 purple_request_headers = [
 	'request/purplerequestfieldaccount.h',
+	'request/purplerequestfieldbool.h',
 	'request/purplerequestfieldstring.h',
 ]
 
diff --git a/libpurple/protocols/jabber/xdata.c b/libpurple/protocols/jabber/xdata.c
--- a/libpurple/protocols/jabber/xdata.c
+++ b/libpurple/protocols/jabber/xdata.c
@@ -130,13 +130,17 @@ jabber_x_data_ok_cb(struct jabber_x_data
 					}
 					break;
 				case JABBER_X_DATA_BOOLEAN:
+					{
+					PurpleRequestFieldBool *bfield = PURPLE_REQUEST_FIELD_BOOL(field);
 					fieldnode = purple_xmlnode_new_child(result, "field");
 					purple_xmlnode_set_attrib(fieldnode, "var", id);
 					valuenode = purple_xmlnode_new_child(fieldnode, "value");
-					if(purple_request_field_bool_get_value(field))
+					if(purple_request_field_bool_get_value(bfield)) {
 						purple_xmlnode_insert_data(valuenode, "1", -1);
-					else
+					} else {
 						purple_xmlnode_insert_data(valuenode, "0", -1);
+					}
+					}
 					break;
 				case JABBER_X_DATA_IGNORE:
 					break;
diff --git a/libpurple/purplerequestfield.h b/libpurple/purplerequestfield.h
--- a/libpurple/purplerequestfield.h
+++ b/libpurple/purplerequestfield.h
@@ -65,7 +65,6 @@ struct _PurpleRequestFieldClass {
  * PurpleRequestFieldType:
  * @PURPLE_REQUEST_FIELD_NONE: No field.
  * @PURPLE_REQUEST_FIELD_INTEGER: Integer field.
- * @PURPLE_REQUEST_FIELD_BOOLEAN: Boolean field.
  * @PURPLE_REQUEST_FIELD_CHOICE: Choice field (dropdown?).
  * @PURPLE_REQUEST_FIELD_LIST: List field.
  * @PURPLE_REQUEST_FIELD_LABEL: Label field.
@@ -78,7 +77,6 @@ typedef enum
 {
 	PURPLE_REQUEST_FIELD_NONE,
 	PURPLE_REQUEST_FIELD_INTEGER,
-	PURPLE_REQUEST_FIELD_BOOLEAN,
 	PURPLE_REQUEST_FIELD_CHOICE,
 	PURPLE_REQUEST_FIELD_LIST,
 	PURPLE_REQUEST_FIELD_LABEL,
@@ -413,66 +411,6 @@ int purple_request_field_int_get_upper_b
 int purple_request_field_int_get_value(PurpleRequestField *field);
 
 /**************************************************************************/
-/* Boolean Field API                                                      */
-/**************************************************************************/
-
-/**
- * purple_request_field_bool_new:
- * @id:            The field ID.
- * @text:          The text label of the field.
- * @default_value: The default value.
- *
- * Creates a boolean field.
- *
- * This is often represented as a checkbox.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *purple_request_field_bool_new(const char *id,
-											  const char *text,
-											  gboolean default_value);
-
-/**
- * purple_request_field_bool_set_default_value:
- * @field:         The field.
- * @default_value: The default value.
- *
- * Sets the default value in an boolean field.
- */
-void purple_request_field_bool_set_default_value(PurpleRequestField *field,
-											   gboolean default_value);
-
-/**
- * purple_request_field_bool_set_value:
- * @field: The field.
- * @value: The value.
- *
- * Sets the value in an boolean field.
- */
-void purple_request_field_bool_set_value(PurpleRequestField *field,
-									   gboolean value);
-
-/**
- * purple_request_field_bool_get_default_value:
- * @field: The field.
- *
- * Returns the default value in an boolean field.
- *
- * Returns: The default value.
- */
-gboolean purple_request_field_bool_get_default_value(PurpleRequestField *field);
-
-/**
- * purple_request_field_bool_get_value:
- * @field: The field.
- *
- * Returns the user-entered value in an boolean field.
- *
- * Returns: The value.
- */
-gboolean purple_request_field_bool_get_value(PurpleRequestField *field);
-
-/**************************************************************************/
 /* Choice Field API                                                       */
 /**************************************************************************/
 
diff --git a/libpurple/purplerequestfield.h b/libpurple/request/purplerequestfieldbool.h
copy from libpurple/purplerequestfield.h
copy to libpurple/request/purplerequestfieldbool.h
--- a/libpurple/purplerequestfield.h
+++ b/libpurple/request/purplerequestfieldbool.h
@@ -24,8 +24,8 @@
 # error "only <purple.h> may be included directly"
 #endif
 
-#ifndef PURPLE_REQUEST_FIELD_H
-#define PURPLE_REQUEST_FIELD_H
+#ifndef PURPLE_REQUEST_FIELD_BOOL_H
+#define PURPLE_REQUEST_FIELD_BOOL_H
 
 #include <stdlib.h>
 
@@ -33,388 +33,19 @@
 #include <glib-object.h>
 
 /**
- * PurpleRequestField:
- *
- * A request field.
- */
-typedef struct _PurpleRequestField PurpleRequestField;
-
-#include "request.h"
-#include "request-datasheet.h"
-
-#define PURPLE_DEFAULT_ACTION_NONE	-1
-
-/**
- * PurpleRequestFieldClass:
+ * PurpleRequestFieldBool:
  *
- * #PurpleRequestFieldClass defines the interface for a request field.
- *
- * Since: 3.0.0
+ * A boolean request field.
  */
-struct _PurpleRequestFieldClass {
-	/*< private >*/
-	GObjectClass parent_class;
-
-	/*< public >*/
-
-	/*< private >*/
-	gpointer reserved[4];
-};
+typedef struct _PurpleRequestFieldBool PurpleRequestFieldBool;
 
-/**
- * PurpleRequestFieldType:
- * @PURPLE_REQUEST_FIELD_NONE: No field.
- * @PURPLE_REQUEST_FIELD_INTEGER: Integer field.
- * @PURPLE_REQUEST_FIELD_BOOLEAN: Boolean field.
- * @PURPLE_REQUEST_FIELD_CHOICE: Choice field (dropdown?).
- * @PURPLE_REQUEST_FIELD_LIST: List field.
- * @PURPLE_REQUEST_FIELD_LABEL: Label field.
- * @PURPLE_REQUEST_FIELD_IMAGE: Image field.
- * @PURPLE_REQUEST_FIELD_DATASHEET: Datasheet field.
- *
- * A type of field.
- */
-typedef enum
-{
-	PURPLE_REQUEST_FIELD_NONE,
-	PURPLE_REQUEST_FIELD_INTEGER,
-	PURPLE_REQUEST_FIELD_BOOLEAN,
-	PURPLE_REQUEST_FIELD_CHOICE,
-	PURPLE_REQUEST_FIELD_LIST,
-	PURPLE_REQUEST_FIELD_LABEL,
-	PURPLE_REQUEST_FIELD_IMAGE,
-	PURPLE_REQUEST_FIELD_DATASHEET
-
-} PurpleRequestFieldType;
-
-typedef gboolean (*PurpleRequestFieldValidator)(PurpleRequestField *field,
-	gchar **errmsg, gpointer user_data);
+#include "purplerequestfield.h"
 
 G_BEGIN_DECLS
 
-/**************************************************************************/
-/* Field API                                                              */
-/**************************************************************************/
-
-#define PURPLE_TYPE_REQUEST_FIELD (purple_request_field_get_type())
-G_DECLARE_DERIVABLE_TYPE(PurpleRequestField, purple_request_field,
-                         PURPLE, REQUEST_FIELD, GObject)
-
-/**
- * purple_request_field_new:
- * @id:   The field ID.
- * @text: The text label of the field.
- * @type: The type of field.
- *
- * Creates a field of the specified type.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *purple_request_field_new(const char *id, const char *text,
-										 PurpleRequestFieldType type);
-
-/**
- * purple_request_field_set_label:
- * @field: The field.
- * @label: The text label.
- *
- * Sets the label text of a field.
- */
-void purple_request_field_set_label(PurpleRequestField *field, const char *label);
-
-/**
- * purple_request_field_set_visible:
- * @field:   The field.
- * @visible: TRUE if visible, or FALSE if not.
- *
- * Sets whether or not a field is visible.
- */
-void purple_request_field_set_visible(PurpleRequestField *field, gboolean visible);
-
-/**
- * purple_request_field_set_type_hint:
- * @field:     The field.
- * @type_hint: The type hint.
- *
- * Sets the type hint for the field.
- *
- * This is optionally used by the UIs to provide such features as
- * auto-completion for type hints like "account" and "screenname".
- */
-void purple_request_field_set_type_hint(PurpleRequestField *field,
-									  const char *type_hint);
-
-/**
- * purple_request_field_set_tooltip:
- * @field:     The field.
- * @tooltip:   The tooltip text.
- *
- * Sets the tooltip for the field.
- *
- * This is optionally used by the UIs to provide a tooltip for
- * the field.
- */
-void purple_request_field_set_tooltip(PurpleRequestField *field,
-									const char *tooltip);
-
-/**
- * purple_request_field_set_required:
- * @field:    The field.
- * @required: TRUE if required, or FALSE.
- *
- * Sets whether or not a field is required.
- */
-void purple_request_field_set_required(PurpleRequestField *field,
-									 gboolean required);
-
-/**
- * purple_request_field_get_field_type:
- * @field: The field.
- *
- * Returns the type of a field.
- *
- * Returns: The field's type.
- */
-PurpleRequestFieldType purple_request_field_get_field_type(PurpleRequestField *field);
-
-/**
- * purple_request_field_get_group:
- * @field: The field.
- *
- * Returns the group for the field.
- *
- * Returns: (transfer none): The UI data.
- */
-PurpleRequestGroup *purple_request_field_get_group(PurpleRequestField *field);
-
-/**
- * purple_request_field_get_id:
- * @field: The field.
- *
- * Returns the ID of a field.
- *
- * Returns: The ID
- */
-const char *purple_request_field_get_id(PurpleRequestField *field);
-
-/**
- * purple_request_field_get_label:
- * @field: The field.
- *
- * Returns the label text of a field.
- *
- * Returns: The label text.
- */
-const char *purple_request_field_get_label(PurpleRequestField *field);
-
-/**
- * purple_request_field_is_visible:
- * @field: The field.
- *
- * Returns whether or not a field is visible.
- *
- * Returns: TRUE if the field is visible. FALSE otherwise.
- */
-gboolean purple_request_field_is_visible(PurpleRequestField *field);
-
-/**
- * purple_request_field_get_type_hint:
- * @field: The field.
- *
- * Returns the field's type hint.
- *
- * Returns: The field's type hint.
- */
-const char *purple_request_field_get_type_hint(PurpleRequestField *field);
-
-/**
- * purple_request_field_get_tooltip:
- * @field: The field.
- *
- * Returns the field's tooltip.
- *
- * Returns: The field's tooltip.
- */
-const char *purple_request_field_get_tooltip(PurpleRequestField *field);
-
-/**
- * purple_request_field_is_required:
- * @field: The field.
- *
- * Returns whether or not a field is required.
- *
- * Returns: TRUE if the field is required, or FALSE.
- */
-gboolean purple_request_field_is_required(PurpleRequestField *field);
-
-/**
- * purple_request_field_is_filled:
- * @field: The field.
- *
- * Checks, if specified field has value.
- *
- * Returns: TRUE if the field has value, or FALSE.
- */
-gboolean purple_request_field_is_filled(PurpleRequestField *field);
-
-/**
- * purple_request_field_set_validator:
- * @field:     The field.
- * @validator: (scope notified): The validator callback, NULL to disable validation.
- * @user_data: The data to pass to the callback.
- *
- * Sets validator for a single field.
- */
-void purple_request_field_set_validator(PurpleRequestField *field,
-	PurpleRequestFieldValidator validator, void *user_data);
-
-/**
- * purple_request_field_is_validatable:
- * @field: The field.
- *
- * Returns whether or not field has validator set.
- *
- * Returns: TRUE if the field has validator, or FALSE.
- */
-gboolean purple_request_field_is_validatable(PurpleRequestField *field);
-
-/**
- * purple_request_field_is_valid:
- * @field:  The field.
- * @errmsg: If non-NULL, the memory area, where the pointer to validation
- *         failure message will be set.
- *
- * Checks, if specified field is valid.
- *
- * If detailed message about failure reason is needed, there is an option to
- * return (via errmsg argument) pointer to newly allocated error message.
- * It must be freed with g_free after use.
- *
- * Note: empty, not required fields are valid.
- *
- * Returns: TRUE, if the field is valid, FALSE otherwise.
- */
-gboolean purple_request_field_is_valid(PurpleRequestField *field, gchar **errmsg);
-
-/**
- * purple_request_field_set_sensitive:
- * @field:     The field.
- * @sensitive: TRUE if the field should be sensitive for user input.
- *
- * Sets field editable.
- */
-void purple_request_field_set_sensitive(PurpleRequestField *field,
-	gboolean sensitive);
-
-/**
- * purple_request_field_is_sensitive:
- * @field: The field.
- *
- * Checks, if field is editable.
- *
- * Returns: TRUE, if the field is sensitive for user input.
- */
-gboolean purple_request_field_is_sensitive(PurpleRequestField *field);
-
-/**************************************************************************/
-/* Integer Field API                                                      */
-/**************************************************************************/
-
-/**
- * purple_request_field_int_new:
- * @id:            The field ID.
- * @text:          The text label of the field.
- * @default_value: The default value.
- * @lower_bound:   The lower bound.
- * @upper_bound:   The upper bound.
- *
- * Creates an integer field.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *purple_request_field_int_new(const char *id,
-	const char *text, int default_value, int lower_bound, int upper_bound);
-
-/**
- * purple_request_field_int_set_default_value:
- * @field:         The field.
- * @default_value: The default value.
- *
- * Sets the default value in an integer field.
- */
-void purple_request_field_int_set_default_value(PurpleRequestField *field,
-											  int default_value);
-
-/**
- * purple_request_field_int_set_lower_bound:
- * @field:       The field.
- * @lower_bound: The lower bound.
- *
- * Sets the lower bound in an integer field.
- */
-void purple_request_field_int_set_lower_bound(PurpleRequestField *field, int lower_bound);
-
-/**
- * purple_request_field_int_set_upper_bound:
- * @field:       The field.
- * @upper_bound: The upper bound.
- *
- * Sets the upper bound in an integer field.
- */
-void purple_request_field_int_set_upper_bound(PurpleRequestField *field, int upper_bound);
-
-/**
- * purple_request_field_int_set_value:
- * @field: The field.
- * @value: The value.
- *
- * Sets the value in an integer field.
- */
-void purple_request_field_int_set_value(PurpleRequestField *field, int value);
-
-/**
- * purple_request_field_int_get_default_value:
- * @field: The field.
- *
- * Returns the default value in an integer field.
- *
- * Returns: The default value.
- */
-int purple_request_field_int_get_default_value(PurpleRequestField *field);
-
-/**
- * purple_request_field_int_get_lower_bound:
- * @field: The field.
- *
- * Returns the lower bound in an integer field.
- *
- * Returns: The lower bound.
- */
-int purple_request_field_int_get_lower_bound(PurpleRequestField *field);
-
-/**
- * purple_request_field_int_get_upper_bound:
- * @field: The field.
- *
- * Returns the upper bound in an integer field.
- *
- * Returns: The upper bound.
- */
-int purple_request_field_int_get_upper_bound(PurpleRequestField *field);
-
-/**
- * purple_request_field_int_get_value:
- * @field: The field.
- *
- * Returns the user-entered value in an integer field.
- *
- * Returns: The value.
- */
-int purple_request_field_int_get_value(PurpleRequestField *field);
-
-/**************************************************************************/
-/* Boolean Field API                                                      */
-/**************************************************************************/
+#define PURPLE_TYPE_REQUEST_FIELD_BOOL (purple_request_field_bool_get_type())
+G_DECLARE_FINAL_TYPE(PurpleRequestFieldBool, purple_request_field_bool,
+                     PURPLE, REQUEST_FIELD_BOOL, PurpleRequestField)
 
 /**
  * purple_request_field_bool_new:
@@ -428,9 +59,7 @@ int purple_request_field_int_get_value(P
  *
  * Returns: (transfer full): The new field.
  */
-PurpleRequestField *purple_request_field_bool_new(const char *id,
-											  const char *text,
-											  gboolean default_value);
+PurpleRequestField *purple_request_field_bool_new(const char *id, const char *text, gboolean default_value);
 
 /**
  * purple_request_field_bool_set_default_value:
@@ -439,8 +68,7 @@ PurpleRequestField *purple_request_field
  *
  * Sets the default value in an boolean field.
  */
-void purple_request_field_bool_set_default_value(PurpleRequestField *field,
-											   gboolean default_value);
+void purple_request_field_bool_set_default_value(PurpleRequestFieldBool *field, gboolean default_value);
 
 /**
  * purple_request_field_bool_set_value:
@@ -449,8 +77,7 @@ void purple_request_field_bool_set_defau
  *
  * Sets the value in an boolean field.
  */
-void purple_request_field_bool_set_value(PurpleRequestField *field,
-									   gboolean value);
+void purple_request_field_bool_set_value(PurpleRequestFieldBool *field, gboolean value);
 
 /**
  * purple_request_field_bool_get_default_value:
@@ -460,7 +87,7 @@ void purple_request_field_bool_set_value
  *
  * Returns: The default value.
  */
-gboolean purple_request_field_bool_get_default_value(PurpleRequestField *field);
+gboolean purple_request_field_bool_get_default_value(PurpleRequestFieldBool *field);
 
 /**
  * purple_request_field_bool_get_value:
@@ -470,390 +97,8 @@ gboolean purple_request_field_bool_get_d
  *
  * Returns: The value.
  */
-gboolean purple_request_field_bool_get_value(PurpleRequestField *field);
-
-/**************************************************************************/
-/* Choice Field API                                                       */
-/**************************************************************************/
-
-/**
- * purple_request_field_choice_new:
- * @id:            The field ID.
- * @text:          The optional label of the field.
- * @default_value: The default choice.
- *
- * Creates a multiple choice field.
- *
- * This is often represented as a group of radio buttons.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *
-purple_request_field_choice_new(const char *id, const char *text,
-	gpointer default_value);
-
-/**
- * purple_request_field_choice_add:
- * @field: The choice field.
- * @label: The choice label.
- * @data:  The choice value.
- *
- * Adds a choice to a multiple choice field.
- */
-void
-purple_request_field_choice_add(PurpleRequestField *field, const char *label,
-	gpointer data);
-
-/**
- * purple_request_field_choice_add_full:
- * @field: The choice field.
- * @label: The choice label.
- * @data:  The choice value.
- * @destroy: The value destroy function.
- *
- * Adds a choice to a multiple choice field with destructor for value.
- *
- * Since: 3.0.0
- */
-void
-purple_request_field_choice_add_full(PurpleRequestField *field, const char *label,
-                                     gpointer data, GDestroyNotify destroy);
-
-/**
- * purple_request_field_choice_set_default_value:
- * @field:         The field.
- * @default_value: The default value.
- *
- * Sets the default value in an choice field.
- */
-void
-purple_request_field_choice_set_default_value(PurpleRequestField *field,
-	gpointer default_value);
-
-/**
- * purple_request_field_choice_set_value:
- * @field: The field.
- * @value: The value.
- *
- * Sets the value in an choice field.
- */
-void
-purple_request_field_choice_set_value(PurpleRequestField *field,
-	gpointer value);
-
-/**
- * purple_request_field_choice_get_default_value:
- * @field: The field.
- *
- * Returns the default value in an choice field.
- *
- * Returns: The default value.
- */
-gpointer
-purple_request_field_choice_get_default_value(PurpleRequestField *field);
-
-/**
- * purple_request_field_choice_get_value:
- * @field: The field.
- *
- * Returns the user-entered value in an choice field.
- *
- * Returns: The value.
- */
-gpointer
-purple_request_field_choice_get_value(PurpleRequestField *field);
-
-/**
- * purple_request_field_choice_get_elements:
- * @field: The field.
- *
- * Returns a list of elements in a choice field.
- *
- * Returns: (element-type PurpleKeyValuePair) (transfer none): The list of pairs of {label, value}.
- */
-GList *
-purple_request_field_choice_get_elements(PurpleRequestField *field);
-
-/**************************************************************************/
-/* List Field API                                                         */
-/**************************************************************************/
-
-/**
- * purple_request_field_list_new:
- * @id:   The field ID.
- * @text: The optional label of the field.
- *
- * Creates a multiple list item field.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *purple_request_field_list_new(const char *id, const char *text);
-
-/**
- * purple_request_field_list_set_multi_select:
- * @field:        The list field.
- * @multi_select: TRUE if multiple selection is enabled,
- *                     or FALSE otherwise.
- *
- * Sets whether or not a list field allows multiple selection.
- */
-void purple_request_field_list_set_multi_select(PurpleRequestField *field,
-											  gboolean multi_select);
-
-/**
- * purple_request_field_list_get_multi_select:
- * @field: The list field.
- *
- * Returns whether or not a list field allows multiple selection.
- *
- * Returns: TRUE if multiple selection is enabled, or FALSE otherwise.
- */
-gboolean purple_request_field_list_get_multi_select(PurpleRequestField *field);
-
-/**
- * purple_request_field_list_get_data:
- * @field: The list field.
- * @text:  The item text.
- *
- * Returns the data for a particular item.
- *
- * Returns: The data associated with the item.
- */
-void *purple_request_field_list_get_data(PurpleRequestField *field, const char *text);
-
-/**
- * purple_request_field_list_add_icon:
- * @field:     The list field.
- * @item:      The list item.
- * @icon_path: The path to icon file, or %NULL for no icon.
- * @data:      The associated data.
- *
- * Adds an item to a list field.
- */
-void purple_request_field_list_add_icon(PurpleRequestField *field,
-								 const char *item, const char* icon_path, void* data);
-
-/**
- * purple_request_field_list_add_selected:
- * @field: The field.
- * @item:  The item to add.
- *
- * Adds a selected item to the list field.
- */
-void purple_request_field_list_add_selected(PurpleRequestField *field,
-										  const char *item);
-
-/**
- * purple_request_field_list_clear_selected:
- * @field: The field.
- *
- * Clears the list of selected items in a list field.
- */
-void purple_request_field_list_clear_selected(PurpleRequestField *field);
-
-/**
- * purple_request_field_list_set_selected:
- * @field: The field.
- * @items: (element-type utf8) (transfer none): The list of selected items.
- *
- * Sets a list of selected items in a list field.
- */
-void purple_request_field_list_set_selected(PurpleRequestField *field,
-										  GList *items);
-
-/**
- * purple_request_field_list_is_selected:
- * @field: The field.
- * @item:  The item.
- *
- * Returns whether or not a particular item is selected in a list field.
- *
- * Returns: TRUE if the item is selected. FALSE otherwise.
- */
-gboolean purple_request_field_list_is_selected(PurpleRequestField *field, const char *item);
-
-/**
- * purple_request_field_list_get_selected:
- * @field: The field.
- *
- * Returns a list of selected items in a list field.
- *
- * To retrieve the data for each item, use
- * purple_request_field_list_get_data().
- *
- * Returns: (element-type utf8) (transfer none): The list of selected items.
- */
-GList *purple_request_field_list_get_selected(PurpleRequestField *field);
-
-/**
- * purple_request_field_list_get_items:
- * @field: The field.
- *
- * Returns a list of items in a list field.
- *
- * Returns: (element-type PurpleKeyValuePair) (transfer none): The list of items.
- */
-GList *purple_request_field_list_get_items(PurpleRequestField *field);
-
-/**
- * purple_request_field_list_has_icons:
- * @field: The field.
- *
- * Indicates if list field has icons.
- *
- * Returns: TRUE if list field has icons, FALSE otherwise.
- *
- * Since: 3.0.0
- */
-gboolean purple_request_field_list_has_icons(PurpleRequestField *field);
-
-/**************************************************************************/
-/* Label Field API                                                        */
-/**************************************************************************/
-
-/**
- * purple_request_field_label_new:
- * @id:   The field ID.
- * @text: The label of the field.
- *
- * Creates a label field.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *purple_request_field_label_new(const char *id,
-											   const char *text);
-
-/**************************************************************************/
-/* Image Field API                                                        */
-/**************************************************************************/
-
-/**
- * purple_request_field_image_new:
- * @id:   The field ID.
- * @text: The label of the field.
- * @buf:  The image data.
- * @size: The size of the data in @buf.
- *
- * Creates an image field.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *purple_request_field_image_new(const char *id, const char *text,
-											   const char *buf, gsize size);
-
-/**
- * purple_request_field_image_set_scale:
- * @field: The image field.
- * @x:     The x scale factor.
- * @y:     The y scale factor.
- *
- * Sets the scale factors of an image field.
- */
-void purple_request_field_image_set_scale(PurpleRequestField *field, unsigned int x, unsigned int y);
-
-/**
- * purple_request_field_image_get_buffer:
- * @field: The image field.
- *
- * Returns pointer to the image.
- *
- * Returns: Pointer to the image.
- */
-const char *purple_request_field_image_get_buffer(PurpleRequestField *field);
-
-/**
- * purple_request_field_image_get_size:
- * @field: The image field.
- *
- * Returns size (in bytes) of the image.
- *
- * Returns: Size of the image.
- */
-gsize purple_request_field_image_get_size(PurpleRequestField *field);
-
-/**
- * purple_request_field_image_get_scale_x:
- * @field: The image field.
- *
- * Returns X scale coefficient of the image.
- *
- * Returns: X scale coefficient of the image.
- */
-unsigned int purple_request_field_image_get_scale_x(PurpleRequestField *field);
-
-/**
- * purple_request_field_image_get_scale_y:
- * @field: The image field.
- *
- * Returns Y scale coefficient of the image.
- *
- * Returns: Y scale coefficient of the image.
- */
-unsigned int purple_request_field_image_get_scale_y(PurpleRequestField *field);
-
-/**************************************************************************/
-/* Datasheet Field API                                                    */
-/**************************************************************************/
-
-/**
- * purple_request_field_datasheet_new:
- * @id:    The field ID.
- * @text:  The label of the field, may be %NULL.
- * @sheet: The datasheet.
- *
- * Creates a datasheet item field.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *purple_request_field_datasheet_new(const char *id,
-	const gchar *text, PurpleRequestDatasheet *sheet);
-
-/**
- * purple_request_field_datasheet_get_sheet:
- * @field: The field.
- *
- * Returns a datasheet for a field.
- *
- * Returns: (transfer none): The datasheet object.
- */
-PurpleRequestDatasheet *purple_request_field_datasheet_get_sheet(
-	PurpleRequestField *field);
-
-/**************************************************************************/
-/* Validators for request fields.                                         */
-/**************************************************************************/
-
-/**
- * purple_request_field_email_validator:
- * @field: The field.
- * @errmsg: (out) (optional): destination for error message.
- * @user_data: Ignored.
- *
- * Validates a field which should contain an email address.
- *
- * See purple_request_field_set_validator().
- *
- * Returns: TRUE, if field contains valid email address.
- */
-gboolean purple_request_field_email_validator(PurpleRequestField *field,
-	gchar **errmsg, void *user_data);
-
-/**
- * purple_request_field_alphanumeric_validator:
- * @field: The field.
- * @errmsg: (allow-none): destination for error message.
- * @allowed_characters: (allow-none): allowed character list
- *                      (NULL-terminated string).
- *
- * Validates a field which should contain alphanumeric content.
- *
- * See purple_request_field_set_validator().
- *
- * Returns: TRUE, if field contains only alphanumeric characters.
- */
-gboolean purple_request_field_alphanumeric_validator(PurpleRequestField *field,
-	gchar **errmsg, void *allowed_characters);
+gboolean purple_request_field_bool_get_value(PurpleRequestFieldBool *field);
 
 G_END_DECLS
 
-#endif /* PURPLE_REQUEST_FIELD_H */
+#endif /* PURPLE_REQUEST_FIELD_BOOL_H */
diff --git a/libpurple/purplerequestfield.c b/libpurple/purplerequestfield.c
--- a/libpurple/purplerequestfield.c
+++ b/libpurple/purplerequestfield.c
@@ -49,11 +49,6 @@ typedef struct {
 		} integer;
 
 		struct {
-			gboolean default_value;
-			gboolean value;
-		} boolean;
-
-		struct {
 			gpointer default_value;
 			gpointer value;
 
@@ -802,74 +797,6 @@ purple_request_field_int_get_value(Purpl
 }
 
 PurpleRequestField *
-purple_request_field_bool_new(const char *id, const char *text,
-							gboolean default_value)
-{
-	PurpleRequestField *field;
-
-	g_return_val_if_fail(id   != NULL, NULL);
-	g_return_val_if_fail(text != NULL, NULL);
-
-	field = purple_request_field_new(id, text, PURPLE_REQUEST_FIELD_BOOLEAN);
-
-	purple_request_field_bool_set_default_value(field, default_value);
-	purple_request_field_bool_set_value(field, default_value);
-
-	return field;
-}
-
-void
-purple_request_field_bool_set_default_value(PurpleRequestField *field,
-										  gboolean default_value)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_BOOLEAN);
-
-	priv->u.boolean.default_value = default_value;
-}
-
-void
-purple_request_field_bool_set_value(PurpleRequestField *field, gboolean value)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_BOOLEAN);
-
-	priv->u.boolean.value = value;
-}
-
-gboolean
-purple_request_field_bool_get_default_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_BOOLEAN, FALSE);
-
-	return priv->u.boolean.default_value;
-}
-
-gboolean
-purple_request_field_bool_get_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_BOOLEAN, FALSE);
-
-	return priv->u.boolean.value;
-}
-
-PurpleRequestField *
 purple_request_field_choice_new(const char *id, const char *text,
 	gpointer default_value)
 {
diff --git a/libpurple/purplerequestfield.c b/libpurple/request/purplerequestfieldbool.c
copy from libpurple/purplerequestfield.c
copy to libpurple/request/purplerequestfieldbool.c
--- a/libpurple/purplerequestfield.c
+++ b/libpurple/request/purplerequestfieldbool.c
@@ -22,152 +22,44 @@
 #include <glib/gi18n-lib.h>
 
 #include "glibcompat.h"
-#include "request.h"
-#include "request/purplerequestfieldstring.h"
-#include "debug.h"
-#include "purplekeyvaluepair.h"
-#include "purpleprivate.h"
-
-typedef struct {
-	PurpleRequestFieldType type;
-	PurpleRequestGroup *group;
-
-	char *id;
-	char *label;
-	char *type_hint;
-
-	gboolean visible;
-	gboolean required;
-	gboolean sensitive;
-
-	union {
-		struct {
-			int default_value;
-			int value;
-			int lower_bound;
-			int upper_bound;
-		} integer;
-
-		struct {
-			gboolean default_value;
-			gboolean value;
-		} boolean;
+#include "purplerequestfield.h"
+#include "request/purplerequestfieldbool.h"
 
-		struct {
-			gpointer default_value;
-			gpointer value;
-
-			GList *elements;
-		} choice;
-
-		struct {
-			GList *items;
-			gboolean has_icons;
-			GHashTable *item_data;
-			GList *selected;
-			GHashTable *selected_table;
-
-			gboolean multiple_selection;
-		} list;
+struct _PurpleRequestFieldBool {
+	PurpleRequestField parent;
 
-		struct {
-			unsigned int scale_x;
-			unsigned int scale_y;
-			char *buffer;
-			gsize size;
-		} image;
-
-		struct {
-			PurpleRequestDatasheet *sheet;
-		} datasheet;
-	} u;
-
-	void *ui_data;
-	char *tooltip;
-
-	PurpleRequestFieldValidator validator;
-	void *validator_data;
-} PurpleRequestFieldPrivate;
+	gboolean default_value;
+	gboolean value;
+};
 
 enum {
 	PROP_0,
-	PROP_ID,
-	PROP_LABEL,
-	PROP_VISIBLE,
-	PROP_SENSITIVE,
-	PROP_TYPE_HINT,
-	PROP_TOOLTIP,
-	PROP_REQUIRED,
-	PROP_IS_VALIDATABLE,
+	PROP_DEFAULT_VALUE,
+	PROP_VALUE,
 	N_PROPERTIES,
 };
 static GParamSpec *properties[N_PROPERTIES] = {NULL, };
 
-G_DEFINE_TYPE_WITH_PRIVATE(PurpleRequestField, purple_request_field, G_TYPE_OBJECT)
-
-/******************************************************************************
- * Helpers
- *****************************************************************************/
-static void
-purple_request_field_set_id(PurpleRequestField *field, const char *id) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	priv = purple_request_field_get_instance_private(field);
-
-	g_free(priv->id);
-	priv->id = g_strdup(id);
-
-	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_ID]);
-}
-
-static void
-purple_request_field_set_field_type(PurpleRequestField *field,
-                                    PurpleRequestFieldType type)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->type = type;
-}
-
 /******************************************************************************
  * GObject Implementation
  *****************************************************************************/
+G_DEFINE_TYPE(PurpleRequestFieldBool, purple_request_field_bool,
+              PURPLE_TYPE_REQUEST_FIELD)
+
 static void
-purple_request_field_get_property(GObject *obj, guint param_id, GValue *value,
-                                  GParamSpec *pspec)
+purple_request_field_bool_get_property(GObject *obj, guint param_id,
+                                       GValue *value, GParamSpec *pspec)
 {
-	PurpleRequestField *field = PURPLE_REQUEST_FIELD(obj);
+	PurpleRequestFieldBool *field = PURPLE_REQUEST_FIELD_BOOL(obj);
 
 	switch(param_id) {
-		case PROP_ID:
-			g_value_set_string(value, purple_request_field_get_id(field));
-			break;
-		case PROP_LABEL:
-			g_value_set_string(value, purple_request_field_get_label(field));
-			break;
-		case PROP_VISIBLE:
-			g_value_set_boolean(value, purple_request_field_is_visible(field));
-			break;
-		case PROP_SENSITIVE:
+		case PROP_DEFAULT_VALUE:
 			g_value_set_boolean(value,
-			                    purple_request_field_is_sensitive(field));
+			                    purple_request_field_bool_get_default_value(field));
 			break;
-		case PROP_TYPE_HINT:
-			g_value_set_string(value,
-			                   purple_request_field_get_type_hint(field));
-			break;
-		case PROP_TOOLTIP:
-			g_value_set_string(value, purple_request_field_get_tooltip(field));
-			break;
-		case PROP_REQUIRED:
+		case PROP_VALUE:
 			g_value_set_boolean(value,
-			                    purple_request_field_is_required(field));
-			break;
-		case PROP_IS_VALIDATABLE:
-			g_value_set_boolean(value,
-			                    purple_request_field_is_validatable(field));
+			                    purple_request_field_bool_get_value(field));
 			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
@@ -176,36 +68,19 @@ purple_request_field_get_property(GObjec
 }
 
 static void
-purple_request_field_set_property(GObject *obj, guint param_id,
-                                  const GValue *value, GParamSpec *pspec)
+purple_request_field_bool_set_property(GObject *obj, guint param_id,
+                                       const GValue *value, GParamSpec *pspec)
 {
-	PurpleRequestField *field = PURPLE_REQUEST_FIELD(obj);
+	PurpleRequestFieldBool *field = PURPLE_REQUEST_FIELD_BOOL(obj);
 
 	switch(param_id) {
-		case PROP_ID:
-			purple_request_field_set_id(field, g_value_get_string(value));
-			break;
-		case PROP_LABEL:
-			purple_request_field_set_label(field, g_value_get_string(value));
-			break;
-		case PROP_VISIBLE:
-			purple_request_field_set_visible(field,
-			                                 g_value_get_boolean(value));
+		case PROP_DEFAULT_VALUE:
+			purple_request_field_bool_set_default_value(field,
+			                                            g_value_get_boolean(value));
 			break;
-		case PROP_SENSITIVE:
-			purple_request_field_set_sensitive(field,
-			                                   g_value_get_boolean(value));
-			break;
-		case PROP_TYPE_HINT:
-			purple_request_field_set_type_hint(field,
-			                                   g_value_get_string(value));
-			break;
-		case PROP_TOOLTIP:
-			purple_request_field_set_tooltip(field, g_value_get_string(value));
-			break;
-		case PROP_REQUIRED:
-			purple_request_field_set_required(field,
-			                                  g_value_get_boolean(value));
+		case PROP_VALUE:
+			purple_request_field_bool_set_value(field,
+			                                    g_value_get_boolean(value));
 			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
@@ -214,156 +89,41 @@ purple_request_field_set_property(GObjec
 }
 
 static void
-purple_request_field_finalize(GObject *obj) {
-	PurpleRequestField *field = PURPLE_REQUEST_FIELD(obj);
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	priv = purple_request_field_get_instance_private(field);
-
-	g_free(priv->id);
-	g_free(priv->label);
-	g_free(priv->type_hint);
-	g_free(priv->tooltip);
-
-	if(priv->type == PURPLE_REQUEST_FIELD_CHOICE) {
-		g_list_free_full(priv->u.choice.elements,
-		                 (GDestroyNotify)purple_key_value_pair_free);
-	} else if(priv->type == PURPLE_REQUEST_FIELD_LIST) {
-		g_list_free_full(priv->u.list.items,
-		                 (GDestroyNotify)purple_key_value_pair_free);
-		g_list_free_full(priv->u.list.selected, g_free);
-		g_hash_table_destroy(priv->u.list.item_data);
-		g_hash_table_destroy(priv->u.list.selected_table);
-	} else if(priv->type == PURPLE_REQUEST_FIELD_DATASHEET) {
-		purple_request_datasheet_free(priv->u.datasheet.sheet);
-	} else if(priv->type == PURPLE_REQUEST_FIELD_IMAGE) {
-		g_free(priv->u.image.buffer);
-	}
-
-	G_OBJECT_CLASS(purple_request_field_parent_class)->finalize(obj);
+purple_request_field_bool_init(G_GNUC_UNUSED PurpleRequestFieldBool *field) {
 }
 
 static void
-purple_request_field_init(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->visible = TRUE;
-	priv->sensitive = TRUE;
-}
-
-static void
-purple_request_field_class_init(PurpleRequestFieldClass *klass) {
+purple_request_field_bool_class_init(PurpleRequestFieldBoolClass *klass) {
 	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
 
-	obj_class->finalize = purple_request_field_finalize;
-	obj_class->get_property = purple_request_field_get_property;
-	obj_class->set_property = purple_request_field_set_property;
+	obj_class->get_property = purple_request_field_bool_get_property;
+	obj_class->set_property = purple_request_field_bool_set_property;
 
 	/**
-	 * PurpleRequestField:id:
-	 *
-	 * The ID of the field.
+	 * PurpleRequestFieldBool:default-value:
 	 *
-	 * Since: 3.0.0
-	 */
-	properties[PROP_ID] = g_param_spec_string(
-		"id", "id",
-		"The ID of the field.",
-		NULL,
-		G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
-
-	/**
-	 * PurpleRequestField:label:
-	 *
-	 * The label of the field.
+	 * The default value of the field.
 	 *
 	 * Since: 3.0.0
 	 */
-	properties[PROP_LABEL] = g_param_spec_string(
-		"label", "label",
-		"The label of the field.",
-		NULL,
-		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	/**
-	 * PurpleRequestField:visible:
-	 *
-	 * Whether the field should be visible.
-	 *
-	 * Since: 3.0.0
-	 */
-	properties[PROP_VISIBLE] = g_param_spec_boolean(
-		"visible", "visible",
-		"Whether the field should be visible.",
-		TRUE,
-		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	/**
-	 * PurpleRequestField:sensitive:
-	 *
-	 * Whether the field should be sensitive.
-	 *
-	 * Since: 3.0.0
-	 */
-	properties[PROP_SENSITIVE] = g_param_spec_boolean(
-		"sensitive", "sensitive",
-		"Whether the field should be sensitive.",
-		TRUE,
-		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	/**
-	 * PurpleRequestField:type-hint:
-	 *
-	 * The type hint of the field.
-	 *
-	 * Since: 3.0.0
-	 */
-	properties[PROP_TYPE_HINT] = g_param_spec_string(
-		"type-hint", "type-hint",
-		"The type hint of the field.",
-		NULL,
-		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	/**
-	 * PurpleRequestField:tooltip:
-	 *
-	 * The tooltip of the field.
-	 *
-	 * Since: 3.0.0
-	 */
-	properties[PROP_TOOLTIP] = g_param_spec_string(
-		"tooltip", "tooltip",
-		"The tooltip of the field.",
-		NULL,
-		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	/**
-	 * PurpleRequestField:required:
-	 *
-	 * Whether the field is required to complete the request.
-	 *
-	 * Since: 3.0.0
-	 */
-	properties[PROP_REQUIRED] = g_param_spec_boolean(
-		"required", "required",
-		"Whether the field is required to complete the request.",
+	properties[PROP_DEFAULT_VALUE] = g_param_spec_boolean(
+		"default-value", "default-value",
+		"The default value of the field.",
 		FALSE,
 		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 
 	/**
-	 * PurpleRequestField:is-validatable:
+	 * PurpleRequestFieldBool:value:
 	 *
-	 * Whether the field can be validated by the requestor.
+	 * The value of the field.
 	 *
 	 * Since: 3.0.0
 	 */
-	properties[PROP_IS_VALIDATABLE] = g_param_spec_boolean(
-		"is-validatable", "is-validatable",
-		"Whether the field can be validated by the requestor.",
+	properties[PROP_VALUE] = g_param_spec_boolean(
+		"value", "value",
+		"The value of the field.",
 		FALSE,
-		G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 
 	g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
 }
@@ -372,943 +132,60 @@ purple_request_field_class_init(PurpleRe
  * Public API
  *****************************************************************************/
 PurpleRequestField *
-purple_request_field_new(const char *id, const char *text,
-                         PurpleRequestFieldType type)
-{
-	PurpleRequestField *field;
-
-	g_return_val_if_fail(id != NULL, NULL);
-	g_return_val_if_fail(type != PURPLE_REQUEST_FIELD_NONE, NULL);
-
-	field = g_object_new(PURPLE_TYPE_REQUEST_FIELD,
-	                     "id", id,
-	                     "label", text,
-	                     NULL);
-	purple_request_field_set_field_type(field, type);
-
-	return field;
-}
-
-void
-_purple_request_field_set_group(PurpleRequestField *field,
-                                PurpleRequestGroup *group)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->group = group;
-}
-
-void
-purple_request_field_set_label(PurpleRequestField *field, const char *label)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-
-	g_free(priv->label);
-	priv->label = g_strdup(label);
-
-	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_LABEL]);
-}
-
-void
-purple_request_field_set_visible(PurpleRequestField *field, gboolean visible)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->visible = visible;
-
-	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_VISIBLE]);
-}
-
-void
-purple_request_field_set_type_hint(PurpleRequestField *field,
-								 const char *type_hint)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-
-	g_free(priv->type_hint);
-	priv->type_hint = g_strdup(type_hint);
-
-	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_TYPE_HINT]);
-}
-
-void
-purple_request_field_set_tooltip(PurpleRequestField *field, const char *tooltip)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-
-	g_free(priv->tooltip);
-	priv->tooltip = g_strdup(tooltip);
-
-	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_TOOLTIP]);
-}
-
-void
-purple_request_field_set_required(PurpleRequestField *field, gboolean required)
+purple_request_field_bool_new(const char *id, const char *text,
+                              gboolean default_value)
 {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-
-	if(priv->required == required) {
-		return;
-	}
-
-	priv->required = required;
-
-	if(PURPLE_IS_REQUEST_GROUP(priv->group)) {
-		_purple_request_group_set_field_required(priv->group, field,
-		                                         required);
-	}
-
-	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_REQUIRED]);
-}
-
-PurpleRequestFieldType
-purple_request_field_get_field_type(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field),
-	                     PURPLE_REQUEST_FIELD_NONE);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->type;
-}
-
-PurpleRequestGroup *
-purple_request_field_get_group(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->group;
-}
-
-const char *
-purple_request_field_get_id(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->id;
-}
-
-const char *
-purple_request_field_get_label(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->label;
-}
-
-gboolean
-purple_request_field_is_visible(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->visible;
-}
-
-const char *
-purple_request_field_get_type_hint(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->type_hint;
-}
-
-const char *
-purple_request_field_get_tooltip(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->tooltip;
-}
-
-gboolean
-purple_request_field_is_required(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->required;
-}
-
-gboolean
-purple_request_field_is_filled(PurpleRequestField *field) {
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	if(PURPLE_IS_REQUEST_FIELD_STRING(field)) {
-		PurpleRequestFieldString *sfield = PURPLE_REQUEST_FIELD_STRING(field);
-		return !purple_strempty(purple_request_field_string_get_value(sfield));
-	}
-
-	return TRUE;
-}
-
-void
-purple_request_field_set_validator(PurpleRequestField *field,
-	PurpleRequestFieldValidator validator, void *user_data)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->validator = validator;
-	priv->validator_data = validator ? user_data : NULL;
-
-	if(PURPLE_IS_REQUEST_GROUP(priv->group)) {
-		_purple_request_group_set_field_validator(priv->group, field,
-		                                          validator != NULL);
-	}
-
-	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_IS_VALIDATABLE]);
-}
-
-gboolean
-purple_request_field_is_validatable(PurpleRequestField *field)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->validator != NULL;
-}
-
-gboolean
-purple_request_field_is_valid(PurpleRequestField *field, gchar **errmsg)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-	gboolean valid;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	if(!priv->validator) {
-		return TRUE;
-	}
-
-	if (!purple_request_field_is_required(field) &&
-		!purple_request_field_is_filled(field))
-		return TRUE;
-
-	valid = priv->validator(field, errmsg, priv->validator_data);
-
-	if (valid && errmsg)
-		*errmsg = NULL;
-
-	return valid;
-}
-
-void
-purple_request_field_set_sensitive(PurpleRequestField *field,
-	gboolean sensitive)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->sensitive = sensitive;
-
-	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_SENSITIVE]);
-}
-
-gboolean
-purple_request_field_is_sensitive(PurpleRequestField *field)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-
-	return priv->sensitive;
-}
-
-PurpleRequestField *
-purple_request_field_int_new(const char *id, const char *text,
-	int default_value, int lower_bound, int upper_bound)
-{
-	PurpleRequestField *field;
-
 	g_return_val_if_fail(id   != NULL, NULL);
 	g_return_val_if_fail(text != NULL, NULL);
 
-	field = purple_request_field_new(id, text, PURPLE_REQUEST_FIELD_INTEGER);
-
-	purple_request_field_int_set_lower_bound(field, lower_bound);
-	purple_request_field_int_set_upper_bound(field, upper_bound);
-	purple_request_field_int_set_default_value(field, default_value);
-	purple_request_field_int_set_value(field, default_value);
-
-	return field;
-}
-
-void
-purple_request_field_int_set_default_value(PurpleRequestField *field,
-										 int default_value)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_INTEGER);
-
-	priv->u.integer.default_value = default_value;
-}
-
-void
-purple_request_field_int_set_lower_bound(PurpleRequestField *field,
-	int lower_bound)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_INTEGER);
-
-	priv->u.integer.lower_bound = lower_bound;
-}
-
-void
-purple_request_field_int_set_upper_bound(PurpleRequestField *field,
-	int upper_bound)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_INTEGER);
-
-	priv->u.integer.upper_bound = upper_bound;
-}
-
-void
-purple_request_field_int_set_value(PurpleRequestField *field, int value)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_INTEGER);
-
-	if(value < priv->u.integer.lower_bound ||
-	   value > priv->u.integer.upper_bound)
-	{
-		purple_debug_error("request", "Int value out of bounds\n");
-		return;
-	}
-
-	priv->u.integer.value = value;
-}
-
-int
-purple_request_field_int_get_default_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), 0);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_INTEGER, 0);
-
-	return priv->u.integer.default_value;
-}
-
-int
-purple_request_field_int_get_lower_bound(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), 0);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_INTEGER, 0);
-
-	return priv->u.integer.lower_bound;
-}
-
-int
-purple_request_field_int_get_upper_bound(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), 0);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_INTEGER, 0);
-
-	return priv->u.integer.upper_bound;
-}
-
-int
-purple_request_field_int_get_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), 0);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_INTEGER, 0);
-
-	return priv->u.integer.value;
-}
-
-PurpleRequestField *
-purple_request_field_bool_new(const char *id, const char *text,
-							gboolean default_value)
-{
-	PurpleRequestField *field;
-
-	g_return_val_if_fail(id   != NULL, NULL);
-	g_return_val_if_fail(text != NULL, NULL);
-
-	field = purple_request_field_new(id, text, PURPLE_REQUEST_FIELD_BOOLEAN);
-
-	purple_request_field_bool_set_default_value(field, default_value);
-	purple_request_field_bool_set_value(field, default_value);
-
-	return field;
-}
-
-void
-purple_request_field_bool_set_default_value(PurpleRequestField *field,
-										  gboolean default_value)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_BOOLEAN);
-
-	priv->u.boolean.default_value = default_value;
+	return g_object_new(PURPLE_TYPE_REQUEST_FIELD_BOOL,
+	                    "id", id,
+	                    "label", text,
+	                    "default-value", default_value,
+	                    "value", default_value,
+	                    NULL);
 }
 
 void
-purple_request_field_bool_set_value(PurpleRequestField *field, gboolean value)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_BOOLEAN);
-
-	priv->u.boolean.value = value;
-}
-
-gboolean
-purple_request_field_bool_get_default_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_BOOLEAN, FALSE);
-
-	return priv->u.boolean.default_value;
-}
-
-gboolean
-purple_request_field_bool_get_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_BOOLEAN, FALSE);
-
-	return priv->u.boolean.value;
-}
-
-PurpleRequestField *
-purple_request_field_choice_new(const char *id, const char *text,
-	gpointer default_value)
+purple_request_field_bool_set_default_value(PurpleRequestFieldBool *field,
+                                            gboolean default_value)
 {
-	PurpleRequestField *field;
-
-	g_return_val_if_fail(id   != NULL, NULL);
-	g_return_val_if_fail(text != NULL, NULL);
-
-	field = purple_request_field_new(id, text, PURPLE_REQUEST_FIELD_CHOICE);
-
-	purple_request_field_choice_set_default_value(field, default_value);
-	purple_request_field_choice_set_value(field, default_value);
-
-	return field;
-}
-
-void
-purple_request_field_choice_add(PurpleRequestField *field, const char *label,
-	gpointer value)
-{
-	purple_request_field_choice_add_full(field, label, value, NULL);
-}
-
-void
-purple_request_field_choice_add_full(PurpleRequestField *field, const char *label,
-                                     gpointer value, GDestroyNotify destroy)
-{
-	PurpleKeyValuePair *choice;
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-	g_return_if_fail(label != NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_CHOICE);
-
-	choice = purple_key_value_pair_new_full(label, value, destroy);
-
-	priv->u.choice.elements = g_list_append(priv->u.choice.elements, choice);
-}
-
-void
-purple_request_field_choice_set_default_value(PurpleRequestField *field,
-	gpointer default_value)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_CHOICE);
-
-	priv->u.choice.default_value = default_value;
-}
-
-void
-purple_request_field_choice_set_value(PurpleRequestField *field, gpointer value)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_CHOICE);
-
-	priv->u.choice.value = value;
-}
-
-gpointer
-purple_request_field_choice_get_default_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
+	g_return_if_fail(PURPLE_IS_REQUEST_FIELD_BOOL(field));
 
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_CHOICE, NULL);
-
-	return priv->u.choice.default_value;
-}
-
-gpointer
-purple_request_field_choice_get_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_CHOICE, NULL);
-
-	return priv->u.choice.value;
-}
-
-GList *
-purple_request_field_choice_get_elements(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_CHOICE, NULL);
-
-	return priv->u.choice.elements;
-}
-
-PurpleRequestField *
-purple_request_field_list_new(const char *id, const char *text)
-{
-	PurpleRequestField *field;
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(id   != NULL, NULL);
-
-	field = purple_request_field_new(id, text, PURPLE_REQUEST_FIELD_LIST);
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->u.list.item_data = g_hash_table_new_full(g_str_hash, g_str_equal,
-	                                               g_free, NULL);
-
-	priv->u.list.selected_table = g_hash_table_new_full(g_str_hash, g_str_equal,
-	                                                    g_free, NULL);
-
-	return field;
-}
+	if(field->default_value == default_value) {
+		return;
+	}
 
-void
-purple_request_field_list_set_multi_select(PurpleRequestField *field,
-										 gboolean multi_select)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST);
-
-	priv->u.list.multiple_selection = multi_select;
-}
-
-gboolean
-purple_request_field_list_get_multi_select(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST, FALSE);
-
-	return priv->u.list.multiple_selection;
-}
+	field->default_value = default_value;
 
-void *
-purple_request_field_list_get_data(PurpleRequestField *field, const char *text)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-	g_return_val_if_fail(text  != NULL, NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST, NULL);
-
-	return g_hash_table_lookup(priv->u.list.item_data, text);
-}
-
-void
-purple_request_field_list_add_icon(PurpleRequestField *field, const char *item, const char* icon_path,
-							void *data)
-{
-	PurpleKeyValuePair *kvp;
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-	g_return_if_fail(item  != NULL);
-	g_return_if_fail(data  != NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST);
-
-	priv->u.list.has_icons = priv->u.list.has_icons || (icon_path != NULL);
-	kvp = purple_key_value_pair_new_full(item, g_strdup(icon_path), g_free);
-	priv->u.list.items = g_list_append(priv->u.list.items, kvp);
-	g_hash_table_insert(priv->u.list.item_data, g_strdup(item), data);
+	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_DEFAULT_VALUE]);
 }
 
 void
-purple_request_field_list_add_selected(PurpleRequestField *field, const char *item)
+purple_request_field_bool_set_value(PurpleRequestFieldBool *field,
+                                    gboolean value)
 {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-	g_return_if_fail(item  != NULL);
+	g_return_if_fail(PURPLE_IS_REQUEST_FIELD_BOOL(field));
 
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST);
-
-	if(!purple_request_field_list_get_multi_select(field) &&
-	   priv->u.list.selected != NULL)
-	{
-		purple_debug_warning("request",
-						   "More than one item added to non-multi-select "
-						   "field %s\n",
-						   purple_request_field_get_id(field));
+	if(field->value == value) {
 		return;
 	}
 
-	priv->u.list.selected = g_list_append(priv->u.list.selected,
-	                                      g_strdup(item));
-
-	g_hash_table_add(priv->u.list.selected_table, g_strdup(item));
-}
-
-void
-purple_request_field_list_clear_selected(PurpleRequestField *field)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST);
-
-	if(priv->u.list.selected != NULL) {
-		g_list_free_full(priv->u.list.selected, g_free);
-		priv->u.list.selected = NULL;
-	}
-
-	g_hash_table_remove_all(priv->u.list.selected_table);
-}
-
-void
-purple_request_field_list_set_selected(PurpleRequestField *field, GList *items)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-	GList *l;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-	g_return_if_fail(items != NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST);
-
-	purple_request_field_list_clear_selected(field);
-
-	if (!purple_request_field_list_get_multi_select(field) && items->next) {
-		purple_debug_warning("request",
-						   "More than one item added to non-multi-select "
-						   "field %s\n",
-						   purple_request_field_get_id(field));
-		return;
-	}
+	field->value = value;
 
-	for (l = items; l != NULL; l = l->next) {
-		char *selected = l->data;
-		priv->u.list.selected = g_list_append(priv->u.list.selected,
-		                                      g_strdup(selected));
-		g_hash_table_add(priv->u.list.selected_table, g_strdup(selected));
-	}
-}
-
-gboolean
-purple_request_field_list_is_selected(PurpleRequestField *field,
-                                      const char *item)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-	g_return_val_if_fail(item  != NULL, FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST, FALSE);
-
-	return g_hash_table_contains(priv->u.list.selected_table, item);
-}
-
-GList *
-purple_request_field_list_get_selected(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST, NULL);
-
-	return priv->u.list.selected;
-}
-
-GList *
-purple_request_field_list_get_items(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST, NULL);
-
-	return priv->u.list.items;
+	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_DEFAULT_VALUE]);
 }
 
 gboolean
-purple_request_field_list_has_icons(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), FALSE);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_LIST, FALSE);
-
-	return priv->u.list.has_icons;
-}
-
-PurpleRequestField *
-purple_request_field_label_new(const char *id, const char *text)
-{
-	PurpleRequestField *field;
-
-	g_return_val_if_fail(id   != NULL, NULL);
-	g_return_val_if_fail(text != NULL, NULL);
-
-	field = purple_request_field_new(id, text, PURPLE_REQUEST_FIELD_LABEL);
-
-	return field;
-}
-
-PurpleRequestField *
-purple_request_field_image_new(const char *id, const char *text, const char *buf, gsize size)
-{
-	PurpleRequestField *field;
+purple_request_field_bool_get_default_value(PurpleRequestFieldBool *field) {
+	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD_BOOL(field), FALSE);
 
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(id   != NULL, NULL);
-	g_return_val_if_fail(text != NULL, NULL);
-	g_return_val_if_fail(buf  != NULL, NULL);
-	g_return_val_if_fail(size > 0, NULL);
-
-	field = purple_request_field_new(id, text, PURPLE_REQUEST_FIELD_IMAGE);
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->u.image.buffer = g_memdup2(buf, size);
-	priv->u.image.size = size;
-	priv->u.image.scale_x = 1;
-	priv->u.image.scale_y = 1;
-
-	return field;
-}
-
-void
-purple_request_field_image_set_scale(PurpleRequestField *field, unsigned int x, unsigned int y)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_if_fail(priv->type == PURPLE_REQUEST_FIELD_IMAGE);
-
-	priv->u.image.scale_x = x;
-	priv->u.image.scale_y = y;
+	return field->default_value;
 }
 
-const char *
-purple_request_field_image_get_buffer(PurpleRequestField *field)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_IMAGE, NULL);
-
-	return priv->u.image.buffer;
-}
-
-gsize
-purple_request_field_image_get_size(PurpleRequestField *field)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), 0);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_IMAGE, 0);
-
-	return priv->u.image.size;
-}
-
-unsigned int
-purple_request_field_image_get_scale_x(PurpleRequestField *field)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), 0);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_IMAGE, 0);
-
-	return priv->u.image.scale_x;
-}
+gboolean
+purple_request_field_bool_get_value(PurpleRequestFieldBool *field) {
+	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD_BOOL(field), FALSE);
 
-unsigned int
-purple_request_field_image_get_scale_y(PurpleRequestField *field)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), 0);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_IMAGE, 0);
-
-	return priv->u.image.scale_y;
+	return field->value;
 }
-
-PurpleRequestField *
-purple_request_field_datasheet_new(const char *id,
-	const gchar *text, PurpleRequestDatasheet *sheet)
-{
-	PurpleRequestField *field;
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(id != NULL, NULL);
-	g_return_val_if_fail(sheet != NULL, NULL);
-
-	field = purple_request_field_new(id, text, PURPLE_REQUEST_FIELD_DATASHEET);
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->u.datasheet.sheet = sheet;
-
-	return field;
-}
-
-PurpleRequestDatasheet *
-purple_request_field_datasheet_get_sheet(PurpleRequestField *field)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
-
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_DATASHEET, NULL);
-
-	return priv->u.datasheet.sheet;
-}
diff --git a/libpurple/purplerequestpage.c b/libpurple/purplerequestpage.c
--- a/libpurple/purplerequestpage.c
+++ b/libpurple/purplerequestpage.c
@@ -24,6 +24,7 @@
 #include "glibcompat.h"
 #include "purplerequestpage.h"
 #include "request/purplerequestfieldaccount.h"
+#include "request/purplerequestfieldbool.h"
 #include "request/purplerequestfieldstring.h"
 #include "purpleprivate.h"
 
@@ -326,11 +327,12 @@ purple_request_page_get_bool(PurpleReque
 	g_return_val_if_fail(PURPLE_IS_REQUEST_PAGE(page), FALSE);
 	g_return_val_if_fail(id     != NULL, FALSE);
 
-	if((field = purple_request_page_get_field(page, id)) == NULL) {
+	field = purple_request_page_get_field(page, id);
+	if(!PURPLE_IS_REQUEST_FIELD_BOOL(field)) {
 		return FALSE;
 	}
 
-	return purple_request_field_bool_get_value(field);
+	return purple_request_field_bool_get_value(PURPLE_REQUEST_FIELD_BOOL(field));
 }
 
 gpointer
diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -241,7 +241,7 @@ req_field_changed_common(G_GNUC_UNUSED G
 static void
 field_bool_cb(GtkCheckButton *button, PurpleRequestField *field)
 {
-	purple_request_field_bool_set_value(field,
+	purple_request_field_bool_set_value(PURPLE_REQUEST_FIELD_BOOL(field),
 			gtk_check_button_get_active(button));
 
 	req_field_changed_common(GTK_WIDGET(button), field);
@@ -1220,6 +1220,7 @@ static GtkWidget *
 create_bool_field(PurpleRequestField *field,
 	PurpleRequestCommonParameters *cpar)
 {
+	PurpleRequestFieldBool *boolfield = PURPLE_REQUEST_FIELD_BOOL(field);
 	GtkWidget *widget;
 	gchar *label;
 
@@ -1231,7 +1232,7 @@ create_bool_field(PurpleRequestField *fi
 	gtk_widget_set_tooltip_text(widget, purple_request_field_get_tooltip(field));
 
 	gtk_check_button_set_active(GTK_CHECK_BUTTON(widget),
-		purple_request_field_bool_get_default_value(field));
+		purple_request_field_bool_get_default_value(boolfield));
 
 	g_signal_connect(widget, "toggled", G_CALLBACK(field_bool_cb), field);
 
@@ -2054,8 +2055,9 @@ pidgin_request_fields(const char *title,
 				  purple_request_field_string_is_multiline(PURPLE_REQUEST_FIELD_STRING(field))))
 			{
 				rows += 2;
-			} else if (compact && type != PURPLE_REQUEST_FIELD_BOOLEAN)
+			} else if(compact && !PURPLE_IS_REQUEST_FIELD_BOOL(field)) {
 				rows++;
+			}
 		}
 
 		grid = gtk_grid_new();
@@ -2097,8 +2099,7 @@ pidgin_request_fields(const char *title,
 				field_label = pidgin_request_escape(cpar,
 					purple_request_field_get_label(field));
 
-				if (type != PURPLE_REQUEST_FIELD_BOOLEAN && field_label)
-				{
+				if(!PURPLE_IS_REQUEST_FIELD_BOOL(field) && field_label) {
 					char *text = NULL;
 
 					if (field_label[strlen(field_label) - 1] != ':' &&
@@ -2145,9 +2146,9 @@ pidgin_request_fields(const char *title,
 						widget = create_string_field(field);
 					} else if (type == PURPLE_REQUEST_FIELD_INTEGER)
 						widget = create_int_field(field);
-					else if (type == PURPLE_REQUEST_FIELD_BOOLEAN)
+					else if(PURPLE_IS_REQUEST_FIELD_BOOL(field)) {
 						widget = create_bool_field(field, cpar);
-					else if (type == PURPLE_REQUEST_FIELD_CHOICE)
+					} else if (type == PURPLE_REQUEST_FIELD_CHOICE)
 						widget = create_choice_field(field);
 					else if (type == PURPLE_REQUEST_FIELD_LIST)
 						widget = create_list_field(field);
@@ -2182,9 +2183,7 @@ pidgin_request_fields(const char *title,
 				{
 					gtk_grid_attach(GTK_GRID(grid), widget,
 						0, row_num, 2 * cols, 1);
-				}
-				else if (type == PURPLE_REQUEST_FIELD_BOOLEAN)
-				{
+				} else if(PURPLE_IS_REQUEST_FIELD_BOOL(field)) {
 					gtk_grid_attach(GTK_GRID(grid), widget,
 						col_offset, row_num, 1, 1);
 				}
