Mercurial > pidgin
diff libpurple/plugins/log_reader.c @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | f07501af8bae |
children |
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c Sat Jun 02 02:30:13 2012 +0000 +++ b/libpurple/plugins/log_reader.c Sat Jun 02 02:30:49 2012 +0000 @@ -92,7 +92,7 @@ prpl_name = g_ascii_strup(prpl_info->list_icon(account, NULL), -1); - temp = g_strdup_printf("%s.%s", prpl_name, account->username); + temp = g_strdup_printf("%s.%s", prpl_name, purple_account_get_username(account)); path = g_build_filename(logdir, temp, sn, NULL); g_free(temp); @@ -635,7 +635,7 @@ g_return_val_if_fail(sn != NULL, NULL); g_return_val_if_fail(account != NULL, NULL); - if (strcmp(account->protocol_id, "prpl-msn")) + if (strcmp(purple_account_get_protocol_id(account), "prpl-msn")) return NULL; logdir = purple_prefs_get_string("/plugins/core/log_reader/msn/log_directory"); @@ -658,7 +658,7 @@ return list; } } else { - username = g_strdup(purple_normalize(account, account->username)); + username = g_strdup(purple_normalize(account, purple_account_get_username(account))); } if (buddy) { @@ -974,7 +974,7 @@ their_name = from_name; if (from_name && purple_prefs_get_bool("/plugins/core/log_reader/use_name_heuristics")) { - const char *friendly_name = purple_connection_get_display_name(log->account->gc); + const char *friendly_name = purple_connection_get_display_name(purple_account_get_connection(log->account)); if (friendly_name != NULL) { int friendly_name_length = strlen(friendly_name); @@ -987,13 +987,10 @@ if (buddy) their_name = purple_buddy_get_alias(buddy); - if (log->account->alias) - { - alias = log->account->alias; + alias = purple_account_get_alias(log->account); + if (alias) { alias_length = strlen(alias); - } - else - { + } else { alias = ""; alias_length = 0; } @@ -1115,10 +1112,10 @@ text = g_string_append(text, "<b>"); if (name_guessed == NAME_GUESS_ME) { - if (log->account->alias) - text = g_string_append(text, log->account->alias); + if (purple_account_get_alias(log->account)) + text = g_string_append(text, purple_account_get_alias(log->account)); else - text = g_string_append(text, log->account->username); + text = g_string_append(text, purple_account_get_username(log->account)); } else if (name_guessed == NAME_GUESS_THEM) text = g_string_append(text, their_name); @@ -1781,7 +1778,7 @@ g_return_val_if_fail(account != NULL, NULL); /* QIP only supports ICQ. */ - if (strcmp(account->protocol_id, "prpl-icq")) + if (strcmp(purple_account_get_protocol_id(account), "prpl-icq")) return NULL; logdir = purple_prefs_get_string("/plugins/core/log_reader/qip/log_directory"); @@ -1798,7 +1795,7 @@ if (!prpl_info->list_icon) return NULL; - username = g_strdup(purple_normalize(account, account->username)); + username = g_strdup(purple_normalize(account, purple_account_get_username(account))); filename = g_strdup_printf("%s.txt", purple_normalize(account, sn)); path = g_build_filename(logdir, username, "History", filename, NULL); g_free(username); @@ -2206,7 +2203,6 @@ log->logger = amsn_logger; log->logger_data = data; list = g_list_prepend(list, log); - found_start = FALSE; purple_debug_info("aMSN logger", "Found log for %s:" @@ -2241,10 +2237,10 @@ return NULL; /* aMSN only works with MSN/WLM */ - if (strcmp(account->protocol_id, "prpl-msn")) + if (strcmp(purple_account_get_protocol_id(account), "prpl-msn")) return NULL; - username = g_strdup(purple_normalize(account, account->username)); + username = g_strdup(purple_normalize(account, purple_account_get_username(account))); buddy_log = g_strdup_printf("%s.log", purple_normalize(account, sn)); log_path = g_build_filename(logdir, username, "logs", NULL);