# HG changeset patch
# Node ID 276e97d2d581
# Parent  358f8573573f
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -601,9 +601,12 @@ finch_request_add_buddy(G_GNUC_UNUSED Pu
 	purple_request_field_set_type_hint(field, "group");
 
 	field = purple_request_field_account_new("account", _("Account"), NULL);
-	purple_request_field_account_set_show_all(field, FALSE);
-	if (account)
-		purple_request_field_account_set_value(field, account);
+	purple_request_field_account_set_show_all(PURPLE_REQUEST_FIELD_ACCOUNT(field),
+	                                          FALSE);
+	if(account) {
+		purple_request_field_account_set_value(PURPLE_REQUEST_FIELD_ACCOUNT(field),
+		                                       account);
+	}
 	purple_request_group_add_field(group, field);
 
 	purple_request_fields(NULL, _("Add Buddy"), NULL, _("Please enter buddy information."),
@@ -689,9 +692,12 @@ finch_request_add_chat(G_GNUC_UNUSED Pur
 	purple_request_page_add_group(page, group);
 
 	field = purple_request_field_account_new("account", _("Account"), NULL);
-	purple_request_field_account_set_show_all(field, FALSE);
-	if (account)
-		purple_request_field_account_set_value(field, account);
+	purple_request_field_account_set_show_all(PURPLE_REQUEST_FIELD_ACCOUNT(field),
+	                                          FALSE);
+	if(account) {
+		purple_request_field_account_set_value(PURPLE_REQUEST_FIELD_ACCOUNT(field),
+		                                       account);
+	}
 	purple_request_group_add_field(group, field);
 
 	field = purple_request_field_string_new("name", _("Name"), name, FALSE);
diff --git a/finch/gntrequest.c b/finch/gntrequest.c
--- a/finch/gntrequest.c
+++ b/finch/gntrequest.c
@@ -360,12 +360,16 @@ request_fields_cb(GntWidget *button, Pur
 
 				purple_request_field_list_set_selected(field, selected);
 				g_list_free(selected);
-			}
-			else if (type == PURPLE_REQUEST_FIELD_ACCOUNT)
-			{
-				GntWidget *combo = g_object_get_data(G_OBJECT(field), "finch-ui-data");
-				PurpleAccount *acc = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(combo));
-				purple_request_field_account_set_value(field, acc);
+
+			} else if (PURPLE_IS_REQUEST_FIELD_ACCOUNT(field)) {
+				GntWidget *combo = NULL;
+				PurpleAccount *acc = NULL;
+				PurpleRequestFieldAccount *afield = NULL;
+
+				combo = g_object_get_data(G_OBJECT(field), "finch-ui-data");
+				acc = gnt_combo_box_get_selected_data(GNT_COMBO_BOX(combo));
+				afield = PURPLE_REQUEST_FIELD_ACCOUNT(field);
+				purple_request_field_account_set_value(afield, acc);
 			}
 		}
 	}
