| 247 GDir *dir; |
247 GDir *dir; |
| 248 GList *list = NULL; |
248 GList *list = NULL; |
| 249 const char *filename; |
249 const char *filename; |
| 250 char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account))); |
250 char *me = g_strdup(gaim_normalize(account, gaim_account_get_username(account))); |
| 251 |
251 |
| |
252 /* does this seem like a bad way to get this component of the path to anyone else? --Nathan */ |
| 252 const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO |
253 const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO |
| 253 (gaim_find_prpl(gaim_account_get_protocol(account)))->list_icon(account, NULL); |
254 (gaim_find_prpl(gaim_account_get_protocol_id(account)))->list_icon(account, NULL); |
| 254 char *path = g_build_filename(gaim_user_dir(), "logs", prpl, me, gaim_normalize(account, screenname), NULL); |
255 char *path = g_build_filename(gaim_user_dir(), "logs", prpl, me, gaim_normalize(account, screenname), NULL); |
| 255 |
256 |
| 256 g_free(me); |
257 g_free(me); |
| 257 |
258 |
| 258 if (!(dir = g_dir_open(path, 0, NULL))) { |
259 if (!(dir = g_dir_open(path, 0, NULL))) { |
| 428 /* This log is new */ |
429 /* This log is new */ |
| 429 char *ud = gaim_user_dir(); |
430 char *ud = gaim_user_dir(); |
| 430 char *guy = g_strdup(gaim_normalize(log->account, gaim_account_get_username(log->account))); |
431 char *guy = g_strdup(gaim_normalize(log->account, gaim_account_get_username(log->account))); |
| 431 char *chat; |
432 char *chat; |
| 432 const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO |
433 const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO |
| 433 (gaim_find_prpl(gaim_account_get_protocol(log->account)))->list_icon(log->account, NULL); |
434 (gaim_find_prpl(gaim_account_get_protocol_id(log->account)))->list_icon(log->account, NULL); |
| 434 char *dir; |
435 char *dir; |
| 435 char *filename; |
436 char *filename; |
| 436 |
437 |
| 437 if (log->type == GAIM_LOG_CHAT) { |
438 if (log->type == GAIM_LOG_CHAT) { |
| 438 chat = g_strdup_printf("%s.chat", guy); |
439 chat = g_strdup_printf("%s.chat", guy); |
| 575 char *ud = gaim_user_dir(); |
576 char *ud = gaim_user_dir(); |
| 576 char *filename; |
577 char *filename; |
| 577 char *guy = g_strdup(gaim_normalize(log->account, gaim_account_get_username(log->account))); |
578 char *guy = g_strdup(gaim_normalize(log->account, gaim_account_get_username(log->account))); |
| 578 char *chat; |
579 char *chat; |
| 579 const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO |
580 const char *prpl = GAIM_PLUGIN_PROTOCOL_INFO |
| 580 (gaim_find_prpl(gaim_account_get_protocol(log->account)))->list_icon(log->account, NULL); |
581 (gaim_find_prpl(gaim_account_get_protocol_id(log->account)))->list_icon(log->account, NULL); |
| 581 char *dir; |
582 char *dir; |
| 582 |
583 |
| 583 if (log->type == GAIM_LOG_CHAT) { |
584 if (log->type == GAIM_LOG_CHAT) { |
| 584 chat = g_strdup_printf("%s.chat", guy); |
585 chat = g_strdup_printf("%s.chat", guy); |
| 585 g_free(guy); |
586 g_free(guy); |