[gaim-migrate @ 8559]

Sun, 21 Dec 2003 08:01:06 +0000

author
Christian Hammond <chipx86@chipx86.com>
date
Sun, 21 Dec 2003 08:01:06 +0000
changeset 7899
b908d0b9035a
parent 7898
83687727b4a3
child 7900
468bd591cabe

[gaim-migrate @ 8559]
I forgot to allow for the setting/retrieval of multiple selection in a
list. There we go.

src/request.c file | annotate | diff | comparison | revisions
src/request.h file | annotate | diff | comparison | revisions
--- 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.

mercurial