pidgin/gtkconv.c

changeset 21891
43b8ee31fb10
parent 21883
229102b0bda8
child 21899
f8cbf5a31abe
equal deleted inserted replaced
21889:ab9f22496fae 21891:43b8ee31fb10
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 }
6636 unseen = PIDGIN_UNSEEN_NO_LOG; 6636 unseen = PIDGIN_UNSEEN_NO_LOG;
6637 else 6637 else
6638 unseen = PIDGIN_UNSEEN_TEXT; 6638 unseen = PIDGIN_UNSEEN_TEXT;
6639 6639
6640 conv_set_unseen(conv, unseen); 6640 conv_set_unseen(conv, unseen);
6641 purple_conversation_update(conv, PURPLE_CONV_UPDATE_UNSEEN);
6642 } 6641 }
6643 } 6642 }
6644 6643
6645 static PurpleConversationUiOps conversation_ui_ops = 6644 static PurpleConversationUiOps conversation_ui_ops =
6646 { 6645 {
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

mercurial