Mercurial > pidgin
comparison src/gtkconv.c @ 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 | 3897229ccb33 |
children | 3726ff9022f3 |
comparison
equal
deleted
inserted
replaced
12309:b3385115815c | 12310:a532eccfc7bb |
---|---|
4085 return; | 4085 return; |
4086 } | 4086 } |
4087 | 4087 |
4088 /* create hidden conv if hide_new pref is away and account is away */ | 4088 /* create hidden conv if hide_new pref is away and account is away */ |
4089 if(strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/im/hide_new"), "away")==0 | 4089 if(strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/im/hide_new"), "away")==0 |
4090 && gaim_status_type_get_primitive( | 4090 && !gaim_status_is_available(gaim_account_get_active_status(account))) { |
4091 gaim_status_get_type( | |
4092 gaim_account_get_active_status(account))) == GAIM_STATUS_AWAY) { | |
4093 ui_ops->create_conversation = gaim_gtkconv_new_hidden; | 4091 ui_ops->create_conversation = gaim_gtkconv_new_hidden; |
4094 gaim_conversation_new(GAIM_CONV_TYPE_IM, account, sender); | 4092 gaim_conversation_new(GAIM_CONV_TYPE_IM, account, sender); |
4095 ui_ops->create_conversation = gaim_gtkconv_new; | 4093 ui_ops->create_conversation = gaim_gtkconv_new; |
4096 return; | 4094 return; |
4097 } | 4095 } |
5709 GaimGtkConversation *gtkconv; | 5707 GaimGtkConversation *gtkconv; |
5710 | 5708 |
5711 if(strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/im/hide_new"), "away")!=0) | 5709 if(strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/im/hide_new"), "away")!=0) |
5712 return; | 5710 return; |
5713 | 5711 |
5714 if(gaim_status_type_get_primitive(gaim_status_get_type(oldstatus))!=GAIM_STATUS_AWAY) | 5712 if(gaim_status_is_available(oldstatus) || !gaim_status_is_available(newstatus)) |
5715 return; | |
5716 | |
5717 if(gaim_status_type_get_primitive(gaim_status_get_type(newstatus))==GAIM_STATUS_AWAY) | |
5718 return; | 5713 return; |
5719 | 5714 |
5720 for (l = hidden_convwin->gtkconvs; l != NULL; l = l->next) { | 5715 for (l = hidden_convwin->gtkconvs; l != NULL; l = l->next) { |
5721 gtkconv = l->data; | 5716 gtkconv = l->data; |
5722 | 5717 |
5723 conv = gtkconv->active_conv; | 5718 conv = gtkconv->active_conv; |
5724 | 5719 |
5725 if(gaim_status_type_get_primitive( | 5720 if(!gaim_status_is_available( |
5726 gaim_status_get_type(gaim_account_get_active_status( | 5721 gaim_account_get_active_status( |
5727 gaim_conversation_get_account(conv)))) == GAIM_STATUS_AWAY) | 5722 gaim_conversation_get_account(conv)))) |
5728 continue; | 5723 continue; |
5729 | 5724 |
5730 gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv); | 5725 gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv); |
5731 gaim_gtkconv_placement_place(gtkconv); | 5726 gaim_gtkconv_placement_place(gtkconv); |
5732 } | 5727 } |
5753 for (l = hidden_convwin->gtkconvs; l != NULL; l = l->next) { | 5748 for (l = hidden_convwin->gtkconvs; l != NULL; l = l->next) { |
5754 gtkconv = l->data; | 5749 gtkconv = l->data; |
5755 | 5750 |
5756 conv = gtkconv->active_conv; | 5751 conv = gtkconv->active_conv; |
5757 | 5752 |
5758 if(when_away && gaim_status_type_get_primitive( | 5753 if(when_away && !gaim_status_is_available( |
5759 gaim_status_get_type(gaim_account_get_active_status( | 5754 gaim_account_get_active_status( |
5760 gaim_conversation_get_account(conv)))) == GAIM_STATUS_AWAY) | 5755 gaim_conversation_get_account(conv)))) |
5761 continue; | 5756 continue; |
5762 | 5757 |
5763 gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv); | 5758 gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv); |
5764 gaim_gtkconv_placement_place(gtkconv); | 5759 gaim_gtkconv_placement_place(gtkconv); |
5765 } | 5760 } |