comparison libpurple/log.c @ 15529:443915ab77a1

I had the wrong arguments for gaim_log_logger_new(). It didn't work, but I've fixed that now. Also, the is_deletable access() stuff won't work on win32, so it's just disabled there for now.
author Richard Laager <rlaager@wiktel.com>
date Sun, 04 Feb 2007 05:48:15 +0000
parents f61ad08739fc
children 92107f572ac6
comparison
equal deleted inserted replaced
15528:f61ad08739fc 15529:443915ab77a1
588 gaim_prefs_add_bool("/core/logging/log_chats", FALSE); 588 gaim_prefs_add_bool("/core/logging/log_chats", FALSE);
589 gaim_prefs_add_bool("/core/logging/log_system", FALSE); 589 gaim_prefs_add_bool("/core/logging/log_system", FALSE);
590 590
591 gaim_prefs_add_string("/core/logging/format", "txt"); 591 gaim_prefs_add_string("/core/logging/format", "txt");
592 592
593 html_logger = gaim_log_logger_new("html", _("HTML"), 8, 593 html_logger = gaim_log_logger_new("html", _("HTML"), 11,
594 NULL, 594 NULL,
595 html_logger_write, 595 html_logger_write,
596 html_logger_finalize, 596 html_logger_finalize,
597 html_logger_list, 597 html_logger_list,
598 html_logger_read, 598 html_logger_read,
602 NULL, 602 NULL,
603 gaim_log_common_deleter, 603 gaim_log_common_deleter,
604 gaim_log_common_is_deletable); 604 gaim_log_common_is_deletable);
605 gaim_log_logger_add(html_logger); 605 gaim_log_logger_add(html_logger);
606 606
607 txt_logger = gaim_log_logger_new("txt", _("Plain text"), 8, 607 txt_logger = gaim_log_logger_new("txt", _("Plain text"), 11,
608 NULL, 608 NULL,
609 txt_logger_write, 609 txt_logger_write,
610 txt_logger_finalize, 610 txt_logger_finalize,
611 txt_logger_list, 611 txt_logger_list,
612 txt_logger_read, 612 txt_logger_read,
1025 return FALSE; 1025 return FALSE;
1026 1026
1027 if (data->path == NULL) 1027 if (data->path == NULL)
1028 return FALSE; 1028 return FALSE;
1029 1029
1030 #ifndef _WIN32
1030 dirname = g_path_get_dirname(data->path); 1031 dirname = g_path_get_dirname(data->path);
1031 if (g_access(dirname, W_OK) == 0) 1032 if (g_access(dirname, W_OK) == 0)
1032 { 1033 {
1033 g_free(dirname); 1034 g_free(dirname);
1034 return TRUE; 1035 return TRUE;
1035 } 1036 }
1037 gaim_debug_info("log", "access(%s) failed: %s\n", dirname, strerror(errno));
1036 g_free(dirname); 1038 g_free(dirname);
1039 #else
1040 /* Unless and until someone writes equivalent win32 code,
1041 * we'll assume the file is deletable. */
1042 return TRUE;
1043 #endif
1037 1044
1038 return FALSE; 1045 return FALSE;
1039 } 1046 }
1040 1047
1041 #if 0 /* Maybe some other time. */ 1048 #if 0 /* Maybe some other time. */