[gaim-migrate @ 15363]

Mon, 23 Jan 2006 04:18:34 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Mon, 23 Jan 2006 04:18:34 +0000
changeset 13010
2fbe02bcd876
parent 13009
12ef9f229961
child 13011
b41d13bd682d

[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

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

mercurial