changeset 7899:7b64108b8ae3

[gaim-migrate @ 8559] I forgot to allow for the setting/retrieval of multiple selection in a list. There we go. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 21 Dec 2003 08:01:06 +0000
parents 9c0ea21997a9
children 365d8a67972d
files src/request.c src/request.h
diffstat 2 files changed, 39 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/request.c	Sun Dec 21 07:52:26 2003 +0000
+++ b/src/request.c	Sun Dec 21 08:01:06 2003 +0000
@@ -663,6 +663,25 @@
 }
 
 void
+gaim_request_field_list_set_multi_select(GaimRequestField *field,
+										 gboolean multi_select)
+{
+	g_return_if_fail(field != NULL);
+	g_return_if_fail(field->type == GAIM_REQUEST_FIELD_LIST);
+
+	field->u.list.multiple_selection = multi_select;
+}
+
+gboolean
+gaim_request_field_list_get_multi_select(const GaimRequestField *field)
+{
+	g_return_val_if_fail(field != NULL, FALSE);
+	g_return_val_if_fail(field->type == GAIM_REQUEST_FIELD_LIST, FALSE);
+
+	return field->u.list.multiple_selection;
+}
+
+void
 gaim_request_field_list_add(GaimRequestField *field, const char *item)
 {
 	g_return_if_fail(field != NULL);
--- a/src/request.h	Sun Dec 21 07:52:26 2003 +0000
+++ b/src/request.h	Sun Dec 21 08:01:06 2003 +0000
@@ -705,6 +705,26 @@
 void gaim_request_field_list_set_items(GaimRequestField *field, GList *items);
 
 /**
+ * Sets whether or not a list field allows multiple selection.
+ *
+ * @param field        The list field.
+ * @param multi_select TRUE if multiple selection is enabled,
+ *                     or FALSE otherwise.
+ */
+void gaim_request_field_list_set_multi_select(GaimRequestField *field,
+											  gboolean multi_select);
+
+/**
+ * Returns whether or not a list field allows multiple selection.
+ *
+ * @param field The list field.
+ *
+ * @return TRUE if multiple selection is enabled, or FALSE otherwise.
+ */
+gboolean gaim_request_field_list_get_multi_select(
+	const GaimRequestField *field);
+
+/**
  * Adds an item to a list field.
  *
  * @param field The list field.