| 693 conv->type = type; |
693 conv->type = type; |
| 694 conv->account = account; |
694 conv->account = account; |
| 695 conv->name = g_strdup(name); |
695 conv->name = g_strdup(name); |
| 696 conv->title = g_strdup(name); |
696 conv->title = g_strdup(name); |
| 697 conv->send_history = g_list_append(NULL, NULL); |
697 conv->send_history = g_list_append(NULL, NULL); |
| 698 conv->history = g_string_new(""); |
|
| 699 conv->data = g_hash_table_new_full(g_str_hash, g_str_equal, |
698 conv->data = g_hash_table_new_full(g_str_hash, g_str_equal, |
| 700 g_free, NULL); |
699 g_free, NULL); |
| 701 conv->log = gaim_log_new(type == GAIM_CONV_CHAT ? GAIM_LOG_CHAT : |
700 conv->log = gaim_log_new(type == GAIM_CONV_CHAT ? GAIM_LOG_CHAT : |
| 702 GAIM_LOG_IM, conv->name, account, |
701 GAIM_LOG_IM, conv->name, account, |
| 703 time(NULL)); |
702 time(NULL)); |
| 875 node->data = NULL; |
874 node->data = NULL; |
| 876 } |
875 } |
| 877 |
876 |
| 878 g_list_free(g_list_first(conv->send_history)); |
877 g_list_free(g_list_first(conv->send_history)); |
| 879 |
878 |
| 880 if (conv->history != NULL) |
|
| 881 g_string_free(conv->history, TRUE); |
|
| 882 conv->history = NULL; |
|
| 883 |
|
| 884 conversations = g_list_remove(conversations, conv); |
879 conversations = g_list_remove(conversations, conv); |
| 885 |
880 |
| 886 if (conv->type == GAIM_CONV_IM) { |
881 if (conv->type == GAIM_CONV_IM) { |
| 887 gaim_conv_im_stop_typing_timeout(conv->u.im); |
882 gaim_conv_im_stop_typing_timeout(conv->u.im); |
| 888 gaim_conv_im_stop_type_again_timeout(conv->u.im); |
883 gaim_conv_im_stop_type_again_timeout(conv->u.im); |
| 1172 gaim_conversation_get_send_history(const GaimConversation *conv) |
1167 gaim_conversation_get_send_history(const GaimConversation *conv) |
| 1173 { |
1168 { |
| 1174 g_return_val_if_fail(conv != NULL, NULL); |
1169 g_return_val_if_fail(conv != NULL, NULL); |
| 1175 |
1170 |
| 1176 return conv->send_history; |
1171 return conv->send_history; |
| 1177 } |
|
| 1178 |
|
| 1179 void |
|
| 1180 gaim_conversation_set_history(GaimConversation *conv, GString *history) |
|
| 1181 { |
|
| 1182 g_return_if_fail(conv != NULL); |
|
| 1183 |
|
| 1184 conv->history = history; |
|
| 1185 } |
|
| 1186 |
|
| 1187 GString * |
|
| 1188 gaim_conversation_get_history(const GaimConversation *conv) |
|
| 1189 { |
|
| 1190 g_return_val_if_fail(conv != NULL, NULL); |
|
| 1191 |
|
| 1192 return conv->history; |
|
| 1193 } |
1172 } |
| 1194 |
1173 |
| 1195 GaimConvWindow * |
1174 GaimConvWindow * |
| 1196 gaim_conversation_get_window(const GaimConversation *conv) |
1175 gaim_conversation_get_window(const GaimConversation *conv) |
| 1197 { |
1176 { |