changeset 11655:527cf464140b

[gaim-migrate @ 13939] Don't hardcode GAIM_STATUS_AWAY, dummy committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 13 Oct 2005 03:23:38 +0000
parents bf6ba37db13b
children f9c5480ad0ce
files src/gtkstatusbox.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkstatusbox.c	Thu Oct 13 02:50:13 2005 +0000
+++ b/src/gtkstatusbox.c	Thu Oct 13 03:23:38 2005 +0000
@@ -508,13 +508,24 @@
 	GaimStatusPrimitive primitive;
 	char *message;
 	GaimSavedStatus *saved_status;
+	int active_row;
 
 	gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter);
 	gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
 					   TYPE_COLUMN, &status_type_id,
 					   TITLE_COLUMN, &title, -1);
-	primitive = GAIM_STATUS_AWAY;
 	message = gtk_gaim_status_box_get_message(status_box);
+	active_row = gtk_combo_box_get_active(GTK_COMBO_BOX(status_box));
+	if (active_row == 0)
+		primitive = GAIM_STATUS_AVAILABLE;
+	else if (active_row == 1)
+		primitive = GAIM_STATUS_AWAY;
+	else if (active_row == 2)
+		primitive = GAIM_STATUS_HIDDEN;
+	else if (active_row == 3)
+		primitive = GAIM_STATUS_OFFLINE;
+	else
+		primitive = GAIM_STATUS_AVAILABLE;
 
 	/* TODO: Should save the previous status as a transient status? */