pidgin/plugins/timestamp_format.c

changeset 15626
6210ee4beccc
parent 15575
bd1e13b63e4b
child 15629
a2261cb315e2
equal deleted inserted replaced
15625:fb910d97fe29 15626:6210ee4beccc
55 time_t t, 55 time_t t,
56 gboolean show_date, 56 gboolean show_date,
57 gboolean force, 57 gboolean force,
58 const char *dates) 58 const char *dates)
59 { 59 {
60 g_return_val_if_fail(conv != NULL, NULL);
61 g_return_val_if_fail(dates != NULL, NULL); 60 g_return_val_if_fail(dates != NULL, NULL);
62 61
63 if (show_date || 62 if (show_date ||
64 !strcmp(dates, "always") || 63 !strcmp(dates, "always") ||
65 (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT && !strcmp(dates, "chats"))) 64 (conv != NULL && gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT && !strcmp(dates, "chats")))
66 { 65 {
67 struct tm *tm = localtime(&t); 66 struct tm *tm = localtime(&t);
68 if (force) 67 if (force)
69 return g_strdup(gaim_utf8_strftime("%Y-%m-%d %H:%M:%S", tm)); 68 return g_strdup(gaim_utf8_strftime("%Y-%m-%d %H:%M:%S", tm));
70 else 69 else

mercurial