changeset 20645:ff4afedf63b5

Don't show "tune" and "mobile" in the Edit a Status! window, and don't show independent statuses in the Edit a Substatus! window. Our interface doesn't really let users set independent statuses themselves. It probably should.
author Mark Doliner <mark@kingant.net>
date Wed, 26 Sep 2007 06:56:02 +0000
parents 55b11740897c
children 5f829728a1a5
files pidgin/gtksavedstatuses.c
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtksavedstatuses.c	Wed Sep 26 06:54:16 2007 +0000
+++ b/pidgin/gtksavedstatuses.c	Wed Sep 26 06:56:02 2007 +0000
@@ -63,7 +63,7 @@
 };
 
 /**
- * These is used for the GtkTreeView containing the list of accounts
+ * These are used for the GtkTreeView containing the list of accounts
  * at the bottom of the window when you're editing a particular
  * saved status.
  */
@@ -898,6 +898,12 @@
 
 	for (i = PURPLE_STATUS_UNSET + 1; i < PURPLE_STATUS_NUM_PRIMITIVES; i++)
 	{
+		if (i == PURPLE_STATUS_MOBILE || i == PURPLE_STATUS_TUNE)
+			/*
+			 * Special-case these.  They're intended to be independent
+			 * status types, so don't show them in the list.
+			 */
+			continue;
 		item = gtk_menu_item_new_with_label(purple_primitive_get_name_from_type(i));
 		gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
 	}
@@ -1588,8 +1594,12 @@
 
 		status_type = list->data;
 
-		/* Only allow users to select statuses that are flagged as "user settable" */
-		if (!purple_status_type_is_user_settable(status_type))
+		/*
+		 * Only allow users to select statuses that are flagged as
+		 * "user settable" and that aren't independent.
+		 */
+		if (!purple_status_type_is_user_settable(status_type) ||
+				purple_status_type_is_independent(status_type))
 			continue;
 
 		id = purple_status_type_get_id(status_type);