changeset 13010:e348ed834acc

[gaim-migrate @ 15363] Make sure AIM users can't try to set themselves "DND" or Extended Away or whatever by respected the "is user settable?" flag for status types in gtksavedstatuses.c committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 23 Jan 2006 04:18:34 +0000
parents 661bce46758b
children 5e14039d0415
files src/gtksavedstatuses.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtksavedstatuses.c	Mon Jan 23 04:17:27 2006 +0000
+++ b/src/gtksavedstatuses.c	Mon Jan 23 04:18:34 2006 +0000
@@ -759,8 +759,8 @@
 	if (status_window != NULL)
 	  add_status_to_saved_status_list(status_window->model, saved_status);
 
-	if ((button == dialog->saveanduse_button)
-			|| (button != dialog->save_button))
+	/* If they clicked on "Save & Use" or "Use," then activate the status */
+	if (button != dialog->save_button)
 		gaim_savedstatus_activate(saved_status);
 }
 
@@ -1463,6 +1463,11 @@
 		const char *id, *name;
 
 		status_type = list->data;
+
+		/* Only allow users to select statuses that are flagged as "user settable" */
+		if (!gaim_status_type_is_user_settable(status_type))
+			continue;
+
 		id = gaim_status_type_get_id(status_type);
 		pixbuf = gaim_gtk_create_prpl_icon_with_status(account, status_type);
 		if (pixbuf != NULL)