@@ -529,14 +533,15 @@ add_account_to_combo(GntWidget *combo, P
 static GntWidget*
 create_account_field(PurpleRequestField *field)
 {
+	PurpleRequestFieldAccount *afield = PURPLE_REQUEST_FIELD_ACCOUNT(field);
 	gboolean all;
 	PurpleAccount *def;
 	GntWidget *combo = gnt_combo_box_new();
 
-	all = purple_request_field_account_get_show_all(field);
-	def = purple_request_field_account_get_value(field);
-	if (!def) {
-		def = purple_request_field_account_get_default_value(field);
+	all = purple_request_field_account_get_show_all(afield);
+	def = purple_request_field_account_get_value(afield);
+	if(!PURPLE_IS_ACCOUNT(def)) {
+		def = purple_request_field_account_get_default_value(afield);
 	}
 
 	if(all) {
@@ -662,7 +667,7 @@ finch_request_fields(const char *title, 
 				widget = create_choice_field(field);
 			} else if (type == PURPLE_REQUEST_FIELD_LIST) {
 				widget = create_list_field(field);
-			} else if (type == PURPLE_REQUEST_FIELD_ACCOUNT) {
+			} else if(PURPLE_IS_REQUEST_FIELD_ACCOUNT(field)) {
 				accountlist = create_account_field(field);
 				widget = accountlist;
 			} else {
@@ -912,6 +917,9 @@ finch_request_save_in_prefs(G_GNUC_UNUSE
 GntWidget *finch_request_field_get_widget(PurpleRequestField *field)
 {
 	GntWidget *ret = NULL;
+	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);
@@ -928,14 +936,12 @@ GntWidget *finch_request_field_get_widge
 		case PURPLE_REQUEST_FIELD_LIST:
 			ret = create_list_field(field);
 			break;
-		case PURPLE_REQUEST_FIELD_ACCOUNT:
-			ret = create_account_field(field);
-			break;
 		default:
 			purple_debug_error("GntRequest", "Unimplemented request-field %d\n",
 					purple_request_field_get_field_type(field));
 			break;
 	}
+	}
 	return ret;
 }
 
diff --git a/libpurple/meson.build b/libpurple/meson.build
--- a/libpurple/meson.build
+++ b/libpurple/meson.build
@@ -97,6 +97,7 @@ purple_coresources = [
 	'purplewhiteboarduiops.c',
 	'queuedoutputstream.c',
 	'request.c',
+	'request/purplerequestfieldaccount.c',
 	'request-datasheet.c',
 	'roomlist.c',
 	'savedstatuses.c',
@@ -219,6 +220,10 @@ purple_coreheaders = [
 	'xmlnode.h',
 ]
 
+purple_request_headers = [
+	'request/purplerequestfieldaccount.h',
+]
+
 purple_generated_sources = []
 
 # An environment for unit tests.
@@ -292,7 +297,7 @@ enums_c = enums[0]
 enums_h = enums[1]
 
 PURPLE_H_INCLUDES = []
-foreach header : purple_coreheaders + purple_mediaheaders + ['version.h', 'purpleenums.h']
+foreach header : purple_coreheaders + purple_mediaheaders + purple_request_headers + ['version.h', 'purpleenums.h']
 	PURPLE_H_INCLUDES += f'#include <libpurple/@header@>'
 endforeach
 purple_h_conf = configuration_data()
@@ -339,6 +344,9 @@ install_headers(purple_coreheaders,
 install_headers(purple_mediaheaders,
                 subdir : purple_include_base / 'media')
 
+install_headers(purple_request_headers,
+                subdir : purple_include_base / 'request')
+
 pkgconfig.generate(
     libpurple,
     name : 'libpurple3',
diff --git a/libpurple/plugins/idle/idle.c b/libpurple/plugins/idle/idle.c
--- a/libpurple/plugins/idle/idle.c
+++ b/libpurple/plugins/idle/idle.c
@@ -158,12 +158,14 @@ purple_idle_set_account_idle_time(G_GNUC
 	PurpleRequestPage *request;
 	PurpleRequestGroup *group;
 	PurpleRequestField *field;
+	PurpleRequestFieldAccount *afield;
 
 	group = purple_request_group_new(NULL);
 
 	field = purple_request_field_account_new("acct", _("Account"), NULL);
-	purple_request_field_account_set_filter(field, idleable_filter);
-	purple_request_field_account_set_show_all(field, FALSE);
+	afield = PURPLE_REQUEST_FIELD_ACCOUNT(field);
+	purple_request_field_account_set_filter(afield, idleable_filter);
+	purple_request_field_account_set_show_all(afield, FALSE);
 	purple_request_group_add_field(group, field);
 
 	field = purple_request_field_int_new("mins", _("Minutes"), 10, 0, 9999);
@@ -190,6 +192,7 @@ purple_idle_unset_account_idle_time(G_GN
 	PurpleRequestPage *request;
 	PurpleRequestGroup *group;
 	PurpleRequestField *field;
+	PurpleRequestFieldAccount *afield;
 
 	if (idled_accts == NULL)
 	{
@@ -200,8 +203,9 @@ purple_idle_unset_account_idle_time(G_GN
 	group = purple_request_group_new(NULL);
 
 	field = purple_request_field_account_new("acct", _("Account"), NULL);
-	purple_request_field_account_set_filter(field, unidle_filter);
-	purple_request_field_account_set_show_all(field, FALSE);
+	afield = PURPLE_REQUEST_FIELD_ACCOUNT(field);
+	purple_request_field_account_set_filter(afield, unidle_filter);
+	purple_request_field_account_set_show_all(afield, FALSE);
 	purple_request_group_add_field(group, field);
 
 	request = purple_request_page_new();
diff --git a/libpurple/purplerequestfield.h b/libpurple/purplerequestfield.h
--- a/libpurple/purplerequestfield.h
+++ b/libpurple/purplerequestfield.h
@@ -39,7 +39,7 @@
  */
 typedef struct _PurpleRequestField PurpleRequestField;
 
-#include "account.h"
+#include "request.h"
 #include "request-datasheet.h"
 
 #define PURPLE_DEFAULT_ACTION_NONE	-1
@@ -71,7 +71,6 @@ struct _PurpleRequestFieldClass {
  * @PURPLE_REQUEST_FIELD_LIST: List field.
  * @PURPLE_REQUEST_FIELD_LABEL: Label field.
  * @PURPLE_REQUEST_FIELD_IMAGE: Image field.
- * @PURPLE_REQUEST_FIELD_ACCOUNT: #PurpleAccount field.
  * @PURPLE_REQUEST_FIELD_DATASHEET: Datasheet field.
  *
  * A type of field.
@@ -86,7 +85,6 @@ typedef enum
 	PURPLE_REQUEST_FIELD_LIST,
 	PURPLE_REQUEST_FIELD_LABEL,
 	PURPLE_REQUEST_FIELD_IMAGE,
-	PURPLE_REQUEST_FIELD_ACCOUNT,
 	PURPLE_REQUEST_FIELD_DATASHEET
 
 } PurpleRequestFieldType;
@@ -887,118 +885,6 @@ unsigned int purple_request_field_image_
 unsigned int purple_request_field_image_get_scale_y(PurpleRequestField *field);
 
 /**************************************************************************/
-/* Account Field API                                                      */
-/**************************************************************************/
-
-/**
- * purple_request_field_account_new:
- * @id:      The field ID.
- * @text:    The text label of the field.
- * @account: The optional default account.
- *
- * Creates an account field.
- *
- * By default, this field will not show offline accounts.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *purple_request_field_account_new(const char *id,
-												 const char *text,
-												 PurpleAccount *account);
-
-/**
- * purple_request_field_account_set_default_value:
- * @field:         The account field.
- * @default_value: The default account.
- *
- * Sets the default account on an account field.
- */
-void purple_request_field_account_set_default_value(PurpleRequestField *field,
-												  PurpleAccount *default_value);
-
-/**
- * purple_request_field_account_set_value:
- * @field: The account field.
- * @value: The account.
- *
- * Sets the account in an account field.
- */
-void purple_request_field_account_set_value(PurpleRequestField *field,
-										  PurpleAccount *value);
-
-/**
- * purple_request_field_account_set_show_all:
- * @field:    The account field.
- * @show_all: Whether or not to show all accounts.
- *
- * Sets whether or not to show all accounts in an account field.
- *
- * If TRUE, all accounts, online or offline, will be shown. If FALSE,
- * only online accounts will be shown.
- */
-void purple_request_field_account_set_show_all(PurpleRequestField *field,
-											 gboolean show_all);
-
-/**
- * purple_request_field_account_set_filter:
- * @field:       The account field.
- * @filter_func: (scope notified): The account filter function.
- *
- * Sets the account filter function in an account field.
- *
- * This function will determine which accounts get displayed and which
- * don't.
- */
-void purple_request_field_account_set_filter(PurpleRequestField *field,
-										   PurpleFilterAccountFunc filter_func);
-
-/**
- * purple_request_field_account_get_default_value:
- * @field: The field.
- *
- * Returns the default account in an account field.
- *
- * Returns: (transfer none): The default account.
- */
-PurpleAccount *purple_request_field_account_get_default_value(PurpleRequestField *field);
-
-/**
- * purple_request_field_account_get_value:
- * @field: The field.
- *
- * Returns the user-entered account in an account field.
- *
- * Returns: (transfer none): The user-entered account.
- */
-PurpleAccount *purple_request_field_account_get_value(PurpleRequestField *field);
-
-/**
- * purple_request_field_account_get_show_all:
- * @field: The account field.
- *
- * Returns whether or not to show all accounts in an account field.
- *
- * If TRUE, all accounts, online or offline, will be shown. If FALSE,
- * only online accounts will be shown.
- *
- * Returns: Whether or not to show all accounts.
- */
-gboolean purple_request_field_account_get_show_all(PurpleRequestField *field);
-
-/**
- * purple_request_field_account_get_filter:
- * @field: The account field.
- *
- * Returns the account filter function in an account field.
- *
- * This function will determine which accounts get displayed and which
- * don't.
- *
- * Returns: (transfer none): The account filter function.
- */
-PurpleFilterAccountFunc purple_request_field_account_get_filter(PurpleRequestField *field);
-
-/**************************************************************************/
 /* Datasheet Field API                                                    */
 /**************************************************************************/
 
diff --git a/libpurple/purplerequestfield.h b/libpurple/request/purplerequestfieldaccount.h
copy from libpurple/purplerequestfield.h
copy to libpurple/request/purplerequestfieldaccount.h
--- a/libpurple/purplerequestfield.h
+++ b/libpurple/request/purplerequestfieldaccount.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_ACCOUNT_H
+#define PURPLE_REQUEST_FIELD_ACCOUNT_H
 
 #include <stdlib.h>
 
@@ -33,868 +33,25 @@
 #include <glib-object.h>
 
 /**
- * PurpleRequestField:
+ * PurpleRequestFieldAccount:
  *
- * A request field.
+ * An account request field.
  */
-typedef struct _PurpleRequestField PurpleRequestField;
+typedef struct _PurpleRequestFieldAccount PurpleRequestFieldAccount;
 
 #include "account.h"
-#include "request-datasheet.h"
-
-#define PURPLE_DEFAULT_ACTION_NONE	-1
-
-/**
- * PurpleRequestFieldClass:
- *
- * #PurpleRequestFieldClass defines the interface for a request field.
- *
- * Since: 3.0.0
- */
-struct _PurpleRequestFieldClass {
-	/*< private >*/
-	GObjectClass parent_class;
-
-	/*< public >*/
-
-	/*< private >*/
-	gpointer reserved[4];
-};
-
-/**
- * PurpleRequestFieldType:
- * @PURPLE_REQUEST_FIELD_NONE: No field.
- * @PURPLE_REQUEST_FIELD_STRING: String 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_ACCOUNT: #PurpleAccount field.
- * @PURPLE_REQUEST_FIELD_DATASHEET: Datasheet field.
- *
- * A type of field.
- */
-typedef enum
-{
-	PURPLE_REQUEST_FIELD_NONE,
-	PURPLE_REQUEST_FIELD_STRING,
-	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_ACCOUNT,
-	PURPLE_REQUEST_FIELD_DATASHEET
-
-} PurpleRequestFieldType;
-
-typedef gboolean (*PurpleRequestFieldValidator)(PurpleRequestField *field,
-	gchar **errmsg, gpointer user_data);
 
 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);
-
-/**************************************************************************/
-/* String Field API                                                       */
-/**************************************************************************/
-
-/**
- * purple_request_field_string_new:
- * @id:            The field ID.
- * @text:          The text label of the field.
- * @default_value: The optional default value.
- * @multiline:     Whether or not this should be a multiline string.
- *
- * Creates a string request field.
- *
- * Returns: (transfer full): The new field.
- */
-PurpleRequestField *purple_request_field_string_new(const char *id,
-												const char *text,
-												const char *default_value,
-												gboolean multiline);
-
-/**
- * purple_request_field_string_set_default_value:
- * @field:         The field.
- * @default_value: The default value.
- *
- * Sets the default value in a string field.
- */
-void purple_request_field_string_set_default_value(PurpleRequestField *field,
-												 const char *default_value);
-
-/**
- * purple_request_field_string_set_value:
- * @field: The field.
- * @value: The value.
- *
- * Sets the value in a string field.
- */
-void purple_request_field_string_set_value(PurpleRequestField *field,
-										 const char *value);
-
-/**
- * purple_request_field_string_set_masked:
- * @field:  The field.
- * @masked: The masked value.
- *
- * Sets whether or not a string field is masked
- * (commonly used for password fields).
- */
-void purple_request_field_string_set_masked(PurpleRequestField *field,
-										  gboolean masked);
-
-/**
- * purple_request_field_string_get_default_value:
- * @field: The field.
- *
- * Returns the default value in a string field.
- *
- * Returns: The default value.
- */
-const char *purple_request_field_string_get_default_value(PurpleRequestField *field);
-
-/**
- * purple_request_field_string_get_value:
- * @field: The field.
- *
- * Returns the user-entered value in a string field.
- *
- * Returns: The value.
- */
-const char *purple_request_field_string_get_value(PurpleRequestField *field);
-
-/**
- * purple_request_field_string_is_multiline:
- * @field: The field.
- *
- * Returns whether or not a string field is multi-line.
- *
- * Returns: %TRUE if the field is mulit-line, or %FALSE otherwise.
- */
-gboolean purple_request_field_string_is_multiline(PurpleRequestField *field);
-
-/**
- * purple_request_field_string_is_masked:
- * @field: The field.
- *
- * Returns whether or not a string field is masked.
- *
- * Returns: %TRUE if the field is masked, or %FALSE otherwise.
- */
-gboolean purple_request_field_string_is_masked(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                                                      */
-/**************************************************************************/
-
-/**
- * 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                                                       */
-/**************************************************************************/
-
-/**
- * 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);
-
-/**************************************************************************/
-/* Account Field API                                                      */
-/**************************************************************************/
+#define PURPLE_TYPE_REQUEST_FIELD_ACCOUNT (purple_request_field_account_get_type())
+G_DECLARE_FINAL_TYPE(PurpleRequestFieldAccount, purple_request_field_account,
+                     PURPLE, REQUEST_FIELD_ACCOUNT, PurpleRequestField)
 
 /**
  * purple_request_field_account_new:
  * @id:      The field ID.
  * @text:    The text label of the field.
- * @account: The optional default account.
+ * @account: (transfer none): The optional default account.
  *
  * Creates an account field.
  *
@@ -902,29 +59,25 @@ unsigned int purple_request_field_image_
  *
  * Returns: (transfer full): The new field.
  */
-PurpleRequestField *purple_request_field_account_new(const char *id,
-												 const char *text,
-												 PurpleAccount *account);
+PurpleRequestField *purple_request_field_account_new(const char *id, const char *text, PurpleAccount *account);
 
 /**
  * purple_request_field_account_set_default_value:
  * @field:         The account field.
- * @default_value: The default account.
+ * @default_value: (transfer none): The default account.
  *
  * Sets the default account on an account field.
  */
-void purple_request_field_account_set_default_value(PurpleRequestField *field,
-												  PurpleAccount *default_value);
+void purple_request_field_account_set_default_value(PurpleRequestFieldAccount *field, PurpleAccount *default_value);
 
 /**
  * purple_request_field_account_set_value:
  * @field: The account field.
- * @value: The account.
+ * @value: (transfer none): The account.
  *
  * Sets the account in an account field.
  */
-void purple_request_field_account_set_value(PurpleRequestField *field,
-										  PurpleAccount *value);
+void purple_request_field_account_set_value(PurpleRequestFieldAccount *field, PurpleAccount *value);
 
 /**
  * purple_request_field_account_set_show_all:
@@ -936,8 +89,7 @@ void purple_request_field_account_set_va
  * If TRUE, all accounts, online or offline, will be shown. If FALSE,
  * only online accounts will be shown.
  */
-void purple_request_field_account_set_show_all(PurpleRequestField *field,
-											 gboolean show_all);
+void purple_request_field_account_set_show_all(PurpleRequestFieldAccount *field, gboolean show_all);
 
 /**
  * purple_request_field_account_set_filter:
@@ -949,8 +101,7 @@ void purple_request_field_account_set_sh
  * This function will determine which accounts get displayed and which
  * don't.
  */
-void purple_request_field_account_set_filter(PurpleRequestField *field,
-										   PurpleFilterAccountFunc filter_func);
+void purple_request_field_account_set_filter(PurpleRequestFieldAccount *field, PurpleFilterAccountFunc filter_func);
 
 /**
  * purple_request_field_account_get_default_value:
@@ -960,7 +111,7 @@ void purple_request_field_account_set_fi
  *
  * Returns: (transfer none): The default account.
  */
-PurpleAccount *purple_request_field_account_get_default_value(PurpleRequestField *field);
+PurpleAccount *purple_request_field_account_get_default_value(PurpleRequestFieldAccount *field);
 
 /**
  * purple_request_field_account_get_value:
@@ -970,7 +121,7 @@ PurpleAccount *purple_request_field_acco
  *
  * Returns: (transfer none): The user-entered account.
  */
-PurpleAccount *purple_request_field_account_get_value(PurpleRequestField *field);
+PurpleAccount *purple_request_field_account_get_value(PurpleRequestFieldAccount *field);
 
 /**
  * purple_request_field_account_get_show_all:
@@ -983,7 +134,7 @@ PurpleAccount *purple_request_field_acco
  *
  * Returns: Whether or not to show all accounts.
  */
-gboolean purple_request_field_account_get_show_all(PurpleRequestField *field);
+gboolean purple_request_field_account_get_show_all(PurpleRequestFieldAccount *field);
 
 /**
  * purple_request_field_account_get_filter:
@@ -996,71 +147,8 @@ gboolean purple_request_field_account_ge
  *
  * Returns: (transfer none): The account filter function.
  */
-PurpleFilterAccountFunc purple_request_field_account_get_filter(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);
+PurpleFilterAccountFunc purple_request_field_account_get_filter(PurpleRequestFieldAccount *field);
 
 G_END_DECLS
 
-#endif /* PURPLE_REQUEST_FIELD_H */
+#endif /* PURPLE_REQUEST_FIELD_ACCOUNT_H */
diff --git a/libpurple/purplerequestfield.c b/libpurple/purplerequestfield.c
--- a/libpurple/purplerequestfield.c
+++ b/libpurple/purplerequestfield.c
@@ -24,7 +24,6 @@
 #include "glibcompat.h"
 #include "request.h"
 #include "debug.h"
-#include "purpleaccountmanager.h"
 #include "purplekeyvaluepair.h"
 #include "purpleprivate.h"
 
@@ -78,14 +77,6 @@ typedef struct {
 		} list;
 
 		struct {
-			PurpleAccount *default_account;
-			PurpleAccount *account;
-			gboolean show_all;
-
-			PurpleFilterAccountFunc filter_func;
-		} account;
-
-		struct {
 			unsigned int scale_x;
 			unsigned int scale_y;
 			char *buffer;
@@ -1414,158 +1405,6 @@ purple_request_field_image_get_scale_y(P
 }
 
 PurpleRequestField *
-purple_request_field_account_new(const char *id, const char *text,
-							   PurpleAccount *account)
-{
-	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_ACCOUNT);
-
-	if(account == NULL) {
-		PurpleAccountManager *manager = purple_account_manager_get_default();
-		GList *accounts = purple_account_manager_get_connected(manager);
-
-		if(accounts != NULL) {
-			account = accounts->data;
-			g_list_free(accounts);
-		}
-	}
-
-	purple_request_field_account_set_default_value(field, account);
-	purple_request_field_account_set_value(field, account);
-
-	return field;
-}
-
-void
-purple_request_field_account_set_default_value(PurpleRequestField *field,
-											 PurpleAccount *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_ACCOUNT);
-
-	priv->u.account.default_account = default_value;
-}
-
-void
-purple_request_field_account_set_value(PurpleRequestField *field,
-									 PurpleAccount *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_ACCOUNT);
-
-	priv->u.account.account = value;
-}
-
-void
-purple_request_field_account_set_show_all(PurpleRequestField *field,
-										gboolean show_all)
-{
-	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_ACCOUNT);
-
-	if(priv->u.account.show_all == show_all) {
-		return;
-	}
-
-	priv->u.account.show_all = show_all;
-
-	if(!show_all) {
-		PurpleAccountManager *manager = purple_account_manager_get_default();
-		GList *accounts = purple_account_manager_get_connected(manager);
-
-		if(purple_account_is_connected(priv->u.account.default_account)) {
-			purple_request_field_account_set_default_value(field,
-			                                               accounts->data);
-		}
-
-		if(purple_account_is_connected(priv->u.account.account)) {
-			purple_request_field_account_set_value(field,
-			                                       accounts->data);
-		}
-
-		g_list_free(accounts);
-	}
-}
-
-void
-purple_request_field_account_set_filter(PurpleRequestField *field,
-									  PurpleFilterAccountFunc filter_func)
-{
-	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_ACCOUNT);
-
-	priv->u.account.filter_func = filter_func;
-}
-
-PurpleAccount *
-purple_request_field_account_get_default_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_ACCOUNT, NULL);
-
-	return priv->u.account.default_account;
-}
-
-PurpleAccount *
-purple_request_field_account_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_ACCOUNT, NULL);
-
-	return priv->u.account.account;
-}
-
-gboolean
-purple_request_field_account_get_show_all(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_ACCOUNT, FALSE);
-
-	return priv->u.account.show_all;
-}
-
-PurpleFilterAccountFunc
-purple_request_field_account_get_filter(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_ACCOUNT, FALSE);
-
-	return priv->u.account.filter_func;
-}
-
-PurpleRequestField *
 purple_request_field_datasheet_new(const char *id,
 	const gchar *text, PurpleRequestDatasheet *sheet)
 {
diff --git a/libpurple/purplerequestfield.c b/libpurple/request/purplerequestfieldaccount.c
copy from libpurple/purplerequestfield.c
copy to libpurple/request/purplerequestfieldaccount.c
--- a/libpurple/purplerequestfield.c
+++ b/libpurple/request/purplerequestfieldaccount.c
@@ -22,167 +22,53 @@
 #include <glib/gi18n-lib.h>
 
 #include "glibcompat.h"
-#include "request.h"
-#include "debug.h"
 #include "purpleaccountmanager.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;
+#include "purplerequestfield.h"
+#include "purplerequestfieldaccount.h"
 
-	union {
-		struct {
-			gboolean multiline;
-			gboolean masked;
-			char *default_value;
-			char *value;
-		} string;
-
-		struct {
-			int default_value;
-			int value;
-			int lower_bound;
-			int upper_bound;
-		} integer;
-
-		struct {
-			gboolean default_value;
-			gboolean value;
-		} boolean;
+struct _PurpleRequestFieldAccount {
+	PurpleRequestField parent;
 
-		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 {
-			PurpleAccount *default_account;
-			PurpleAccount *account;
-			gboolean show_all;
+	PurpleAccount *default_account;
+	PurpleAccount *account;
+	gboolean show_all;
 
-			PurpleFilterAccountFunc filter_func;
-		} account;
-
-		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;
+	PurpleFilterAccountFunc filter_func;
+};
 
 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,
+	PROP_SHOW_ALL,
 	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;
-}
+G_DEFINE_TYPE(PurpleRequestFieldAccount, purple_request_field_account,
+              PURPLE_TYPE_REQUEST_FIELD)
 
 /******************************************************************************
  * GObject Implementation
  *****************************************************************************/
 static void
-purple_request_field_get_property(GObject *obj, guint param_id, GValue *value,
-                                  GParamSpec *pspec)
+purple_request_field_account_get_property(GObject *obj, guint param_id,
+                                          GValue *value, GParamSpec *pspec)
 {
-	PurpleRequestField *field = PURPLE_REQUEST_FIELD(obj);
+	PurpleRequestFieldAccount *field = PURPLE_REQUEST_FIELD_ACCOUNT(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:
-			g_value_set_boolean(value,
-			                    purple_request_field_is_sensitive(field));
+		case PROP_DEFAULT_VALUE:
+			g_value_set_object(value,
+			                   purple_request_field_account_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));
+		case PROP_VALUE:
+			g_value_set_object(value,
+			                   purple_request_field_account_get_value(field));
 			break;
-		case PROP_REQUIRED:
+		case PROP_SHOW_ALL:
 			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_account_get_show_all(field));
 			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
@@ -191,36 +77,24 @@ 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_account_set_property(GObject *obj, guint param_id,
+                                          const GValue *value,
+                                          GParamSpec *pspec)
 {
-	PurpleRequestField *field = PURPLE_REQUEST_FIELD(obj);
+	PurpleRequestFieldAccount *field = PURPLE_REQUEST_FIELD_ACCOUNT(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_account_set_default_value(field,
+			                                               g_value_get_object(value));
 			break;
-		case PROP_SENSITIVE:
-			purple_request_field_set_sensitive(field,
-			                                   g_value_get_boolean(value));
+		case PROP_VALUE:
+			purple_request_field_account_set_value(field,
+			                                       g_value_get_object(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_SHOW_ALL:
+			purple_request_field_account_set_show_all(field,
+			                                          g_value_get_boolean(value));
 			break;
 		default:
 			G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
@@ -229,160 +103,70 @@ purple_request_field_set_property(GObjec
 }
 
 static void
-purple_request_field_finalize(GObject *obj) {
-	PurpleRequestField *field = PURPLE_REQUEST_FIELD(obj);
-	PurpleRequestFieldPrivate *priv = NULL;
+purple_request_field_account_finalize(GObject *obj) {
+	PurpleRequestFieldAccount *field = PURPLE_REQUEST_FIELD_ACCOUNT(obj);
 
-	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);
+	g_clear_object(&field->default_account);
+	g_clear_object(&field->account);
 
-	if(priv->type == PURPLE_REQUEST_FIELD_STRING) {
-		g_free(priv->u.string.default_value);
-		g_free(priv->u.string.value);
-	} else 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_account_parent_class)->finalize(obj);
+}
 
-	G_OBJECT_CLASS(purple_request_field_parent_class)->finalize(obj);
+static void
+purple_request_field_account_init(G_GNUC_UNUSED PurpleRequestFieldAccount *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_account_class_init(PurpleRequestFieldAccountClass *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->finalize = purple_request_field_account_finalize;
+	obj_class->get_property = purple_request_field_account_get_property;
+	obj_class->set_property = purple_request_field_account_set_property;
 
 	/**
-	 * PurpleRequestField:id:
+	 * PurpleRequestFieldAccount:default-value:
 	 *
-	 * The ID of the field.
+	 * The default value of the field.
 	 *
 	 * 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.
-	 *
-	 * Since: 3.0.0
-	 */
-	properties[PROP_LABEL] = g_param_spec_string(
-		"label", "label",
-		"The label of the field.",
-		NULL,
+	properties[PROP_DEFAULT_VALUE] = g_param_spec_object(
+		"default-value", "default-value",
+		"The default value of the field.",
+		PURPLE_TYPE_ACCOUNT,
 		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:
+	 * PurpleRequestFieldAccount:value:
 	 *
-	 * 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.
+	 * The value 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,
+	properties[PROP_VALUE] = g_param_spec_object(
+		"value", "value",
+		"The value of the field.",
+		PURPLE_TYPE_ACCOUNT,
 		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 
 	/**
-	 * PurpleRequestField:required:
+	 * PurpleRequestFieldAccount:show-all:
 	 *
-	 * Whether the field is required to complete the request.
+	 * Whether to show all accounts in an account field.
+	 *
+	 * If %TRUE, all accounts, online or offline, will be shown. If %FALSE,
+	 * only online accounts will be shown.
 	 *
 	 * Since: 3.0.0
 	 */
-	properties[PROP_REQUIRED] = g_param_spec_boolean(
-		"required", "required",
-		"Whether the field is required to complete the request.",
+	properties[PROP_SHOW_ALL] = g_param_spec_boolean(
+		"show-all", "show-all",
+		"Whether to show all accounts in an account field.",
 		FALSE,
 		G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 
-	/**
-	 * PurpleRequestField:is-validatable:
-	 *
-	 * Whether the field can be validated by the requestor.
-	 *
-	 * 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.",
-		FALSE,
-		G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-
 	g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
 }
 
@@ -390,1040 +174,12 @@ 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_account_new(const char *id, const char *text,
+                                 PurpleAccount *account)
 {
-	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);
-
-	switch (purple_request_field_get_field_type(field))
-	{
-		case PURPLE_REQUEST_FIELD_STRING:
-			return (purple_request_field_string_get_value(field) != NULL &&
-				*(purple_request_field_string_get_value(field)) != '\0');
-		default:
-			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_string_new(const char *id, const char *text,
-							  const char *default_value, gboolean multiline)
-{
-	PurpleRequestField *field;
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	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_STRING);
-	priv = purple_request_field_get_instance_private(field);
-
-	priv->u.string.multiline = multiline;
-
-	purple_request_field_string_set_default_value(field, default_value);
-	purple_request_field_string_set_value(field, default_value);
-
-	return field;
-}
-
-void
-purple_request_field_string_set_default_value(PurpleRequestField *field,
-											const char *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_STRING);
-
-	g_free(priv->u.string.default_value);
-	priv->u.string.default_value = g_strdup(default_value);
-}
-
-void
-purple_request_field_string_set_value(PurpleRequestField *field, const char *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_STRING);
-
-	g_free(priv->u.string.value);
-	priv->u.string.value = g_strdup(value);
-}
-
-void
-purple_request_field_string_set_masked(PurpleRequestField *field, gboolean masked)
-{
-	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_STRING);
-
-	priv->u.string.masked = masked;
-}
-
-const char *
-purple_request_field_string_get_default_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_STRING, NULL);
-
-	return priv->u.string.default_value;
-}
-
-const char *
-purple_request_field_string_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_STRING, NULL);
-
-	return priv->u.string.value;
-}
-
-gboolean
-purple_request_field_string_is_multiline(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_STRING, FALSE);
-
-	return priv->u.string.multiline;
-}
-
-gboolean
-purple_request_field_string_is_masked(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_STRING, FALSE);
-
-	return priv->u.string.masked;
-}
-
-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;
-}
-
-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)
-{
-	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_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;
-}
-
-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;
-}
-
-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);
-}
-
-void
-purple_request_field_list_add_selected(PurpleRequestField *field, const char *item)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_if_fail(PURPLE_IS_REQUEST_FIELD(field));
-	g_return_if_fail(item  != NULL);
-
-	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));
-		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;
-	}
-
-	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;
-}
-
-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;
-
-	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;
-}
-
-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;
-}
-
-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;
-}
-
-PurpleRequestField *
-purple_request_field_account_new(const char *id, const char *text,
-							   PurpleAccount *account)
-{
-	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_ACCOUNT);
-
 	if(account == NULL) {
 		PurpleAccountManager *manager = purple_account_manager_get_default();
 		GList *accounts = purple_account_manager_get_connected(manager);
@@ -1434,233 +190,106 @@ purple_request_field_account_new(const c
 		}
 	}
 
-	purple_request_field_account_set_default_value(field, account);
-	purple_request_field_account_set_value(field, account);
-
-	return field;
+	return g_object_new(PURPLE_TYPE_REQUEST_FIELD_ACCOUNT,
+	                    "id", id,
+	                    "label", text,
+	                    "default-value", account,
+	                    "value", account,
+	                    NULL);
 }
 
 void
-purple_request_field_account_set_default_value(PurpleRequestField *field,
-											 PurpleAccount *default_value)
+purple_request_field_account_set_default_value(PurpleRequestFieldAccount *field,
+                                               PurpleAccount *default_value)
 {
-	PurpleRequestFieldPrivate *priv = NULL;
+	g_return_if_fail(PURPLE_IS_REQUEST_FIELD_ACCOUNT(field));
 
-	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_ACCOUNT);
-
-	priv->u.account.default_account = default_value;
+	if(g_set_object(&field->default_account, default_value)) {
+		g_object_notify_by_pspec(G_OBJECT(field),
+		                         properties[PROP_DEFAULT_VALUE]);
+	}
 }
 
 void
-purple_request_field_account_set_value(PurpleRequestField *field,
-									 PurpleAccount *value)
+purple_request_field_account_set_value(PurpleRequestFieldAccount *field,
+                                       PurpleAccount *value)
 {
-	PurpleRequestFieldPrivate *priv = NULL;
+	g_return_if_fail(PURPLE_IS_REQUEST_FIELD_ACCOUNT(field));
 
-	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_ACCOUNT);
-
-	priv->u.account.account = value;
+	if(g_set_object(&field->account, value)) {
+		g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_VALUE]);
+	}
 }
 
 void
-purple_request_field_account_set_show_all(PurpleRequestField *field,
-										gboolean show_all)
+purple_request_field_account_set_show_all(PurpleRequestFieldAccount *field,
+                                          gboolean show_all)
 {
-	PurpleRequestFieldPrivate *priv = NULL;
+	g_return_if_fail(PURPLE_IS_REQUEST_FIELD_ACCOUNT(field));
 
-	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_ACCOUNT);
-
-	if(priv->u.account.show_all == show_all) {
+	if(field->show_all == show_all) {
 		return;
 	}
 
-	priv->u.account.show_all = show_all;
+	field->show_all = show_all;
+
+	g_object_freeze_notify(G_OBJECT(field));
 
 	if(!show_all) {
 		PurpleAccountManager *manager = purple_account_manager_get_default();
 		GList *accounts = purple_account_manager_get_connected(manager);
 
-		if(purple_account_is_connected(priv->u.account.default_account)) {
+		if(purple_account_is_connected(field->default_account)) {
 			purple_request_field_account_set_default_value(field,
 			                                               accounts->data);
 		}
 
-		if(purple_account_is_connected(priv->u.account.account)) {
-			purple_request_field_account_set_value(field,
-			                                       accounts->data);
+		if(purple_account_is_connected(field->account)) {
+			purple_request_field_account_set_value(field, accounts->data);
 		}
 
 		g_list_free(accounts);
 	}
+
+	g_object_notify_by_pspec(G_OBJECT(field), properties[PROP_SHOW_ALL]);
+
+	g_object_thaw_notify(G_OBJECT(field));
 }
 
 void
-purple_request_field_account_set_filter(PurpleRequestField *field,
-									  PurpleFilterAccountFunc filter_func)
+purple_request_field_account_set_filter(PurpleRequestFieldAccount *field,
+                                        PurpleFilterAccountFunc filter_func)
 {
-	PurpleRequestFieldPrivate *priv = NULL;
+	g_return_if_fail(PURPLE_IS_REQUEST_FIELD_ACCOUNT(field));
 
-	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_ACCOUNT);
-
-	priv->u.account.filter_func = filter_func;
+	field->filter_func = filter_func;
 }
 
 PurpleAccount *
-purple_request_field_account_get_default_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
+purple_request_field_account_get_default_value(PurpleRequestFieldAccount *field)
+{
+	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD_ACCOUNT(field), NULL);
 
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_ACCOUNT, NULL);
-
-	return priv->u.account.default_account;
+	return field->default_account;
 }
 
 PurpleAccount *
-purple_request_field_account_get_value(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
-	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD(field), NULL);
+purple_request_field_account_get_value(PurpleRequestFieldAccount *field) {
+	g_return_val_if_fail(PURPLE_IS_REQUEST_FIELD_ACCOUNT(field), NULL);
 
-	priv = purple_request_field_get_instance_private(field);
-	g_return_val_if_fail(priv->type == PURPLE_REQUEST_FIELD_ACCOUNT, NULL);
-
-	return priv->u.account.account;
+	return field->account;
 }
 
 gboolean
-purple_request_field_account_get_show_all(PurpleRequestField *field) {
-	PurpleRequestFieldPrivate *priv = NULL;
-
+purple_request_field_account_get_show_all(PurpleRequestFieldAccount *field) {
 	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_ACCOUNT, FALSE);
-
-	return priv->u.account.show_all;
+	return field->show_all;
 }
 
 PurpleFilterAccountFunc
-purple_request_field_account_get_filter(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_ACCOUNT, FALSE);
-
-	return priv->u.account.filter_func;
-}
-
-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;
-
+purple_request_field_account_get_filter(PurpleRequestFieldAccount *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_DATASHEET, NULL);
-
-	return priv->u.datasheet.sheet;
-}
-
-/* -- */
-
-gboolean
-purple_request_field_email_validator(PurpleRequestField *field, gchar **errmsg,
-                                     G_GNUC_UNUSED gpointer user_data)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-	const char *value;
-
-	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_STRING, FALSE);
-
-	value = purple_request_field_string_get_value(field);
-
-	if (value != NULL && purple_email_is_valid(value))
-		return TRUE;
-
-	if (errmsg)
-		*errmsg = g_strdup(_("Invalid email address"));
-	return FALSE;
+	return field->filter_func;
 }
-
-gboolean
-purple_request_field_alphanumeric_validator(PurpleRequestField *field,
-	gchar **errmsg, void *allowed_characters)
-{
-	PurpleRequestFieldPrivate *priv = NULL;
-	const char *value;
-	gchar invalid_char = '\0';
-
-	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_STRING, FALSE);
-
-	value = purple_request_field_string_get_value(field);
-
-	g_return_val_if_fail(value != NULL, FALSE);
-
-	if (allowed_characters)
-	{
-		gchar *value_r = g_strdup(value);
-		g_strcanon(value_r, allowed_characters, '\0');
-		invalid_char = value[strlen(value_r)];
-		g_free(value_r);
-	}
-	else
-	{
-		while (value)
-		{
-			if (!g_ascii_isalnum(*value))
-			{
-				invalid_char = *value;
-				break;
-			}
-			value++;
-		}
-	}
-	if (!invalid_char)
-		return TRUE;
-
-	if (errmsg)
-		*errmsg = g_strdup_printf(_("Invalid character '%c'"),
-			invalid_char);
-	return FALSE;
-}
diff --git a/libpurple/purplerequestpage.c b/libpurple/purplerequestpage.c
--- a/libpurple/purplerequestpage.c
+++ b/libpurple/purplerequestpage.c
@@ -23,6 +23,7 @@
 
 #include "glibcompat.h"
 #include "purplerequestpage.h"
+#include "request/purplerequestfieldaccount.h"
 #include "purpleprivate.h"
 
 struct _PurpleRequestPage {
@@ -351,9 +352,10 @@ purple_request_page_get_account(PurpleRe
 	g_return_val_if_fail(PURPLE_IS_REQUEST_PAGE(page), NULL);
 	g_return_val_if_fail(id     != NULL, NULL);
 
-	if((field = purple_request_page_get_field(page, id)) == NULL) {
+	field = purple_request_page_get_field(page, id);
+	if(!PURPLE_IS_REQUEST_FIELD_ACCOUNT(field)) {
 		return NULL;
 	}
 
-	return purple_request_field_account_get_value(field);
+	return purple_request_field_account_get_value(PURPLE_REQUEST_FIELD_ACCOUNT(field));
 }
diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -268,7 +268,8 @@ field_account_cb(GObject *obj, G_GNUC_UN
 	PidginAccountChooser *chooser = PIDGIN_ACCOUNT_CHOOSER(obj);
 
 	purple_request_field_account_set_value(
-	        field, pidgin_account_chooser_get_selected(chooser));
+	        PURPLE_REQUEST_FIELD_ACCOUNT(field),
+	        pidgin_account_chooser_get_selected(chooser));
 
 	req_field_changed_common(GTK_WIDGET(obj), field);
 }
@@ -1083,8 +1084,8 @@ setup_entry_field(GtkWidget *entry, Purp
 				PurpleRequestField *fld = fields->data;
 				fields = fields->next;
 
-				if (purple_request_field_get_field_type(fld) == PURPLE_REQUEST_FIELD_ACCOUNT &&
-						purple_request_field_is_visible(fld))
+				if(PURPLE_IS_REQUEST_FIELD_ACCOUNT(fld) &&
+				   purple_request_field_is_visible(fld))
 				{
 					const char *type_hint = purple_request_field_get_type_hint(fld);
 					if (purple_strequal(type_hint, "account"))
@@ -1316,15 +1317,17 @@ field_custom_account_filter_cb(gpointer 
 static GtkWidget *
 create_account_field(PurpleRequestField *field)
 {
+	PurpleRequestFieldAccount *afield = NULL;
 	GtkWidget *widget = NULL;
 	PurpleAccount *account = NULL;
 	PurpleFilterAccountFunc account_filter = NULL;
 	GtkFilter *filter = NULL;
 
 	widget = pidgin_account_chooser_new();
-	account  = purple_request_field_account_get_default_value(field);
-
-	account_filter = purple_request_field_account_get_filter(field);
+	afield = PURPLE_REQUEST_FIELD_ACCOUNT(field);
+	account = purple_request_field_account_get_default_value(afield);
+
+	account_filter = purple_request_field_account_get_filter(afield);
 	if(account_filter != NULL) {
 		GtkCustomFilter *custom_filter = NULL;
 
@@ -1334,7 +1337,7 @@ create_account_field(PurpleRequestField 
 		filter = GTK_FILTER(custom_filter);
 	}
 
-	if(!purple_request_field_account_get_show_all(field)) {
+	if(!purple_request_field_account_get_show_all(afield)) {
 		GtkEveryFilter *every = NULL;
 
 		every = gtk_every_filter_new();
@@ -2144,9 +2147,9 @@ pidgin_request_fields(const char *title,
 						widget = create_list_field(field);
 					else if (type == PURPLE_REQUEST_FIELD_IMAGE)
 						widget = create_image_field(field);
-					else if (type == PURPLE_REQUEST_FIELD_ACCOUNT)
+					else if(PURPLE_IS_REQUEST_FIELD_ACCOUNT(field)) {
 						widget = create_account_field(field);
-					else if (type == PURPLE_REQUEST_FIELD_DATASHEET)
+					} else if (type == PURPLE_REQUEST_FIELD_DATASHEET)
 						widget = create_datasheet_field(field, datasheet_buttons_sg);
 					else
 						continue;
