changeset 12310:a532eccfc7bb

[gaim-migrate @ 14614] I think gaim_status_is_available() is a more appropriate measure of availability for these things committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 04 Dec 2005 02:53:47 +0000
parents b3385115815c
children a2ebf585d8c6
files src/gtkconv.c
diffstat 1 files changed, 8 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Sat Dec 03 20:28:52 2005 +0000
+++ b/src/gtkconv.c	Sun Dec 04 02:53:47 2005 +0000
@@ -4087,9 +4087,7 @@
 
 	/* create hidden conv if hide_new pref is away and account is away */
 	if(strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/im/hide_new"), "away")==0
-			&& gaim_status_type_get_primitive(
-			gaim_status_get_type(
-			gaim_account_get_active_status(account))) == GAIM_STATUS_AWAY) {
+			&& !gaim_status_is_available(gaim_account_get_active_status(account))) {
 		ui_ops->create_conversation = gaim_gtkconv_new_hidden;
 		gaim_conversation_new(GAIM_CONV_TYPE_IM, account, sender);
 		ui_ops->create_conversation = gaim_gtkconv_new;
@@ -5711,10 +5709,7 @@
 	if(strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/im/hide_new"), "away")!=0)
 		return;
 
-	if(gaim_status_type_get_primitive(gaim_status_get_type(oldstatus))!=GAIM_STATUS_AWAY)
-		return;
-
-	if(gaim_status_type_get_primitive(gaim_status_get_type(newstatus))==GAIM_STATUS_AWAY)
+	if(gaim_status_is_available(oldstatus) || !gaim_status_is_available(newstatus))
 		return;
 
 	for (l = hidden_convwin->gtkconvs; l != NULL; l = l->next) {
@@ -5722,9 +5717,9 @@
 
 		conv = gtkconv->active_conv;
 
-		if(gaim_status_type_get_primitive(
-					gaim_status_get_type(gaim_account_get_active_status(
-							gaim_conversation_get_account(conv)))) == GAIM_STATUS_AWAY)
+		if(!gaim_status_is_available(
+					gaim_account_get_active_status(
+					gaim_conversation_get_account(conv))))
 			continue;
 
 		gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv);
@@ -5755,9 +5750,9 @@
 
 		conv = gtkconv->active_conv;
 
-		if(when_away && gaim_status_type_get_primitive(
-					gaim_status_get_type(gaim_account_get_active_status(
-					gaim_conversation_get_account(conv)))) == GAIM_STATUS_AWAY)
+		if(when_away && !gaim_status_is_available(
+							gaim_account_get_active_status(
+							gaim_conversation_get_account(conv))))
 			continue;
 
 		gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv);