Mercurial > pidgin
comparison src/gtkblist.c @ 8898:de87e510ff9a
[gaim-migrate @ 9667]
This makes the history plugin work in chats and not just conversations.
To do this I had to change some functions in log.c to pass around the
GaimLogType (GAIM_LOG_IM, GAIM_LOG_CHAT, or GAIM_LOG_SYSTEM). I hope
that's not a problem...
Here's how I see it:
When creating a new GaimLog you need 3 things, the type, your account
and the name of the other person/chat.
It only makes sense that you would need those same 3 things to find a
log. Or to calculate log size.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 07 May 2004 02:30:02 +0000 |
parents | 07f57b71bd5e |
children | 35b68d76cb4c |
comparison
equal
deleted
inserted
replaced
8897:8ffd1679df93 | 8898:de87e510ff9a |
---|---|
4773 if(cur && (gtk_tree_model_iter_n_children(GTK_TREE_MODEL(gtkblist->treemodel), &groupiter) == 1)) | 4773 if(cur && (gtk_tree_model_iter_n_children(GTK_TREE_MODEL(gtkblist->treemodel), &groupiter) == 1)) |
4774 return *cur; | 4774 return *cur; |
4775 | 4775 |
4776 if(GAIM_BLIST_NODE_IS_CONTACT(node)) { | 4776 if(GAIM_BLIST_NODE_IS_CONTACT(node)) { |
4777 for (n = node->child; n; n = n->next) | 4777 for (n = node->child; n; n = n->next) |
4778 log_size += gaim_log_get_total_size(((GaimBuddy*)(n))->name, ((GaimBuddy*)(n))->account); | 4778 log_size += gaim_log_get_total_size(GAIM_LOG_IM, ((GaimBuddy*)(n))->name, ((GaimBuddy*)(n))->account); |
4779 buddy_name = gaim_contact_get_alias((GaimContact*)node); | 4779 buddy_name = gaim_contact_get_alias((GaimContact*)node); |
4780 } else if(GAIM_BLIST_NODE_IS_CHAT(node)) { | 4780 } else if(GAIM_BLIST_NODE_IS_CHAT(node)) { |
4781 /* we don't have a reliable way of getting the log filename | 4781 /* we don't have a reliable way of getting the log filename |
4782 * from the chat info in the blist, yet */ | 4782 * from the chat info in the blist, yet */ |
4783 if(cur) | 4783 if(cur) |
4802 n = g_value_get_pointer(&val); | 4802 n = g_value_get_pointer(&val); |
4803 this_log_size = 0; | 4803 this_log_size = 0; |
4804 | 4804 |
4805 if(GAIM_BLIST_NODE_IS_CONTACT(n)) { | 4805 if(GAIM_BLIST_NODE_IS_CONTACT(n)) { |
4806 for (n2 = n->child; n2; n2 = n2->next) | 4806 for (n2 = n->child; n2; n2 = n2->next) |
4807 this_log_size += gaim_log_get_total_size(((GaimBuddy*)(n2))->name, ((GaimBuddy*)(n2))->account); | 4807 this_log_size += gaim_log_get_total_size(GAIM_LOG_IM, ((GaimBuddy*)(n2))->name, ((GaimBuddy*)(n2))->account); |
4808 this_buddy_name = gaim_contact_get_alias((GaimContact*)n); | 4808 this_buddy_name = gaim_contact_get_alias((GaimContact*)n); |
4809 } else { | 4809 } else { |
4810 this_buddy_name = NULL; | 4810 this_buddy_name = NULL; |
4811 } | 4811 } |
4812 | 4812 |