| 5091 /* create hidden conv if hide_new pref is away and account is away */ |
5091 /* create hidden conv if hide_new pref is away and account is away */ |
| 5092 if (strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "away") == 0 && |
5092 if (strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "away") == 0 && |
| 5093 !purple_status_is_available(purple_account_get_active_status(account))) |
5093 !purple_status_is_available(purple_account_get_active_status(account))) |
| 5094 hide = TRUE; |
5094 hide = TRUE; |
| 5095 |
5095 |
| 5096 if (PIDGIN_IS_PIDGIN_CONVERSATION(conv) && !hide) { |
5096 if (conv && PIDGIN_IS_PIDGIN_CONVERSATION(conv) && !hide) { |
| 5097 PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); |
5097 PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); |
| 5098 if (gtkconv->win == hidden_convwin) { |
5098 if (gtkconv->win == hidden_convwin) { |
| 5099 pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv); |
5099 pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv); |
| 5100 pidgin_conv_placement_place(gtkconv); |
5100 pidgin_conv_placement_place(gtkconv); |
| 5101 } |
5101 } |
| 7493 gtkconv = PIDGIN_CONVERSATION(conv); |
7492 gtkconv = PIDGIN_CONVERSATION(conv); |
| 7494 if (gtkconv->win != hidden_convwin) |
7493 if (gtkconv->win != hidden_convwin) |
| 7495 return FALSE; |
7494 return FALSE; |
| 7496 pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv); |
7495 pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv); |
| 7497 pidgin_conv_placement_place(gtkconv); |
7496 pidgin_conv_placement_place(gtkconv); |
| |
7497 purple_signal_emit(pidgin_conversations_get_handle(), |
| |
7498 "conversation-displayed", gtkconv); |
| 7498 return TRUE; |
7499 return TRUE; |
| 7499 } |
7500 } |
| 7500 |
7501 |
| 7501 pidgin_conv_attach(conv); |
7502 pidgin_conv_attach(conv); |
| 7502 gtkconv = PIDGIN_CONVERSATION(conv); |
7503 gtkconv = PIDGIN_CONVERSATION(conv); |
| 7712 purple_value_new(PURPLE_TYPE_SUBTYPE, |
7713 purple_value_new(PURPLE_TYPE_SUBTYPE, |
| 7713 PURPLE_SUBTYPE_CONVERSATION), |
7714 PURPLE_SUBTYPE_CONVERSATION), |
| 7714 purple_value_new(PURPLE_TYPE_INT)); |
7715 purple_value_new(PURPLE_TYPE_INT)); |
| 7715 |
7716 |
| 7716 purple_signal_register(handle, "conversation-switched", |
7717 purple_signal_register(handle, "conversation-switched", |
| 7717 purple_marshal_VOID__POINTER_POINTER, NULL, 1, |
7718 purple_marshal_VOID__POINTER, NULL, 1, |
| 7718 purple_value_new(PURPLE_TYPE_SUBTYPE, |
7719 purple_value_new(PURPLE_TYPE_SUBTYPE, |
| 7719 PURPLE_SUBTYPE_CONVERSATION)); |
7720 PURPLE_SUBTYPE_CONVERSATION)); |
| 7720 |
7721 |
| 7721 purple_signal_register(handle, "conversation-hiding", |
7722 purple_signal_register(handle, "conversation-hiding", |
| 7722 purple_marshal_VOID__POINTER_POINTER, NULL, 1, |
7723 purple_marshal_VOID__POINTER, NULL, 1, |
| 7723 purple_value_new(PURPLE_TYPE_BOXED, |
7724 purple_value_new(PURPLE_TYPE_BOXED, |
| 7724 "PidginConversation *")); |
7725 "PidginConversation *")); |
| 7725 |
7726 |
| 7726 purple_signal_register(handle, "conversation-displayed", |
7727 purple_signal_register(handle, "conversation-displayed", |
| 7727 purple_marshal_VOID__POINTER_POINTER, NULL, 1, |
7728 purple_marshal_VOID__POINTER, NULL, 1, |
| 7728 purple_value_new(PURPLE_TYPE_BOXED, |
7729 purple_value_new(PURPLE_TYPE_BOXED, |
| 7729 "PidginConversation *")); |
7730 "PidginConversation *")); |
| 7730 |
7731 |
| 7731 /********************************************************************** |
7732 /********************************************************************** |
| 7732 * Register commands |
7733 * Register commands |